Repository navigation
[1/3] Export expert-parallel Megatron-Bridge MoE checkpoints and fix exporter / QAD gaps #2623
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 1 commit
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 |
|---|---|---|
|
|
@@ -590,6 +590,11 @@ def _sharded_state_dict(self, *args, **kwargs) -> "ShardedStateDict": | |
| # An MTP head left out of quantization is exempt from that: there is no quantization | ||
| # error to recover there, and its CE materialises an fp32 [seq, vocab] tensor. | ||
| skip_mtp_loss = _mtp_excluded_from_quantization(model) | ||
| if skip_mtp_loss: | ||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||
| # Freeze the untrained MTP head: DDP's overlapped grad reduce asserts on params with no grad. | ||
| for name, param in model.named_parameters(): | ||
| if "mtp" in name.split("."): | ||
| param.requires_grad_(False) | ||
|
Comment on lines
+593
to
+597
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. [SUGGESTION] The freeze is silent, and it is the only thing in this path that permanently changes what the user's run trains. A QAD user who sets Suggest a Two smaller notes on the same block:
|
||
|
|
||
| def _compute_student_lm_loss(self, labels, logits) -> Tensor: | ||
| self._lm_loss_call_count += 1 | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.