Update cohere2_moe tp_plan#46189
Merged
Merged
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
3outeille
approved these changes
May 25, 2026
33846c2 to
97614fa
Compare
ArthurZucker
approved these changes
May 25, 2026
| super().__init__(*args, **kwargs) | ||
| self.layer_types = ["full_attention", "sliding_attention"] | ||
| self.first_k_dense_replace = 1 # first layer will be MLP, 2nd will be MoE | ||
| self.logit_scale = 1.0 # needed for `test_training_overfit` - otherwise the loss does not go down fast enough |
Collaborator
There was a problem hiding this comment.
can you put it in CausalLMModelTester pretty sure other models might hav ethis issue no?
Member
Author
There was a problem hiding this comment.
Other cohere models do not need it for the loss to go down... So I'd rather keep this isolated to cohere2_moe!
Contributor
|
[For maintainers] Suggested jobs to run (before merge) run-slow: cohere2_moe |
vasqu
added a commit
that referenced
this pull request
May 28, 2026
* Revert "init FSDP through from_pretrained (#46102)" This reverts commit 0588858. * Revert "Fix FSDP2 and distributed checkpointing imports for older PyTorch versions (#46141)" This reverts commit 634500b. * Revert "Update cohere2_moe tp_plan (#46189)" This reverts commit e65c3a2. * Revert "FSDP + TP & native save/load distributed (#45028)" This reverts commit 9ba8e85. * fix * they should have been deleted I think * these are actually needed changes * oops
kaixuanliu
pushed a commit
to kaixuanliu/transformers
that referenced
this pull request
May 28, 2026
* update * fix * dynamic * fix * fix * switch in config * in tests as well * oupsi * add doc * oupsi * fix
yuchenxie4645
pushed a commit
to yuchenxie4645/transformers
that referenced
this pull request
May 28, 2026
* update * fix * dynamic * fix * fix * switch in config * in tests as well * oupsi * add doc * oupsi * fix
yuchenxie4645
pushed a commit
to yuchenxie4645/transformers
that referenced
this pull request
May 28, 2026
* Revert "init FSDP through from_pretrained (huggingface#46102)" This reverts commit 0588858. * Revert "Fix FSDP2 and distributed checkpointing imports for older PyTorch versions (huggingface#46141)" This reverts commit 634500b. * Revert "Update cohere2_moe tp_plan (huggingface#46189)" This reverts commit e65c3a2. * Revert "FSDP + TP & native save/load distributed (huggingface#45028)" This reverts commit 9ba8e85. * fix * they should have been deleted I think * these are actually needed changes * oops
kashif
pushed a commit
to kashif/transformers
that referenced
this pull request
Jun 1, 2026
* update * fix * dynamic * fix * fix * switch in config * in tests as well * oupsi * add doc * oupsi * fix
kashif
pushed a commit
to kashif/transformers
that referenced
this pull request
Jun 1, 2026
* Revert "init FSDP through from_pretrained (huggingface#46102)" This reverts commit 0588858. * Revert "Fix FSDP2 and distributed checkpointing imports for older PyTorch versions (huggingface#46141)" This reverts commit 634500b. * Revert "Update cohere2_moe tp_plan (huggingface#46189)" This reverts commit e65c3a2. * Revert "FSDP + TP & native save/load distributed (huggingface#45028)" This reverts commit 9ba8e85. * fix * they should have been deleted I think * these are actually needed changes * oops
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.
What does this PR do?
Since #46115 was merged to be released in 5.9 without #45028, the tp_plan was still using the old format. This PR updates it.