Skip to content

Conversation

Isotr0py
Copy link
Member

@Isotr0py Isotr0py commented Sep 21, 2025

Purpose

Test Plan

vllm bench serve  --backend openai-chat   --endpoint-type openai-chat --model /home/mozf/LLM/Qwen3-VL-4B-Instruct/   --endpoint /v1/chat/completions   --dataset-name hf   --data
set-path "lmarena-ai/VisionArena-Chat"   --hf-split train   --num-prompts 500 --max-concurrency 64

Test Result

Main branch

============ Serving Benchmark Result ============
Successful requests:                     500       
Maximum request concurrency:             64        
Benchmark duration (s):                  85.76     
Total input tokens:                      34073     
Total generated tokens:                  61091     
Request throughput (req/s):              5.83      
Output token throughput (tok/s):         712.33    
Peak output token throughput (tok/s):    2431.00   
Peak concurrent requests:                82.00     
Total Token throughput (tok/s):          1109.62   
---------------Time to First Token----------------
Mean TTFT (ms):                          1301.41   
Median TTFT (ms):                        1037.53   
P99 TTFT (ms):                           6141.91   
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms):                          83.71     
Median TPOT (ms):                        81.09     
P99 TPOT (ms):                           375.42    
---------------Inter-token Latency----------------
Mean ITL (ms):                           77.71     
Median ITL (ms):                         28.33     
P99 ITL (ms):                            444.94    
==================================================

PR

============ Serving Benchmark Result ============
Successful requests:                     500       
Maximum request concurrency:             64        
Benchmark duration (s):                  84.81     
Total input tokens:                      34073     
Total generated tokens:                  61174     
Request throughput (req/s):              5.90      
Output token throughput (tok/s):         721.35    
Peak output token throughput (tok/s):    2367.00   
Peak concurrent requests:                81.00     
Total Token throughput (tok/s):          1123.13   
---------------Time to First Token----------------
Mean TTFT (ms):                          1212.60   
Median TTFT (ms):                        952.82    
P99 TTFT (ms):                           5926.17   
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms):                          82.54     
Median TPOT (ms):                        80.58     
P99 TPOT (ms):                           370.48    
---------------Inter-token Latency----------------
Mean ITL (ms):                           77.33     
Median ITL (ms):                         28.42     
P99 ITL (ms):                            437.87    
==================================================

Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
@mergify mergify bot added the qwen Related to Qwen models label Sep 21, 2025
@Isotr0py Isotr0py changed the title [Perf] Furhter minor optimization for Qwen3-VL fast_pos_embed_interpolate [Perf] Furhter optimization for Qwen3-VL fast_pos_embed_interpolate Sep 21, 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 introduces a minor but effective optimization for the fast_pos_embed_interpolate function in Qwen3-VL's vision transformer. The changes involve refactoring the weight and index calculations for bilinear interpolation. By using torch.meshgrid, the code becomes more readable and vectorized. Furthermore, an algebraic simplification in the weight calculation reduces the number of multiplications, leading to a small but measurable performance improvement as shown in the provided benchmarks. The changes are correct and well-implemented. I have no major concerns.

@Isotr0py Isotr0py requested a review from ywang96 September 21, 2025 17:07
@Isotr0py Isotr0py changed the title [Perf] Furhter optimization for Qwen3-VL fast_pos_embed_interpolate [Perf] Further optimization for Qwen3-VL fast_pos_embed_interpolate Sep 21, 2025
@Isotr0py Isotr0py enabled auto-merge (squash) September 21, 2025 18:27
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 21, 2025
@Isotr0py Isotr0py merged commit af7dfb0 into vllm-project:main Sep 21, 2025
65 checks passed
kingsmad pushed a commit to kingsmad/vllm that referenced this pull request Sep 22, 2025
FeiDaLI pushed a commit to FeiDaLI/vllm that referenced this pull request Sep 25, 2025
charlifu pushed a commit to ROCm/vllm that referenced this pull request Sep 25, 2025
…vllm-project#25347)

Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Signed-off-by: charlifu <charlifu@amd.com>
@Isotr0py Isotr0py deleted the fast-interp branch September 29, 2025 12:22
yewentao256 pushed a commit that referenced this pull request Oct 3, 2025
…#25347)

Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Signed-off-by: yewentao256 <zhyanwentao@126.com>
xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Oct 10, 2025
…vllm-project#25347)

Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Signed-off-by: xuebwang-amd <xuebwang@amd.com>
choprahetarth pushed a commit to Tandemn-Labs/vllm that referenced this pull request Oct 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

qwen Related to Qwen models 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.

2 participants