fix: Fix AutoEP DeepSeekV3 preset for split ModuleList experts#7
Open
nathon-lee wants to merge 1 commit into
Open
fix: Fix AutoEP DeepSeekV3 preset for split ModuleList experts#7nathon-lee wants to merge 1 commit into
nathon-lee wants to merge 1 commit into
Conversation
Signed-off-by: nathon <leejianwoo@gmail.com>
Owner
|
Hi @nathon-lee, |
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.
hi @tohtana could you please take a look at this PR when you have a chance? I updated the DeepSeekV3 AutoEP preset to match the actual HuggingFace expert layout and added regression coverage for the detection and repacking paths
I found the mismatch by instantiating the HuggingFace DeepSeekV3 model skeleton from config and observing that its experts are ModuleList entries with split gate_proj, up_proj, and down_proj layers rather than fused gate_up_proj weights.
Title:
Fix DeepSeekV3 AutoEP preset mismatch
Body:
DeepSeekV3 experts in HuggingFace are stored as ModuleList entries with split gate_proj, up_proj, and down_proj layers, but the previous AutoEP preset assumed fused gate_up_proj expert weights. This mismatch could cause AutoEP to fail MoE layer detection.
This PR updates the deepseek_v3 preset to match the real model structure and adds regression tests for:
DeepSeekV3-style MoE detection
ModuleList expert repacking
the old fused expert assumption failing on the same layout
Test Result