-
Notifications
You must be signed in to change notification settings - Fork 655
TOP9 mix-placement #4881
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?
TOP9 mix-placement #4881
Conversation
Signed-off-by: Che Ruan <[email protected]> Update fused_moe.py Signed-off-by: Che Ruan <[email protected]> Update patch_deepseekv3.py Signed-off-by: Che Ruan <[email protected]> Update patch_deepseekv3.py Signed-off-by: Che Ruan <[email protected]> Update vllm_adaptor.py Update moe_mlp.py Update moe_mlp.py Update eplb_device_transfer_loader.py Update patch_deepseekv3.py Update fused_moe.py Update w8a8_dynamic.py Update w8a8_dynamic.py Update patch_deepseekv3.py
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 introduces a 'mix-placement' strategy for Mixture-of-Experts models, primarily targeting DeepSeek V3 on Ascend hardware. This approach treats shared experts as if they were routed experts, affecting weight loading and inference logic. The changes are spread across configuration, the MoE layer implementation, expert selection logic, and a new patch for vLLM's DeepSeek model implementations. While the overall implementation appears consistent with the goal, I've identified a critical bug in the quantization logic due to a typo and a hardcoded magic number in the expert selection logic that should be refactored for better maintainability.
|
👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:
If CI fails, you can run linting and testing checks locally according Contributing and Testing. |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Mercykid-bash <[email protected]>
Removed copyright notice and updated code formatting.
Removed unused import statement for Iterable.
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Feature: Support Top9 Mixed Placement for Shared & Router Experts
Overview
This PR implements core modifications to enable Top9 mixed placement of shared experts and router experts in the MOE (Mixture of Experts) architecture, with the goal of maximizing performance gains from EPLB (Expert Load Balancer) by optimizing expert deployment and inference computation.
Key Changes
1. Shared Expert Weight Loading
2. Top9 Routing Selection Enhancement
3. Mixed Placement Inference Computation
4. EPLB Performance Optimization
Technical Details
[num_layers, ep_size, 9](compatible with 257 total experts: 256 router + 1 shared)Performance Impact
Compatibility