-
Notifications
You must be signed in to change notification settings - Fork 278
rm router logits Improve TTOP 3ms #1407
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 4 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
72aeb69
rm router logits Improve TTOP 3ms
ttanzhiqiang 04ad4c2
update
ttanzhiqiang f13442e
update
ttanzhiqiang db520cd
Merge branch 'main' into rm_router_logits
ttanzhiqiang 4c8954a
Merge branch 'main' into rm_router_logits
ttanzhiqiang 86df0a2
deepseekv3/r1 support rm_router_logits in [AllGatherEP, AllGather, Na…
ttanzhiqiang 2f77bc9
deepseekv3/r1 support rm_router_logits in [AllGatherEP, AllGather, Na…
ttanzhiqiang 6f18307
deepseekv3/r1 support rm_router_logits in [AllGatherEP, AllGather, Na…
ttanzhiqiang cb15e05
deepseekv3/r1 support rm_router_logits in [AllGatherEP, AllGather, Na…
ttanzhiqiang d8755c9
deepseekv3/r1 support rm_router_logits in [AllGatherEP, AllGather, Na…
ttanzhiqiang e0c36a8
deepseekv3/r1 support rm_router_logits in [AllGatherEP, AllGather, Na…
ttanzhiqiang 9e15f42
deepseekv3/r1 support rm_router_logits in [AllGatherEP, AllGather, Na…
ttanzhiqiang a595a67
deepseekv3/r1 support rm_router_logits in [AllGatherEP, AllGather, Na…
ttanzhiqiang eedcd05
Merge branch 'main' into rm_router_logits
ttanzhiqiang fa50f6a
deepseekv3/r1 support rm_router_logits in [AllGatherEP, AllGather, Na…
ttanzhiqiang e4fc29f
Empty submission
ttanzhiqiang a0be155
Empty submission
ttanzhiqiang 89458f0
Merge branch 'main' into rm_router_logits
ttanzhiqiang af900cc
update
ttanzhiqiang 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
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.
from Q3, we'll be careful to add more configuration. please remove it to enable rm_router_logits by default.
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.
This is only valid in the FusedMoEState.AllGather solution. If other models use gate externally and rm_router_logits internally, an error will be reported, such as deepseek_dbo/qwen3/qwen2
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.
Agree, could we enable this in some cases automatically, because it's difficult to let users know which models should enable this env or not.
Otherwise, LGTM
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.
In theory, this solution is only applicable to AllGather and AllGatherEP, because in the dp scenario, the previous operation was gate + two communications, and now it is changed to one communication + gate operation, which can save some communication time. In theory, all moe AllGather and AllGatherEP solutions can follow this logic, but now other moe models (qwen3-235b) dp solutions are not adjusted, so use the switch to control it to prevent code errors.
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 it's not common, I prefer not to merge, we can wait more.
Or, if we can add more logic check instead of env var, i'm fine as well.
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.
ok, currently m is enabled by default in the AllGather, AllGatherEP and NaiveMulticast scenarios of the deepseek model. rm_router_logits is not enabled in other scenarios and models. You can add it later if necessary.