Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add benchmark for fix length input and output #5857

Merged
merged 26 commits into from
Jul 7, 2024

Conversation

haichuan1221
Copy link
Contributor

vllm only support benchmark for sonnet and sharegpt dataset, but the input and output length is not fixed; in the contribution, I use random sample to evealuate the benchmark of fixed input length and output length

@ywang96 ywang96 self-assigned this Jun 26, 2024
@DarkLight1337
Copy link
Member

To speed up the CI queue, I've cancelled the distributed tests for the latest CI run in this PR since they won't pass anyway until #5905 has been merged. Now that it has been merged, please merge main into your branch so that the CI can pass once again.

@haichuan1221
Copy link
Contributor Author

To speed up the CI queue, I've cancelled the distributed tests for the latest CI run in this PR since they won't pass anyway until #5905 has been merged. Now that it has been merged, please merge main into your branch so that the CI can pass once again.

I have merged from the main functiion

Copy link
Member

@ywang96 ywang96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @haichuan1221! Sorry for the late review and thank you for the contribution!

Overall LGTM and I have left a few comments/suggestions

@@ -185,6 +184,29 @@ def sample_sonnet_requests(
return sampled_requests


def sample_random_requests(input_len, output_len, num_prompts, range_ratio,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add type hint for parameters in the function signature

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just fixed, please check it again

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the formatting issues for you. For future reference, you can run the format.sh we provide in the repo for easily formatting your code changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I will. Thinks for the tip

parser.add_argument("--random-input-len",
type=int,
default=1024,
help="random sample input length")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
help="random sample input length")
help="Number of randomly sampled input tokens per request, used only for random dataset")

parser.add_argument("--random-output-len",
type=int,
default=128,
help="random sample output length")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the help message per suggestion above.

parser.add_argument("--random-range-ratio",
type=float,
default=1.0,
help="random sample range ratio")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the help message per suggestion above.

@ywang96 ywang96 enabled auto-merge (squash) July 7, 2024 05:59
@ywang96 ywang96 merged commit 333306a into vllm-project:main Jul 7, 2024
70 checks passed
xjpang pushed a commit to xjpang/vllm that referenced this pull request Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants