-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Improve expert parallelism placement #15517
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
base: main
Are you sure you want to change the base?
Conversation
👋 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 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 🚀 |
687663b
to
87c41e2
Compare
87c41e2
to
79aa5cc
Compare
Signed-off-by: Wes Medford <[email protected]>
79aa5cc
to
5e4b558
Compare
Signed-off-by: Wes Medford <[email protected]>
@tlrmchlsmth can you help review? |
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.
why does it improve performance?
Without group aware placement, there is nothing preventing all experts from the same group existing on the same rank. Because grouped topk does a group selection before expert selection, at least with DeepSeek-V3 models no experts in 4 of 8 groups are used at all in any given expert layer. In the worst case scenario where a group is entirely on one rank and the expert TopK only selects from that single group, that could mean that only one rank can process that layer. This removes that worst case and should also reduce waiting both with the current implementation where inactive experts are zeroed followed by an All-Reduce, as well as after DeepEP is implemented as it should result in better resource utilization. Technically you can still get "unlucky" and have all selected experts share the same rank (which is significantly more likely with fewer GPUs), but it should be significantly less likely than in the current implementation. |
Changes two key behaviors: