-
Notifications
You must be signed in to change notification settings - Fork 75
feat: reduce nb experts per token in moe architectures #450
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
base: main
Are you sure you want to change the base?
Conversation
a93a18c to
b3a0ac5
Compare
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.
Comment @cursor review or bugbot run to trigger another review on this PR
|
@cursor review |
simlang
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.
Love it, super straightforward algorithm. commented on some higher level stuff.
e4e719b to
04ee0cf
Compare
Description
This PR is a little tool that only acts on MoE models (for LLMs and Hunyuan3Image for now) by reducing the number of experts that are trigered for each token.
All models have been trained on a fix amount of active experts per token, and decreasing this number alter the output of the model. This idea was tested on Hunyuan3Image, gptoss_120b (for hunyaun3 image, (default is 8 out of 128 experts) 1 and 2 give very weird images: 4 experts seems ok, and yields 15% speedup. For gptoss120b, (default is 4 experts) 1 and 2 give very weird texts, and yields no speedup), but is applicable to any MoE, eg Mixtral, QwenNext, etc.
Related Issue
Fixes #(issue number)
Type of Change
How Has This Been Tested?
Checklist
Additional Notes
Notebook to test the new feature available here.