-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Model] MTP fallback to eager for DeepSeek v32 #25982
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: Lu Fang <[email protected]>
Signed-off-by: Lu Fang <[email protected]>
69b3255
to
f3536c6
Compare
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 fallback to eager execution mode for DeepSeek v32 models when using Medusa-style Token Prediction (MTP) for speculative decoding. This is a temporary measure to address an issue where CUDA graph is not yet supported for this specific combination.
The changes are well-contained and logical:
- A new
enforce_eager
flag is added toSpeculativeConfig
to allow overriding the default execution mode. - This flag is automatically enabled for DeepSeek v32 models when MTP is used.
- The
EagleProposer
, which handles MTP, now checks this flag to disable CUDA graph when necessary.
The implementation is correct and effectively resolves the issue described. The changes are specific to the problematic configuration and should not affect other models or execution paths. Overall, this is a good, targeted fix.
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; thanks!
Signed-off-by: Lu Fang <[email protected]>
Signed-off-by: Lu Fang <[email protected]>
Signed-off-by: Lu Fang <[email protected]>
276e573
to
ef7e8d4
Compare
Signed-off-by: Nick Hill <[email protected]>
@luccafong fyi I pushed a similar fix that was needed to |
thx! |
Signed-off-by: Lu Fang <[email protected]> Signed-off-by: simon-mo <[email protected]>
Purpose
Test Plan
Test Result
Note: it takes 9:58 with MTP, w/o MTP it is 12:08 (25% speedup)
Essential Elements of an Effective PR Description Checklist
supported_models.md
andexamples
for a new model.