Skip to content

[Bugfix] Fix benchmark script bug: inaccurate stats for vllm backend when max_model_len < input_len + output_len #13691

New issue

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

By clicking “No 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? No Sign in to your account

Merged
merged 2 commits into from
Feb 22, 2025

Conversation

WangErXiao
Copy link
Contributor

@WangErXiao WangErXiao commented Feb 22, 2025

Fix benchmark script bug: inaccurate stats for vllm backend when max_model_len < input_len + output_len.

When max_model_len is smaller than prompt_len + expected_output_len, the request may terminate early without reaching the expected_output_len, resulting in inaccurate throughput statistics. This is because the total generated token count is calculated as expected_output_len multiplied by the number of prompts. So add assert max_model_len > input_len + output_len.

…when max_model_len < input_len + output_len

Signed-off-by: WangErXiao <863579016@qq.com>
Signed-off-by: WangErXiao <863579016@qq.com>
Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

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.

Thanks for the fix!

@ywang96 ywang96 added the ready ONLY add when PR is ready to merge/full CI is needed label Feb 22, 2025
@DarkLight1337 DarkLight1337 merged commit 8aca27f into vllm-project:main Feb 22, 2025
41 of 43 checks passed
Akshat-Tripathi pushed a commit to krai/vllm that referenced this pull request Mar 3, 2025
…when max_model_len < input_len + output_len (vllm-project#13691)

Signed-off-by: WangErXiao <863579016@qq.com>
lulmer pushed a commit to lulmer/vllm that referenced this pull request Apr 7, 2025
…when max_model_len < input_len + output_len (vllm-project#13691)

Signed-off-by: WangErXiao <863579016@qq.com>
Signed-off-by: Louis Ulmer <ulmerlouis@gmail.com>
No Sign up for free to join this conversation on GitHub. Already have an account? No Sign in to comment
Labels
ready ONLY add when PR is ready to merge/full CI is needed structured-output
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants