Skip to content

Conversation

@yewentao256
Copy link
Member

@yewentao256 yewentao256 commented Nov 6, 2025

Purpose

Idea from @mgoin

vllm bench serve --model deepseek-ai/DeepSeek-R1  --dataset-name random --host 127.0.0.1 --port 9256 --random-input-len 4 --random-output-len 1024 --request-rate inf --num-prompts 160 --max-concurrency 32

With overlap

============ Serving Benchmark Result ============
Successful requests:                     160       
Failed requests:                         0         
Maximum request concurrency:             32        
Benchmark duration (s):                  171.55    
Total input tokens:                      480       
Total generated tokens:                  123383    
Request throughput (req/s):              0.93      
Output token throughput (tok/s):         719.24    
Peak output token throughput (tok/s):    832.00    
Peak concurrent requests:                49.00     
Total Token throughput (tok/s):          722.04    
---------------Time to First Token----------------
Mean TTFT (ms):                          168.90    
Median TTFT (ms):                        87.14     
P99 TTFT (ms):                           420.81    
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms):                          39.90     
Median TPOT (ms):                        40.11     
P99 TPOT (ms):                           40.23     
---------------Inter-token Latency----------------
Mean ITL (ms):                           39.90     
Median ITL (ms):                         39.90     
P99 ITL (ms):                            46.70     
==================================================
Without (main):

============ Serving Benchmark Result ============
Successful requests:                     160       
Failed requests:                         0         
Maximum request concurrency:             32        
Benchmark duration (s):                  166.48    
Total input tokens:                      480       
Total generated tokens:                  124313    
Request throughput (req/s):              0.96      
Output token throughput (tok/s):         746.73    
Peak output token throughput (tok/s):    864.00    
Peak concurrent requests:                50.00     
Total Token throughput (tok/s):          749.62    
---------------Time to First Token----------------
Mean TTFT (ms):                          135.40    
Median TTFT (ms):                        83.12     
P99 TTFT (ms):                           286.72    
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms):                          38.42     
Median TPOT (ms):                        38.61     
P99 TPOT (ms):                           38.76     
---------------Inter-token Latency----------------
Mean ITL (ms):                           38.43     
Median ITL (ms):                         38.43     
P99 ITL (ms):                            44.55     
==================================================

Total generated tokens is different since ignore_eos is not set, which may be harmful to benchmark.

This PR make ignore_eos defaults to True if random_output_len is set.

Update:
We don't need to check random_output_len since it is already set to 128 by default

Signed-off-by: yewentao256 <zhyanwentao@126.com>
@mergify mergify bot added the performance Performance-related issues label Nov 6, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request changes the default behavior of the serve benchmark for random datasets by setting ignore_eos to True. This is a sensible change to ensure that generation proceeds for the full requested length, improving benchmark consistency. My review focuses on improving the clarity and correctness of the implementation. The current logic contains a redundant check and a misleading comment. I've suggested changes to simplify the code and align the comments with the actual behavior, making the code easier to understand and maintain.

Signed-off-by: yewentao256 <zhyanwentao@126.com>
@yewentao256 yewentao256 changed the title [Feature] Default ignore_eos True when random_output_len is set [Feature] Default ignore_eos True for random dataset Nov 6, 2025
@yewentao256 yewentao256 added the ready ONLY add when PR is ready to merge/full CI is needed label Nov 6, 2025
@mgoin mgoin merged commit 4b1ff13 into main Nov 7, 2025
49 checks passed
@mgoin mgoin deleted the wentao-default-ignore_eos-when-random_output_len-is-set branch November 7, 2025 12:35
ZhengHongming888 pushed a commit to ZhengHongming888/vllm that referenced this pull request Nov 8, 2025
…t#28227)

Signed-off-by: yewentao256 <zhyanwentao@126.com>
xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Nov 13, 2025
…t#28227)

Signed-off-by: yewentao256 <zhyanwentao@126.com>
Signed-off-by: xuebwang-amd <xuebwang@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Performance-related issues 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