Add MimoOptimizer for heterogeneous parallelism#4019
Merged
yashaswikarnati merged 1 commit intoNVIDIA:mainfrom Mar 25, 2026
Merged
Add MimoOptimizer for heterogeneous parallelism#4019yashaswikarnati merged 1 commit intoNVIDIA:mainfrom
yashaswikarnati merged 1 commit intoNVIDIA:mainfrom
Conversation
Contributor
|
This PR has been automatically converted to draft because all PRs must start as drafts. When you are ready for review, click Ready for Review to begin the review process. This will:
See the contribution guide for more details. |
9659951 to
6a8ff0c
Compare
yaoyu-33
approved these changes
Mar 24, 2026
Contributor
Author
|
/claude review |
5 tasks
6a8ff0c to
e48ecde
Compare
Contributor
Author
|
/ok to test e48ecde |
e48ecde to
6b743fd
Compare
Contributor
Author
|
/claude review |
jaredcasper
approved these changes
Mar 24, 2026
Adds optimizer support for MIMO models where different modules (encoder, LLM) can have different DP/TP/PP configurations. - MimoOptimizer class managing per-module MegatronOptimizer instances - Global gradient norm via all_reduce MAX across module boundaries - Module-aware gradient clipping using the global norm - Module-keyed state dicts for checkpointing - intra_dist_opt group spans full module world ["tp","cp","ep","pp","dp"] matching standard Megatron's intra_distributed_optimizer_instance_group - Assert num_distributed_optimizer_instances == 1 (multi-instance not yet supported) - HyperCommGrid.is_current_rank_in_grid() helper - Optimizer integrated into existing 1F1B schedule tests (8-GPU) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6b743fd to
bfb508d
Compare
Contributor
Author
|
/ok to test bfb508d |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/23518683621 |
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
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
Replaces #3212 (closed when base branch
pull-request/3211was deleted after #3211 merged).Adds optimizer support for MIMO models where different modules (encoder, LLM) can have different DP/TP/PP configurations.
all_reduce MAXacross module boundariesintra_dist_optgroup spans full module world["tp","cp","ep","pp","dp"]matching standard Megatron'sintra_distributed_optimizer_instance_groupnum_distributed_optimizer_instances == 1(multi-instance not yet supported)HyperCommGrid.is_current_rank_in_grid()helperTest plan
test_mimo_optimizer.py)test_baseline_2gpu)test_lm_pp3_4gpu)test_encoder_tp2_llm_tp2_pp3_8gpu,test_full_pp_8gpu)🤖 Generated with Claude Code