Skip to content

Add vllm bench [latency, throughput] CLI commands #16508

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

Merged

Conversation

mgoin
Copy link
Member

@mgoin mgoin commented Apr 11, 2025

Was able to fully move benchmarks/benchmark_latency.py and benchmarks/benchmark_throughput.py into vllm bench latency and vllm bench throughput commands, respectively. I also added tests for all three latency/serve/throughput commands. In a followup PR I will move more functionality into serve that was left behind. We can also remove some of the utility files in benchmarks/ as they will be in the vllm package now. This should wait for a few vLLM releases imo

Tested manually and with CI smoke tests added:

vllm bench latency --model RedHatAI/Llama-4-Scout-17B-16E-Instruct-FP8-dynamic --max-model-len 8000 --tensor-parallel-size 2 --input-len 1000 --output-len 1000 --batch-size 1 --num-iters-warmup 5 --num-iters 5
vllm bench latency --model meta-llama/Llama-3.2-1B-Instruct 
vllm bench throughput --model meta-llama/Llama-3.2-1B-Instruct --input-len 32 --output-len 1 --enforce-eager

vllm serve meta-llama/Llama-3.2-1B-Instruct
vllm bench serve --model meta-llama/Llama-3.2-1B-Instruct

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.

🚀

@mergify mergify bot added the frontend label Apr 11, 2025
@mgoin mgoin marked this pull request as draft April 11, 2025 20:04
@mergify mergify bot added the ci/build label Apr 12, 2025
@mgoin mgoin marked this pull request as ready for review April 12, 2025 18:52
@mgoin mgoin added the ready ONLY add when PR is ready to merge/full CI is needed label Apr 12, 2025
Copy link
Collaborator

@comaniac comaniac left a comment

Choose a reason for hiding this comment

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

Given this PR mostly copies the code from benchmarks I mainly reviewed the dependencies and scope. Overall LGTM.

Signed-off-by: mgoin <[email protected]>
@vllm-bot vllm-bot merged commit b4fe16c into vllm-project:main Apr 15, 2025
66 of 71 checks passed
yangw-dev pushed a commit to yangw-dev/vllm that referenced this pull request Apr 21, 2025
jikunshang pushed a commit to jikunshang/vllm that referenced this pull request Apr 29, 2025
lk-chen pushed a commit to lk-chen/vllm that referenced this pull request Apr 29, 2025
RichardoMrMu pushed a commit to RichardoMrMu/vllm that referenced this pull request May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/build frontend ready ONLY add when PR is ready to merge/full CI is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants