-
Notifications
You must be signed in to change notification settings - Fork 22.7k
Add arch support for cohere2-MoE #24260
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
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
d03b03b
Add arch support for cohere2-MoE
michaelw9999 14581b8
Removed redundant gating_func checks
michaelw9999 b5a360a
Changed ffn lookup to prefer prefix_dense_intermediate_size
michaelw9999 df2bd77
Renamed arch to cohere2moe
michaelw9999 c4b4436
Removed redundant lmhead check and chat template changes
michaelw9999 04d20e7
Removed lm_head.weight check from modify tensors, load output tensor …
michaelw9999 7fdcf06
Changed to (routed+shared)*0.5 for shared expert combined avg
michaelw9999 c8e57a2
fixed sliding_window_pattern issue and pattern
michaelw9999 f5a68ed
Fixed transformers crash 'first_k_dense_replace' error
michaelw9999 ac49f84
Remove comment
michaelw9999 0eada9a
Removed cohere2-moe as a tokenizer type and kept as tiny_aya. Rename…
michaelw9999 16b538e
Fixed MTP fail, changed to use iSWA
michaelw9999 2720615
Fixed remaining todos: cohere2moe renamed, changed swa parsing to use…
michaelw9999 87f2fbb
Force metadata usage
michaelw9999 fc2dbeb
Remove Cohere2 checkpoint comment
michaelw9999 691fc6c
Remove MTP comment
michaelw9999 cebf758
Regenerate cohere2moe tokenizer hash
michaelw9999 12692d6
Add cohere2moe to Llama Model Saver supported list
michaelw9999 00487aa
Check for zerobios tensors and add support for Command to use LayerNorm
michaelw9999 9c38245
Map expert_selection_fn to sigmoid in base.py instead of command.py
michaelw9999 d932047
use bools for foundnorm/foundnormrms
michaelw9999 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Am I missing something, I can't see any
Cohere2Moemodels with MTP?Uh oh!
There was an error while loading. Please reload this page.
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.
If this has not changed I suggest removing the MTP code.
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.
So, what's the status on MTP?
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.
Well, the current code at least works and loads the tensors and runs:
My tool's old way used self distillation but been working on a bunch of improvements to that, now it's using cached hidden states directly from the gguf during runtime to train the MTP, it's a lot faster than how I was doing it before. I can try it again with North and see if I can get better performance the 2nd time around, see what I can get in the next few hours or give it up for now on Cohere
Uh oh!
There was an error while loading. Please reload this page.
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.
With EAGLE3 support merged into llama.cpp now, what would be the advantage of a post-trained MTP drafter? I thought the main advantage of MTP was that it was trained in sync with the model during the original training. People often train EAGLE3 drafters for new models after the fact.
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.
@michaelw9999 ping