-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Expert Parallelism (EP) Support for DeepSeek V2 #12583
base: main
Are you sure you want to change the base?
Conversation
👋 Hi! Thank you for contributing to the vLLM project. 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 do one of these:
🚀 |
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.
Left some comment but overall LGTM
need to check the user-interface, but I feel right now we can just reuse the tp size for ep? in the future, when we have DP, EP size will automatically be DP x TP. |
can you please elaborate on this, a bit? MLA + CUDA graphs + TP is working fine on main as far as I am aware |
@youkaichao The current design support TP within an EP, but we can easily change that to have EP only on MoE layers. I think we will need more discussion with others on that design decision, the current implementation of EP+TP is based on a discussion with @WoosukKwon and @simon-mo. @LucasWilkinson I just merged the main branch and CUDA graph is now working with EP+TP. |
The current vLLM execution only supports TP when running MoE models.
This PR adds support for Expert Parallelism (EP) for the FusedMoE Kernel and DeepSeek V2 model, which should be extendable to V3 and other MoE models as well.
Use
–expert_parallel_size
engine argument to specify the EP size the FuseMoE kernel uses.Currently does not work with CUDA graph, but the problem with CUDA graph seems to be on the current attention layer (MLA?) implementation. I tried CUDA graph + EP on the previous attention layer implementation (commit 60284b5), and it works fine.
Doc