Skip to content

[Model Runner V2] support qwen35 / mamba hybrid model - #35520

Merged
WoosukKwon merged 25 commits into
vllm-project:mainfrom
izhuhaoran:MRV2-support-qwen35
May 7, 2026
Merged

[Model Runner V2] support qwen35 / mamba hybrid model#35520
WoosukKwon merged 25 commits into
vllm-project:mainfrom
izhuhaoran:MRV2-support-qwen35

Conversation

@izhuhaoran

@izhuhaoran izhuhaoran commented Feb 27, 2026

Copy link
Copy Markdown
Contributor

Purpose

As titled, this pr support qwen3.5 model for model runner v2.

Test

Qwen3.5-35B-A3B-FP8, mtp with num_speculative_tokens = 2
NVIDIA H20 GPUs, TP=2

bence serve

bench args: --dataset-name spec_bench --spec-bench-output-len 1024 --max-concurrency 32 --num-prompts 512

Traffic request rate: inf
Burstiness factor: 1.0 (Poisson process)
Maximum request concurrency: 32
============ Serving Benchmark Result ============
Successful requests:                     512       
Failed requests:                         0         
Maximum request concurrency:             32        
Benchmark duration (s):                  204.40    
Total input tokens:                      140763    
Total generated tokens:                  503319    
Request throughput (req/s):              2.50      
Output token throughput (tok/s):         2462.37   
Peak output token throughput (tok/s):    1120.00   
Peak concurrent requests:                45.00     
Total token throughput (tok/s):          3151.02   
---------------Time to First Token----------------
Mean TTFT (ms):                          141.86    
Median TTFT (ms):                        108.06    
P99 TTFT (ms):                           292.57    
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms):                          12.57     
Median TPOT (ms):                        12.69     
P99 TPOT (ms):                           14.46     
---------------Inter-token Latency----------------
Mean ITL (ms):                           31.56     
Median ITL (ms):                         29.19     
P99 ITL (ms):                            113.78    
----------------End-to-end Latency----------------
Mean E2EL (ms):                          12517.42  
Median E2EL (ms):                        13103.73  
P99 E2EL (ms):                           14919.61  
---------------Speculative Decoding---------------
Acceptance rate (%):                     75.33     
Acceptance length:                       2.51      
Drafts:                                  200764    
Draft tokens:                            401528    
Accepted tokens:                         302477    
Per-position acceptance (%):
  Position 0:                            84.38     
  Position 1:                            66.29     
==================================================

lm_eval

lm_eval --model local-completions --tasks gsm8k --batch_size 128 --model_args model=Qwen/Qwen3.5-35B-A3B-FP8,base_url=http://localhost:8000/v1/completions,max_retries=3

Tasks Version Filter n-shot Metric Value Stderr
gsm8k 3 flexible-extract 5 exact_match 0.7763 ± 0.0115
strict-match 5 exact_match 0.7582 ± 0.0118

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

Copy link
Copy Markdown
Contributor

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 adds support for Qwen3.5/Mamba hybrid models to the Model Runner V2. The changes are extensive, touching configuration, KV cache management, attention utilities, and model state handling to accommodate the hybrid nature of these models. The implementation correctly introduces new logic for Mamba's state caching and integrates it with the existing attention mechanism. One area for improvement is a potential performance bottleneck in the metadata preparation for hybrid models, which I've commented on.

Comment thread vllm/v1/worker/gpu/attn_utils.py Outdated
@mergify

mergify Bot commented Feb 28, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @izhuhaoran.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify

mergify Bot commented Feb 28, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @izhuhaoran.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Feb 28, 2026
@izhuhaoran
izhuhaoran force-pushed the MRV2-support-qwen35 branch from bb1f347 to 4a916eb Compare March 1, 2026 15:00
@mergify mergify Bot removed the needs-rebase label Mar 1, 2026
@mergify

