[Fix] Remove divisibility requirement between num_kv_heads and tp_size in bailing_moe#26876
Merged
youkaichao merged 2 commits intovllm-project:mainfrom Oct 15, 2025
Merged
[Fix] Remove divisibility requirement between num_kv_heads and tp_size in bailing_moe#26876youkaichao merged 2 commits intovllm-project:mainfrom
youkaichao merged 2 commits intovllm-project:mainfrom
Conversation
Signed-off-by: vito.yy <vito.yy@antgroup.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request aims to remove the divisibility requirement between num_kv_heads and tp_size in bailing_moe.py. While the change correctly removes the assertion and adjusts the calculation of num_kv_heads in BailingAttention, it introduces an inconsistency with the QKVParallelLinear layer. This layer is used by BailingAttention and still enforces a divisibility constraint, which will likely lead to an assertion failure at runtime if total_kv_heads is not divisible by tp_size (or vice-versa, depending on which is larger). This makes the fix incomplete and could cause crashes.
youkaichao
approved these changes
Oct 15, 2025
bbartels
pushed a commit
to bbartels/vllm
that referenced
this pull request
Oct 16, 2025
…e in bailing_moe (vllm-project#26876) Signed-off-by: vito.yy <vito.yy@antgroup.com> Signed-off-by: bbartels <benjamin@bartels.dev>
albertoperdomo2
pushed a commit
to albertoperdomo2/vllm
that referenced
this pull request
Oct 16, 2025
…e in bailing_moe (vllm-project#26876) Signed-off-by: vito.yy <vito.yy@antgroup.com> Signed-off-by: Alberto Perdomo <aperdomo@redhat.com>
lywa1998
pushed a commit
to lywa1998/vllm
that referenced
this pull request
Oct 20, 2025
…e in bailing_moe (vllm-project#26876) Signed-off-by: vito.yy <vito.yy@antgroup.com>
alhridoy
pushed a commit
to alhridoy/vllm
that referenced
this pull request
Oct 24, 2025
…e in bailing_moe (vllm-project#26876) Signed-off-by: vito.yy <vito.yy@antgroup.com>
0xrushi
pushed a commit
to 0xrushi/vllm
that referenced
this pull request
Oct 26, 2025
…e in bailing_moe (vllm-project#26876) Signed-off-by: vito.yy <vito.yy@antgroup.com> Signed-off-by: 0xrushi <6279035+0xrushi@users.noreply.github.com>
0xrushi
pushed a commit
to 0xrushi/vllm
that referenced
this pull request
Oct 26, 2025
…e in bailing_moe (vllm-project#26876) Signed-off-by: vito.yy <vito.yy@antgroup.com> Signed-off-by: 0xrushi <6279035+0xrushi@users.noreply.github.com>
rtourgeman
pushed a commit
to rtourgeman/vllm
that referenced
this pull request
Nov 10, 2025
…e in bailing_moe (vllm-project#26876) Signed-off-by: vito.yy <vito.yy@antgroup.com>
devpatelio
pushed a commit
to SumanthRH/vllm
that referenced
this pull request
Nov 29, 2025
…e in bailing_moe (vllm-project#26876) Signed-off-by: vito.yy <vito.yy@antgroup.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
The previous implementation in bailing_moe.py required that num_kv_heads be divisible by tp_size, which restricted the valid options for tp_size. This PR addresses and fixes that limitation.