Skip to content

[Bugfix] Fix DeepseekV32 AssertionError: num_kv_heads == 1#33090

Merged
NickLucche merged 1 commit intovllm-project:mainfrom
NickLucche:fix-ds32-kv-shape
Jan 27, 2026
Merged

[Bugfix] Fix DeepseekV32 AssertionError: num_kv_heads == 1#33090
NickLucche merged 1 commit intovllm-project:mainfrom
NickLucche:fix-ds32-kv-shape

Conversation

@NickLucche
Copy link
Copy Markdown
Collaborator

Fix #33086

Signed-off-by: NickLucche <nlucches@redhat.com>
@NickLucche NickLucche requested a review from ApostaC as a code owner January 26, 2026 12:12
@mergify mergify bot added deepseek Related to DeepSeek models bug Something isn't working kv-connector labels Jan 26, 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 addresses a bug that caused an AssertionError: num_kv_heads == 1 with certain models, such as DeepseekV32. The root cause was a hardcoded num_kv_heads=4 used for probing the KV cache layout. The fix changes this value to 1, which is a more robust and general choice compatible with various attention architectures, including MQA. This change correctly resolves the reported assertion error without introducing any negative side effects. The implementation is sound.

@NickLucche
Copy link
Copy Markdown
Collaborator Author

cc @chaunceyjiang

@chaunceyjiang
Copy link
Copy Markdown
Collaborator

lgtm

@NickLucche NickLucche enabled auto-merge (squash) January 27, 2026 13:11
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Jan 27, 2026
@NickLucche NickLucche merged commit 492a798 into vllm-project:main Jan 27, 2026
57 of 58 checks passed
VedantMadane pushed a commit to VedantMadane/vllm that referenced this pull request Jan 28, 2026
…oject#33090)

Signed-off-by: NickLucche <nlucches@redhat.com>
Signed-off-by: Vedant Madane <6527493+VedantMadane@users.noreply.github.com>
khluu pushed a commit that referenced this pull request Jan 28, 2026
Signed-off-by: NickLucche <nlucches@redhat.com>
(cherry picked from commit 492a798)
apd10 pushed a commit to apd10/vllm that referenced this pull request Jan 31, 2026
ItzDEXX pushed a commit to ItzDEXX/vllm that referenced this pull request Feb 19, 2026
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 kv-connector 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.

3 participants