mergify Bot commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @izhuhaoran.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Mar 3, 2026
@izhuhaoran
izhuhaoran force-pushed the MRV2-support-qwen35 branch from 4a916eb to f39b583 Compare March 5, 2026 11:53
@mergify mergify Bot removed the needs-rebase label Mar 5, 2026
@mergify

mergify Bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @izhuhaoran.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Mar 9, 2026
@WoosukKwon

Copy link
Copy Markdown
Collaborator

Hi @izhuhaoran, sorry for the delay in the review. Can you please rebase your PR given that we had major updates?

@github-project-automation github-project-automation Bot moved this to Ready in NVIDIA May 6, 2026
@WoosukKwon
WoosukKwon enabled auto-merge (squash) May 6, 2026 18:15
@mergify

mergify Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @izhuhaoran.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label May 6, 2026
Signed-off-by: zhuhaoran <zhuhaoran.zhr@alibaba-inc.com>
auto-merge was automatically disabled May 7, 2026 03:50

Head branch was pushed to by a user without write access

@mergify mergify Bot removed the needs-rebase label May 7, 2026
@izhuhaoran

Copy link
Copy Markdown
Contributor Author

@WoosukKwon The current CI failures appear unrelated to this PR. I reproduced the two failing tests on top of main, and they fail there as well. Could you please help manually merge this PR?

@WoosukKwon
WoosukKwon merged commit 7a08b34 into vllm-project:main May 7, 2026
68 of 71 checks passed
@github-project-automation github-project-automation Bot moved this from Ready to Done in NVIDIA May 7, 2026
alexagriffith pushed a commit to alexagriffith/vllm that referenced this pull request May 7, 2026
…5520)

Signed-off-by: zhuhaoran <zhuhaoran.zhr@alibaba-inc.com>
Signed-off-by: alexagriffith <agriffith96@gmail.com>
libinta pushed a commit to libinta/vllm that referenced this pull request May 8, 2026
…5520)

Signed-off-by: zhuhaoran <zhuhaoran.zhr@alibaba-inc.com>
Signed-off-by: Libin Tang <libin.tang@intel.com>
weifang231 pushed a commit to weifang231/eb-vllm that referenced this pull request May 13, 2026
…5520)

Signed-off-by: zhuhaoran <zhuhaoran.zhr@alibaba-inc.com>
wangxiyuan pushed a commit to vllm-project/vllm-ascend that referenced this pull request May 14, 2026
### What this PR does / why we need it?
1. fix vllm-project/vllm#33322
overwrite `gpu_modelrunner.sync_and_gather_intermediate_tensors`, for
the sceniro `pp+sp+tp`, skip scatter the residual for ascend

2. vllm-project/vllm#35520
Adapted to the modifications of `ModelRunner v2` for hybrid attn in
interface level, .
Todo: Added support for Mamba in ModelRunner in Ascend. any pull_request
is welcome

3. vllm-project/vllm#40711

4. vllm-project/vllm#42121

5. vllm-project/vllm#41706

6. vllm-project/vllm#39917
Disable `async_schedule` when `enable_return_routed_experts=True`
7. vllm-project/vllm#41046
8. vllm-project/vllm#41055
9. vllm-project/vllm#41035
10. vllm-project/vllm#42434
### Does this PR introduce _any_ user-facing change?

### How was this patch tested?

- vLLM version: v0.20.1
- vLLM main:
vllm-project/vllm@c7aa186

---------

Signed-off-by: wangli <wangli858794774@gmail.com>
Tian-Fantasea pushed a commit to Tian-Fantasea/vllm-ascend that referenced this pull request May 19, 2026
### What this PR does / why we need it?
1. fix vllm-project/vllm#33322
overwrite `gpu_modelrunner.sync_and_gather_intermediate_tensors`, for
the sceniro `pp+sp+tp`, skip scatter the residual for ascend

2. vllm-project/vllm#35520
Adapted to the modifications of `ModelRunner v2` for hybrid attn in
interface level, .
Todo: Added support for Mamba in ModelRunner in Ascend. any pull_request
is welcome

3. vllm-project/vllm#40711

