-
Notifications
You must be signed in to change notification settings - Fork 148
[M4]: Add M4 end2end support and qwen3 examples #2011
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
Open
yaoyu-33
wants to merge
85
commits into
main
Choose a base branch
from
m4/5_initialize
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3,224
−207
Conversation
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
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
# Conflicts: # src/megatron/bridge/training/eval.py # src/megatron/bridge/training/gpt_step.py
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: Yu Yao <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
# Conflicts: # src/megatron/bridge/training/tensor_inspect.py # src/megatron/bridge/training/train.py # tests/unit_tests/models/test_gpt_full_te_layer_autocast_spec.py
Signed-off-by: yaoyu-33 <[email protected]>
Contributor
|
Hi, @yaoyu-33, can you add subscription "x. Optimizer Updates" in pr readme. |
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.
Summary
This PR introduces Local Parallel Groups support for Megatron-Bridge, enabling the use of
ProcessGroupCollectionpassed through functions instead of relying on Megatron-Core's global parallel state (mpu) variables.Key Features
1. New Config Flag
use_decentralized_pgflag toDistributedInitConfigProcessGroupCollectionusingHyperCommGridinstead of mpu globals2. ProcessGroupCollection Propagation
train.py,gpt_step.py,vlm_step.py) to passpg_collectionexplicitlyparallel_statedependencies from training loop3. Model Provider Updates
pg_collectionparameter toget_model()andprovide_distributed_model()4. Checkpointing Updates
ProcessGroupCollectioninstead of mpu globals5. Data Loading
setup_data_iteratorsto acceptdp_groupparameter for data shardingExamples
Added examples in
examples/recipes/local_parallel_groups/:pretrain_qwen3_simple.pyuse_decentralized_pg=Truepretrain_qwen3_with_local_parallel_groups.pyHyperCommGridandProcessGroupCollectioncreationREADME.mdUsage
Simple Approach
Use Cases
Testing
tests/unit_tests/training/test_local_parallel_groups.pytests/functional_tests/training/test_local_parallel_groups.py# Run example torchrun --nproc_per_node=8 examples/recipes/local_parallel_groups/pretrain_qwen3_simple.pyLimitations