Skip to content

[BugFix] Fix torchair+mtp bug after deleting deepseek_mtp.#3590

Merged
wangxiyuan merged 2 commits intovllm-project:mainfrom
whx-sjtu:rm_ds_mtp
Oct 21, 2025
Merged

[BugFix] Fix torchair+mtp bug after deleting deepseek_mtp.#3590
wangxiyuan merged 2 commits intovllm-project:mainfrom
whx-sjtu:rm_ds_mtp

Conversation

@whx-sjtu
Copy link
Copy Markdown
Collaborator

@whx-sjtu whx-sjtu commented Oct 21, 2025

This is a missing bug fix introduced by PR #3561

@github-actions
Copy link
Copy Markdown
Contributor

👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:‌‌

  • A PR should do only one thing, smaller PRs enable faster reviews.
  • Every PR should include unit tests and end-to-end tests ‌to ensure it works and is not broken by other future PRs.
  • Write the commit message by fulfilling the PR description to help reviewer and future developers understand.

If CI fails, you can run linting and testing checks locally according Contributing and Testing.

Copy link
Copy Markdown
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 renames the previous_hidden_states parameter to hidden_states in TorchairDeepSeekMTP.forward. While this change seems correct for interface alignment, it introduces a critical inconsistency with vllm_ascend/spec_decode/mtp_proposer.py. The calls to the compiled model within the torchair graph path in that file still use the old previous_hidden_states keyword argument, which will result in a TypeError at runtime. It appears that the corresponding updates in vllm_ascend/spec_decode/mtp_proposer.py are missing from this pull request.

Comment on lines +212 to +218
hidden_states: Optional[torch.Tensor] = None,
intermediate_tensors: Optional[IntermediateTensors] = None,
inputs_embeds: Optional[torch.Tensor] = None,
spec_step_idx: int = 0,
) -> torch.Tensor:
hidden_states = self.model(input_ids, positions, kv_caches,
attn_metadata, previous_hidden_states,
attn_metadata, hidden_states,
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.

critical

Renaming previous_hidden_states to hidden_states in the forward method signature introduces a breaking change for its callers that use keyword arguments. The torchair graph execution path in vllm_ascend/spec_decode/mtp_proposer.py calls the compiled version of this model using previous_hidden_states as a keyword argument. This will lead to a TypeError at runtime because the parameter name has changed.

Specifically, in vllm_ascend/spec_decode/mtp_proposer.py, there are calls like:

# line 178
previous_hidden_states=previous_hidden_states,

# line 463
previous_hidden_states=self.hidden_states[:num_input_tokens],

These calls will fail with the new signature. It seems the corresponding changes in vllm_ascend/spec_decode/mtp_proposer.py to use the hidden_states keyword are missing from this pull request.

@whx-sjtu whx-sjtu force-pushed the rm_ds_mtp branch 2 times, most recently from 02c3a6c to c596866 Compare October 21, 2025 12:43
Signed-off-by: whx-sjtu <2952154980@qq.com>
Signed-off-by: whx-sjtu <2952154980@qq.com>
@wangxiyuan wangxiyuan merged commit bd11c00 into vllm-project:main Oct 21, 2025
16 of 17 checks passed
ZYang6263 pushed a commit to rjg-lyh/vllm-ascend that referenced this pull request Oct 23, 2025
…ect#3590)

This is a missing bug fix introduced by PR vllm-project#3561

- vLLM version: v0.11.0rc3
- vLLM main: https://github.com/vllm-project/vllm/commit/v0.11.0

---------

Signed-off-by: whx-sjtu <2952154980@qq.com>
luolun pushed a commit to luolun/vllm-ascend that referenced this pull request Nov 19, 2025
…ect#3590)

This is a missing bug fix introduced by PR vllm-project#3561

- vLLM version: v0.11.0rc3
- vLLM main: https://github.com/vllm-project/vllm/commit/v0.11.0

---------

Signed-off-by: whx-sjtu <2952154980@qq.com>
Signed-off-by: luolun <luolun1995@cmbchina.com>
hwhaokun pushed a commit to hwhaokun/vllm-ascend that referenced this pull request Nov 19, 2025
…ect#3590)

This is a missing bug fix introduced by PR vllm-project#3561

- vLLM version: v0.11.0rc3
- vLLM main: https://github.com/vllm-project/vllm/commit/v0.11.0

---------

Signed-off-by: whx-sjtu <2952154980@qq.com>
Signed-off-by: hwhaokun <haokun0405@163.com>
NSDie pushed a commit to NSDie/vllm-ascend that referenced this pull request Nov 24, 2025
…ect#3590)

This is a missing bug fix introduced by PR vllm-project#3561

- vLLM version: v0.11.0rc3
- vLLM main: https://github.com/vllm-project/vllm/commit/v0.11.0

---------

Signed-off-by: whx-sjtu <2952154980@qq.com>
Signed-off-by: nsdie <yeyifan@huawei.com>
Clorist33 pushed a commit to Clorist33/vllm-ascend that referenced this pull request Dec 9, 2025
…ect#3590)

This is a missing bug fix introduced by PR vllm-project#3561

- vLLM version: v0.11.0rc3
- vLLM main: https://github.com/vllm-project/vllm/commit/v0.11.0

---------

Signed-off-by: whx-sjtu <2952154980@qq.com>
yangzhe-2026 pushed a commit to yangzhe-2026/vllm-ascend that referenced this pull request May 6, 2026
…ect#3590)

This is a missing bug fix introduced by PR vllm-project#3561

- vLLM version: v0.11.0rc3
- vLLM main: https://github.com/vllm-project/vllm/commit/v0.11.0

---------

Signed-off-by: whx-sjtu <2952154980@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants