Commit 801a6b4
[Misc] upgrade vLLM to a30addc (vllm-project#10459)
### What this PR does / why we need it?
This PR updates vLLM-Ascend for the vLLM main upgrade:
- Previous vLLM main:
[`dc68bd8c4199b00631fe71eb37313f406cc66ac1`](vllm-project/vllm@dc68bd8)
- New vLLM main:
[`a30addc7548a9a8b9b3323a7bc3eb7d7c4895d1c`](vllm-project/vllm@a30addc)
- Upstream compare:
[`dc68bd8c...a30addc`](vllm-project/vllm@dc68bd8...a30addc)
The final patch changes 6 files. The mapping below explains why each
changed file is needed and which upstream vLLM PR/commit in this upgrade
range caused it.
####
`tests/e2e/pull_request/one_card/spec_decode/test_extract_hidden_states.py`
- Upstream source: [vLLM
#43805](https://github.com/vllm-project/vllm/pull/43805/changes#diff-72eec9c1ef7542e20f0c2610fd9e255959d9574e45321b0c2c8996301599a90fR287).
- What changed upstream: `ExampleHiddenStatesConnector` was refactored
to save hidden states asynchronously, pre-create `.lock` files, and
expose connector helpers such as `load_hidden_states()` /
`cleanup_hidden_states()` as the synchronized read path.
- Local change: replace direct `safe_open(hidden_states_path, "pt")`
reads with
`example_hidden_states_connector.load_hidden_states(hidden_states_path)`,
then read `hidden_states` and `token_ids` from the returned object. For
vLLM main, cleanup is performed through `cleanup_hidden_states()` after
the read; the v0.23.0 path keeps the existing existence check for
release compatibility.
- Why: after upstream async writes, the output path can be visible
before the safetensors write has completed. Reading the file directly
can race the writer. The connector helper respects the upstream lock
protocol and avoids flaky hidden-state extraction tests.
#### `tests/ut/patch/platform/test_patch_tool_choice_none_content.py`
- Upstream source: [vLLM
#45190](https://github.com/vllm-project/vllm/pull/45190/changes#diff-42bfc2c85e7e8c3e45317685ea1cd396c6f617a5eee3540d9b8758b8b06d60d6).
- What changed upstream: Responses API parsing was unified to use
`parser.parse()`, and the old `DelegatingParser._parse_tool_calls()`
helper was removed. The current hook is
`DelegatingParser._extract_tool_calls(content=..., request=...,
enable_auto_tools=...)`.
- Local change: update the unit test to call `_extract_tool_calls()`
with the current argument order.
- Why: the Ascend patch for forced tool-choice requests with
`content=None` is applied to the current upstream hook. The test must
exercise the method that is actually used by vLLM main; otherwise it
either fails with `AttributeError` or no longer verifies the live parser
path.
#### `vllm_ascend/ops/fused_moe/fused_moe.py`
- Upstream source: the routed-expert weight-loading fixes in [vLLM
#45054](vllm-project/vllm#45054), commit
[`f4966f8b3ddf757c607d57d4bb35624e2ee4f6b4`](vllm-project/vllm@f4966f8),
and [vLLM #45067](vllm-project/vllm#45067),
commit
[`7920ccb97c2d27d0a1a822e42d11ba369c2f255c`](vllm-project/vllm@7920ccb).
These are follow-up fixes to the earlier fused-MoE routed-expert
refactor.
- What changed upstream: vLLM moved model-specific loading paths to the
new `experts.routed_experts.*` / `mlp.experts.routed_experts.*`
parameter ownership. #45054 updates Aria, Qwen3-VL-MoE, Step3, Step3.5,
and related quant loading paths. #45067 updates GPT-OSS legacy
checkpoint name remapping after the fused-MoE refactor.
- Local change: import `FusedMoE` and `MoERunner` from
`vllm.model_executor.layers.fused_moe.layer` at module scope, while
leaving only `UnquantizedFusedMoEMethod` under the v0.23.0/main version
branch. Also narrow `_needs_routed_expert_parameter_aliases()` from the
broad local list of model types to `model_type == "gpt_oss"`.
- Why: the broad alias workaround was needed while upstream model
loaders still looked for expert weights on the old MoE module path. In
this vLLM range, upstream fixed the affected model loaders to use
`routed_experts` directly, so keeping aliases for Aria/Qwen3/Step3/etc.
would preserve stale duplicate parameter names. The remaining local
alias path is kept only for the Ascend GPT-OSS compatibility case, while
the import cleanup follows the current main package shape and keeps the
release/main `UnquantizedFusedMoEMethod` path difference explicit.
#### `vllm_ascend/worker/v2/attn_utils.py`
- Upstream source: [vLLM
#44586](https://github.com/vllm-project/vllm/pull/44586/changes#diff-9b864c13232e1f03b906ccc83311fa78d1c37988616ae88b4afdbb5c0d186a75R397).
- What changed upstream: GPU `build_attn_metadata()` gained a `causal:
bool = True` argument and passes it into
`CommonAttentionMetadata(causal=causal)`.
- Local change: add the same `causal` keyword to Ascend
`build_attn_metadata()` and pass it through to
`AscendCommonAttentionMetadata`.
- Why: vLLM main can now call `build_attn_metadata(..., causal=...)`,
especially from newer speculative decoding paths. Ascend must accept the
same keyword to avoid `unexpected keyword argument 'causal'`, and must
preserve `causal=False` instead of silently forcing all metadata to
causal attention.
#### `vllm_ascend/worker/v2/model_runner.py`
- Upstream source: [vLLM
#45163](https://github.com/vllm-project/vllm/pull/45163/changes#diff-5823f988fc0264681a80db24ccaba4d364f14394815d83ec1d90944c09f571f0L266).
- What changed upstream: `GPUModelRunner.__init__` removed the early
instance-attribute assignment `self.decode_query_len =
self.num_speculative_steps + 1`. `self.decode_query_len` is now created
later in `load_model()` after `model_state` exists, using
`self.num_speculative_steps +
self.model_state.num_new_sampled_tokens_per_step`.
- Local change: in `NPUModelRunner.__init__`, replace the early read of
`self.decode_query_len` with a local variable `decode_query_len =
self.num_speculative_steps + 1` only for the immediate Ascend setup
calls `set_cos_and_sin()` and `set_mc2_tokens_capacity()`. This does not
reintroduce `self.decode_query_len` assignment in `__init__`.
- Why: Ascend runs these setup calls immediately after
`GPUModelRunner.__init__`, at a point where upstream main no longer has
`self.decode_query_len` yet. The local value is a compatibility fallback
matching the pre-#45163 formula for the currently supported Ascend path,
while leaving upstream's later `self.decode_query_len` initialization
model intact.
#### Does this PR introduce _any_ user-facing change?
No intended user-facing API change. This is a compatibility update for
the new vLLM main baseline. It fixes test/runtime compatibility with
upstream parser, connector, attention metadata, model runner, and
fused-MoE loading changes.
### How was this patch tested?
- CI:
https://github.com/vllm-project/vllm-ascend/actions/runs/27770885645
Compatibility targets:
- vLLM version: v0.23.0
- vLLM main:
vllm-project/vllm@dc68bd8
---------
Signed-off-by: zhangxinyuehfad <starmoon_zhang@163.com>
Signed-off-by: MrZ20 <2609716663@qq.com>
Co-authored-by: zhangxinyuehfad <starmoon_zhang@163.com>1 parent 52da9d9 commit 801a6b4
7 files changed
Lines changed: 40 additions & 39 deletions
File tree
- .github
- tests
- e2e/pull_request/one_card/spec_decode
- ut/patch/platform
- vllm_ascend
- ops/fused_moe
- worker/v2
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Lines changed: 27 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | 36 | | |
38 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
39 | 46 | | |
40 | 47 | | |
41 | 48 | | |
| |||
123 | 130 | | |
124 | 131 | | |
125 | 132 | | |
126 | | - | |
127 | 133 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
132 | 152 | | |
133 | 153 | | |
134 | 154 | | |
135 | | - | |
| 155 | + | |
136 | 156 | | |
137 | 157 | | |
138 | 158 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
| 68 | + | |
70 | 69 | | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| |||
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
52 | | - | |
53 | | - | |
| 56 | + | |
54 | 57 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
515 | 515 | | |
516 | 516 | | |
517 | 517 | | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | 518 | | |
522 | 519 | | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
| 520 | + | |
543 | 521 | | |
544 | 522 | | |
545 | 523 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| |||
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
| 158 | + | |
157 | 159 | | |
158 | 160 | | |
159 | 161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
| |||
0 commit comments