Skip to content

[Bugfix] Fix DeepSeek V2-Lite Accuracy drop#40673

Merged
robertgshaw2-redhat merged 4 commits intovllm-project:mainfrom
neuralmagic:weird-fix
Apr 23, 2026
Merged

[Bugfix] Fix DeepSeek V2-Lite Accuracy drop#40673
robertgshaw2-redhat merged 4 commits intovllm-project:mainfrom
neuralmagic:weird-fix

Conversation

@bnellnm
Copy link
Copy Markdown
Collaborator

@bnellnm bnellnm commented Apr 23, 2026

Purpose

Fix DeepSeek V2-Lite Accuracy drop introduced by #40560

Test Plan

Run bash .buildkite/scripts/scheduled_integration_test/deepseek_v2_lite_ep_eplb.sh 0.25 200 8010
Ran + verified all models from #39956
CI MoE Refactor tests

Test Result

Accuracy went from 0.02 -> 0.35

cc @robertgshaw2-redhat


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.

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@mergify mergify Bot added deepseek Related to DeepSeek models bug Something isn't working labels Apr 23, 2026
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 replaces the _fused_output_is_reduced property with an instance attribute initialized in __init__ and _replace_quant_method. A critical issue was identified regarding the timing of this initialization: since the moe_kernel is typically lazily initialized during the first forward pass, caching the value in __init__ will likely result in a stale False value. This could lead to correctness issues, such as the double reduction of fused outputs, because the attribute will not reflect the kernel's state once it is actually loaded.

Comment thread vllm/model_executor/layers/fused_moe/runner/moe_runner.py Outdated
bnellnm added 2 commits April 23, 2026 16:25
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Comment thread vllm/model_executor/layers/fused_moe/runner/moe_runner.py
This is the "early" all-reduce path. When the combine kernel produces
already-reduced fused output, shared output must be reduced separately
to match.
If sequence parallelism is not enabled and the and the combine kernel
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should move the SP reductiuon into the runner soon

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Apr 23, 2026

Hi @bnellnm, the pre-commit checks have failed. Please run:

uv pip install pre-commit>=4.5.1
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy failing?
mypy is run differently in CI. If the failure is related to this check, please use the following command to run it locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10

bnellnm added 2 commits April 23, 2026 17:29
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
@robertgshaw2-redhat robertgshaw2-redhat enabled auto-merge (squash) April 23, 2026 17:43
@github-actions github-actions Bot added the ready ONLY add when PR is ready to merge/full CI is needed label Apr 23, 2026
@robertgshaw2-redhat robertgshaw2-redhat merged commit 4a6dd1c into vllm-project:main Apr 23, 2026
68 of 69 checks passed
@bnellnm bnellnm deleted the weird-fix branch April 24, 2026 19:40
avinashsingh77 pushed a commit to avinashsingh77/vllm that referenced this pull request Apr 27, 2026
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Avinash Singh <avinashsingh.rcoem@gmail.com>
Lafunamor pushed a commit to Lafunamor/vllm that referenced this pull request May 1, 2026
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Adrian <info@zzit.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working deepseek Related to DeepSeek 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