Repository navigation
[main] add thd sequence packing dispatcher support for main #5008
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 3 commits
f28481d
5c46612
241dc40
81e1ddc
71af71d
856a8a3
d31e983
1d3f7cd
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 |
|---|---|---|
|
|
@@ -799,6 +799,12 @@ class TransformerConfig(ModelParallelConfig): | |
| moe_permute_fusion_into_hybridep: bool = False | ||
| """Fuse token rearrangement ops during token dispatching for HybridEP.""" | ||
|
|
||
| moe_hybridep_pad_variable_tokens: bool = False | ||
|
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. Is this feature only intended to be used for sequence packing? If so it feels awkward that if a user were to enable a sequence packed dataset that produced uneven sequence lengths, they would also need to know about this knob (which doesnt mention anything about sequence packing) I think we generally want to avoid creating new configs when we could otherwise reasonably infer them from elsewhere. Could we set this path by doing something like detecting the presence of
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. Yes we expect users to turn this toggle on specifically for HybridEP + THD and we will guide our customers when should we turn this on. On the other hand, having packed sequence doesn't always mean we needs to pad if we apply offline packing and the dataset was created without the need to pad. However, the accuracy impact of doing offline packing & memory overhead concerns of always padding to max seq-len are often key factors for us to introduce this specific toggle to do minimum amount of padding while also being able to use HybridEP.
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. can we rename this and update the description to reflect this reasoning? maybe
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. I agree that documentation might need to be updated, but
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. then maybe:
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. I am okay with this one
Contributor
Author
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. renamed. |
||
| """Pad uneven local token counts to the HybridEP group maximum before dispatch. | ||
| This is needed when the frontend supplies locally packed THD inputs whose token counts | ||
| can differ across ranks, without using Megatron Core's sequence_packing_scheduler. | ||
| """ | ||
|
|
||
| moe_per_layer_logging: bool = False | ||
| """Enable per-layer logging for MoE, currently supports auxiliary loss and z loss.""" | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.