-
-
Notifications
You must be signed in to change notification settings - Fork 11.6k
[Bugfix][DeepSeek Fix config used for DeepseekV2 Eagle #25953
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: Tyler Michael Smith <[email protected]>
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 correctly fixes a bug in the DeepseekV2 Eagle speculative decoding implementation. Previously, the draft model's decoder layers were incorrectly using the verifier model's configuration. The changes introduce an optional config parameter to the DeepseekV2DecoderLayer initializer, allowing the correct draft model configuration to be passed. The implementation maintains backward compatibility by falling back to the verifier model's configuration when the new parameter is not provided. The fix is well-implemented and aligns with similar corrections in the codebase.
| DeepseekV2DecoderLayer( | ||
| vllm_config, | ||
| prefix=maybe_prefix(prefix, f"layers.{i + start_layer_id}"), | ||
| config=self.config, |
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.
Should this also be applied in deepseek_mtp.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.
I didn't touch deepseek_mtp.py because even prior to #24134, it passed in the verifier model config rather than the draft model... I guess it was always broken?
benchislett
left a comment
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.
config needs to be added at the end of DeepseekV2DecoderLayer's constructor, because deepseek_mtp.py passes the arguments positionally
| self.mtp_block = DeepseekV2DecoderLayer(vllm_config, prefix, |
|
closing in favor of #25987 |
We are using the verifier model's config instead of the draft model's config when using Eagle for Deepseek.
Introduced in #24134. Similar issue for llama3 was fixed in #25883.