4. vllm-project/vllm#42121

5. vllm-project/vllm#41706

6. vllm-project/vllm#39917
Disable `async_schedule` when `enable_return_routed_experts=True`
7. vllm-project/vllm#41046
8. vllm-project/vllm#41055
9. vllm-project/vllm#41035
10. vllm-project/vllm#42434
### Does this PR introduce _any_ user-facing change?

### How was this patch tested?

- vLLM version: v0.20.1
- vLLM main:
vllm-project/vllm@c7aa186

---------

Signed-off-by: wangli <wangli858794774@gmail.com>
shaopeng-666 pushed a commit to shaopeng-666/vllm-ascend that referenced this pull request May 19, 2026
### What this PR does / why we need it?
1. fix vllm-project/vllm#33322
overwrite `gpu_modelrunner.sync_and_gather_intermediate_tensors`, for
the sceniro `pp+sp+tp`, skip scatter the residual for ascend

2. vllm-project/vllm#35520
Adapted to the modifications of `ModelRunner v2` for hybrid attn in
interface level, .
Todo: Added support for Mamba in ModelRunner in Ascend. any pull_request
is welcome

3. vllm-project/vllm#40711

4. vllm-project/vllm#42121

5. vllm-project/vllm#41706

6. vllm-project/vllm#39917
Disable `async_schedule` when `enable_return_routed_experts=True`
7. vllm-project/vllm#41046
8. vllm-project/vllm#41055
9. vllm-project/vllm#41035
10. vllm-project/vllm#42434
### Does this PR introduce _any_ user-facing change?

### How was this patch tested?

- vLLM version: v0.20.1
- vLLM main:
vllm-project/vllm@c7aa186

---------

Signed-off-by: wangli <wangli858794774@gmail.com>
Signed-off-by: 李少鹏 <lishaopeng21@huawei.com>
mfylcek pushed a commit to mfylcek/vllm that referenced this pull request May 19, 2026
…5520)

Signed-off-by: zhuhaoran <zhuhaoran.zhr@alibaba-inc.com>
jhu960213 pushed a commit to jhu960213/vllm that referenced this pull request May 20, 2026
…5520)

Signed-off-by: zhuhaoran <zhuhaoran.zhr@alibaba-inc.com>
mvanhorn pushed a commit to mvanhorn/vllm that referenced this pull request Jun 4, 2026
…5520)

Signed-off-by: zhuhaoran <zhuhaoran.zhr@alibaba-inc.com>
Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
knight0528 pushed a commit to knight0528/vllm that referenced this pull request Jun 8, 2026
…5520)

Signed-off-by: zhuhaoran <zhuhaoran.zhr@alibaba-inc.com>
ader47 pushed a commit to ader47/vllm-ascend that referenced this pull request Jun 18, 2026
### What this PR does / why we need it?
1. fix vllm-project/vllm#33322
overwrite `gpu_modelrunner.sync_and_gather_intermediate_tensors`, for
the sceniro `pp+sp+tp`, skip scatter the residual for ascend

2. vllm-project/vllm#35520
Adapted to the modifications of `ModelRunner v2` for hybrid attn in
interface level, .
Todo: Added support for Mamba in ModelRunner in Ascend. any pull_request
is welcome

3. vllm-project/vllm#40711

4. vllm-project/vllm#42121

5. vllm-project/vllm#41706

6. vllm-project/vllm#39917
Disable `async_schedule` when `enable_return_routed_experts=True`
7. vllm-project/vllm#41046
8. vllm-project/vllm#41055
9. vllm-project/vllm#41035
10. vllm-project/vllm#42434
### Does this PR introduce _any_ user-facing change?

### How was this patch tested?

- vLLM version: v0.20.1
- vLLM main:
vllm-project/vllm@c7aa186

---------

Signed-off-by: wangli <wangli858794774@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

multi-modality Related to multi-modality (#4194) nvidia qwen Related to Qwen models ready ONLY add when PR is ready to merge/full CI is needed v1

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants