Skip to content

[0.13.0][Bugfix] Fix setting of speculative_config.enforce_eager for dsv32#5958

Merged
yiz-liu merged 1 commit intovllm-project:releases/v0.13.0from
slippersss:0.13.0_bugfix_dsv32
Jan 21, 2026
Merged

[0.13.0][Bugfix] Fix setting of speculative_config.enforce_eager for dsv32#5958
yiz-liu merged 1 commit intovllm-project:releases/v0.13.0from
slippersss:0.13.0_bugfix_dsv32

Conversation

@slippersss
Copy link
Copy Markdown
Contributor

@slippersss slippersss commented Jan 16, 2026

What this PR does / why we need it?

This PR is cherry-picked from #5945. We leave only changes in platform.py.

This PR aims to fix setting of speculative_config.enforce_eager in deepseek v3.2 mtp. The point is that, vllm sets speculative_config.enforce_eager as True if using deepseek_v32 with mtp. Since we support graph mode, we simply ignore it here. However, this fix will also implicitly ignore user setting of speculative_config.enforce_eager, we need to take care and remove it once vllm supports this feature.

Does this PR introduce any user-facing change?

N/A

How was this patch tested?

by ci

…r dsv32

Signed-off-by: Zetong Li <slippersss@126.com>
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 aims to fix an issue with speculative_config.enforce_eager being incorrectly forced for deepseek_v32 models on the Ascend platform, which supports graph mode. The change correctly overrides this setting. However, the implementation introduces a potential AttributeError that could lead to a crash. I have provided a critical-severity comment with a suggested code change to make the logic more robust and prevent this potential runtime error.

Comment thread vllm_ascend/platform.py
Comment on lines +368 to +372
if model_config and speculative_config and \
hasattr(model_config.hf_text_config, "model_type") and \
model_config.hf_text_config.model_type == "deepseek_v32" and \
speculative_config.enforce_eager:
speculative_config.enforce_eager = False
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

The condition to check for the deepseek_v32 model type is not fully robust. It could raise an AttributeError if model_config.hf_text_config is None, which would cause the application to crash. It's safer to use getattr to access nested attributes with a default value to prevent such crashes. I've refactored the logic to be more robust and readable.

Suggested change
if model_config and speculative_config and \
hasattr(model_config.hf_text_config, "model_type") and \
model_config.hf_text_config.model_type == "deepseek_v32" and \
speculative_config.enforce_eager:
speculative_config.enforce_eager = False
if model_config and speculative_config and speculative_config.enforce_eager:
hf_text_config = getattr(model_config, "hf_text_config", None)
if (hf_text_config and
getattr(hf_text_config, "model_type", None) == "deepseek_v32"):
speculative_config.enforce_eager = False

@yiz-liu yiz-liu merged commit 9e5b782 into vllm-project:releases/v0.13.0 Jan 21, 2026
9 checks passed
845473182 pushed a commit to 845473182/vllm-ascend that referenced this pull request Jan 21, 2026
…lm-ascend into FIA_v0.13.0

* 'releases/v0.13.0' of https://github.com/vllm-project/vllm-ascend:
  [0.13.0][Bugfix] Fix setting of `speculative_config.enforce_eager` for dsv32 (vllm-project#5958)
  [v0.13.0][Bugfix] Fix XliteModelRunner init failed when aclgraph is enabled (vllm-project#5887)
  [0.13.0][Bugfix] Fixed an problem related to embeddings sharing (vllm-project#5972)
  [Bugfix]Fixed precision issues caused by pooled request pooling (vllm-project#6057)
  [0.13.0][Bugfix] fix pcp aclgraph qwen FIA bug (vllm-project#6038)
  [0.13.0][cherry-pick][bugfix] fix bug of triton mrope (vllm-project#6009)
  【0.13.0】【bugfix】Resolved memory deallocation failure in the pooling layer under re-computation workloads. (vllm-project#6056)
Mercykid-bash pushed a commit to Mercykid-bash/vllm-ascend that referenced this pull request Jan 21, 2026
…r dsv32 (vllm-project#5958)

### What this PR does / why we need it?
This PR is cherry-picked from vllm-project#5945. We leave only changes in
platform.py.

This PR aims to fix setting of `speculative_config.enforce_eager` in
deepseek v3.2 mtp. The point is that, vllm sets
`speculative_config.enforce_eager` as True if using deepseek_v32 with
mtp. Since we support graph mode, we simply ignore it here. However,
this fix will also implicitly ignore user setting of
`speculative_config.enforce_eager`, we need to take care and remove it
once vllm supports this feature.

### Does this PR introduce _any_ user-facing change?
N/A

### How was this patch tested?
by ci

Signed-off-by: Zetong Li <slippersss@126.com>
Signed-off-by: Mercykid-bash <ruanche0218@gmail.com>
starmountain1997 pushed a commit to starmountain1997/vllm-ascend that referenced this pull request Jan 31, 2026
…r dsv32 (vllm-project#5958)

### What this PR does / why we need it?
This PR is cherry-picked from vllm-project#5945. We leave only changes in
platform.py.

This PR aims to fix setting of `speculative_config.enforce_eager` in
deepseek v3.2 mtp. The point is that, vllm sets
`speculative_config.enforce_eager` as True if using deepseek_v32 with
mtp. Since we support graph mode, we simply ignore it here. However,
this fix will also implicitly ignore user setting of
`speculative_config.enforce_eager`, we need to take care and remove it
once vllm supports this feature.

### Does this PR introduce _any_ user-facing change?
N/A

### How was this patch tested?
by ci

Signed-off-by: Zetong Li <slippersss@126.com>
tangtiangu pushed a commit to tangtiangu/jiusi-vllm-ascend that referenced this pull request Feb 24, 2026
…r dsv32 (vllm-project#5958)

### What this PR does / why we need it?
This PR is cherry-picked from vllm-project#5945. We leave only changes in
platform.py.

This PR aims to fix setting of `speculative_config.enforce_eager` in
deepseek v3.2 mtp. The point is that, vllm sets
`speculative_config.enforce_eager` as True if using deepseek_v32 with
mtp. Since we support graph mode, we simply ignore it here. However,
this fix will also implicitly ignore user setting of
`speculative_config.enforce_eager`, we need to take care and remove it
once vllm supports this feature.

### Does this PR introduce _any_ user-facing change?
N/A

### How was this patch tested?
by ci

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants