-
Notifications
You must be signed in to change notification settings - Fork 4.8k
fix: resolve b200 dsv3 mtp issue #7286
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1932,6 +1932,8 @@ def post_load_weights(self, is_nextn=False, weight_names=None): | |||||||||||
| self._weight_requant_ue8m0() | ||||||||||||
|
|
||||||||||||
| def _weight_requant_ue8m0(self): | ||||||||||||
| if self.config.architectures[0] == "DeepseekV3ForCausalLMNextN": | ||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maintainability: Consider adding a brief comment explaining why
Suggested change
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm, maybe the MTP layer also have weights that needs to be requantized thus I guess maybe change
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see. Do you mean this will affect the accept length?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes my naive guess is that, it will make nextn layer to have wrong output. But have not do any experiments and I can be totally wrong |
||||||||||||
| return | ||||||||||||
| weight_block_size = self.quant_config.weight_block_size | ||||||||||||
|
|
||||||||||||
| moe_layers = list( | ||||||||||||
|
|
||||||||||||
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.
Potential
IndexError: Accessingself.config.architectures[0]without checking ifself.config.architecturesis empty could lead to a runtime error if thearchitectureslist is unexpectedly empty (e.g., due to a malformed config). It's safer to check for non-emptiness first.