-
-
Notifications
You must be signed in to change notification settings - Fork 11.9k
[Model] Fix bailing_moe accuracy problem #28277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: zhaozx-cn <[email protected]>
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run You ask your reviewers to trigger select CI tests on top of Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add If you have any questions, please reach out to us on Slack at https://slack.vllm.ai. 🚀 |
There was a problem hiding this 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 an accuracy issue in the bailing_moe model when using an all-to-all communication strategy for Mixture-of-Experts. The change replaces an unconditional tensor_model_parallel_all_reduce with a call to self.experts.maybe_all_reduce_tensor_model_parallel. This correctly delegates the decision of whether to perform an all-reduce to the MoE layer, which is aware of the communication strategy being used. This prevents an unnecessary and incorrect reduction when all-to-all is active, resolving the accuracy problem. The change is clean, targeted, and improves both correctness and design by centralizing the reduction logic. It also brings bailing_moe in line with other MoE models in the repository.
Signed-off-by: zhaozx-cn <[email protected]>
heheda12345
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Signed-off-by: zhaozx-cn <[email protected]>
Co-authored-by: hwhaokun <[email protected]> Signed-off-by: zhaozx-cn <[email protected]>
Signed-off-by: zhaozx-cn <[email protected]>
Signed-off-by: zhaozx-cn <[email protected]> Signed-off-by: George D. Torres <[email protected]>
Signed-off-by: zhaozx-cn <[email protected]> Signed-off-by: Bram Wasti <[email protected]>
Signed-off-by: zhaozx-cn <[email protected]>
Signed-off-by: zhaozx-cn <[email protected]>
Signed-off-by: zhaozx-cn <[email protected]> Signed-off-by: Xingyu Liu <[email protected]>
Signed-off-by: zhaozx-cn <[email protected]>
Purpose
When using all2all-based MoE strategy in vllm-ascend, there is no need to do all-reduce after SharedFusedMoE forward. Applying maybe_all_reduce_tensor_model_parallel could fix accuracy problem, as it did for other MoE models like glm4_moe and deepseek_v2.
Test Plan
No need to add new test.
Test Result
all tests should pass
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.