Repository navigation
[Dev] Hybrid Data x Context Parallelism Feature #2054
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
pablo-garay
merged 90 commits into
NVIDIA:dev
from
parthmannan:pmannan/hybrid_dp_cp_feature
Dec 4, 2025
Merged
Changes from 72 commits
Commits
Show all changes
90 commits
Select commit
Hold shift + click to select a range
d50a125
Start heterogeneous CP idea prototyping
parthmannan 676f0bf
Add current_cp_assignment and some supporting code
parthmannan 65a24cc
Add bricks for building heterogeneous CP schedules
parthmannan 0c5fa39
Return sub-sample per CP rank count to schedules
parthmannan 8546b0f
Move wrapper to utils and formatting
parthmannan b17a2a2
Add TransformerConfig and arguments
parthmannan 98f592a
Fix implementation issues [WIP]
parthmannan 552bd27
Add sharding logic and packed_seq_params attribute for TE support
parthmannan 48913d0
Protect attention shape change logic with THD assumption
parthmannan 056055c
Add sharding logic and TODO for sync across multiple microbatches
parthmannan f069e0d
Merge branch 'main' of https://gitlab-master.nvidia.com/ADLR/megatron…
parthmannan 8d34369
Updates to working milestone 1 Hybrid CP scheduling
parthmannan 771fc21
Add SFT dataset support
parthmannan 3a7e50a
New updates to use DataIterator wrapper
parthmannan bd2321d
Test scripts
parthmannan 6a1ab4f
Minor fixes
parthmannan e01583a
SFT Dataset + GPT with Hybrid CP working example
parthmannan 286129c
Remove new SFT loss calculation in favor of regular loss calc
parthmannan 2674be8
Milestone 2: Add global batch scheduling, data movement and training
parthmannan 3b87385
Fix for 0 seq len in data
parthmannan bd04cfe
Fix fill_empty_gpus workload assignment
parthmannan 160f514
llama3 8B benchmarking script
parthmannan b0eb325
Bug fix
parthmannan eccf31d
Merge branch 'main' of ssh://gitlab-master.nvidia.com:12051/ADLR/mega…
parthmannan 7e9fe90
Revert "ADLR/megatron-lm!3963 - SFT chat template and pad token chang…
parthmannan b635d15
Turn on legacy tokenizer
parthmannan dc8139f
chore: Format files
69ef399
Remove scheduled id and other finished TODO items
parthmannan b37e3f7
Merge branch 'pmannan/hetero_cp_test_sft' of ssh://gitlab-master.nvid…
parthmannan 3bafa2c
Formatting and cleanup
parthmannan 78dec32
Add copyright
parthmannan 6b1d9c4
Start testing
parthmannan 71c2966
chore: Format files
bff834c
Fix arg name in test
parthmannan 2860324
Merge branch 'pmannan/hetero_cp_test_sft' of ssh://gitlab-master.nvid…
parthmannan ff5600b
Fix arg name in test
parthmannan 7ff37e5
Update RoPE logic to handle none packed_seq_params
parthmannan 3c1f66a
Fix test import
parthmannan aa6c7f7
chore: Format files
9d761cc
fix some bugs and support TP
xiaoyao0115 7d6c2b1
fix pad issue, should pad for sequence parallel when TP>1 and conside…
xiaoyao0115 fbdfe18
little adjustment according to comments
xiaoyao0115 8e6aa49
little fix to loop parameter
xiaoyao0115 f050f54
disable cudagraph anb fsdp when using hybrid cp
xiaoyao0115 1e76e8e
Add cp comm type to dynamic CP attn
parthmannan ab8dc81
Merge branch 'main' of ssh://gitlab-master.nvidia.com:12051/ADLR/mega…
parthmannan 3a39a3a
Cleanup
parthmannan cb72e4e
Removing benchmarking scripts for MR
parthmannan aeb9e36
Merge branch 'main' of ssh://gitlab-master.nvidia.com:12051/ADLR/mega…
parthmannan 6aebf37
Restore SFT dataset/tokenizer to main
parthmannan f5c0e76
Update pre-train script
parthmannan 9d96178
Lint change
parthmannan b7aff32
chore: Format files
994e65f
Add assert
parthmannan f60bfdd
Merge branch 'pmannan/hybrid_dp_cp_feature' of ssh://gitlab-master.nv…
parthmannan aa6cf10
Add support for Yarn Rope
parthmannan f3a6e17
Add support for MultimodalRope
parthmannan a0fb848
General and RoPE support cleanup
parthmannan b0b0fab
Data sampler cleanup
parthmannan 335994c
chore: Format files
ba99cad
Cleanup hybrid_cp_schedule
parthmannan d3c0c03
lint fixes
parthmannan 1712980
Fix MLA + Yarn calls
parthmannan 62817e8
chore: Format files
e586fa4
ProcessGroupCollection.use_mpu_process_groups() doesn't initialize dp…
kunlunl 4221bdc
Fix num_microbatches always being 0
kunlunl 0856c61
Raise error when not using per-token loss
kunlunl d2db69e
Minor fix
parthmannan 627753b
Address comments
parthmannan a3b5ebe
Lint
parthmannan 1c22f5c
chore: Format files
9c75535
Merge branch 'dev' of https://github.com/NVIDIA/Megatron-LM into pman…
parthmannan 97d8224
Merge branch 'dev' of github.com:NVIDIA/Megatron-LM into pmannan/hybr…
parthmannan 617fb17
Fix import
parthmannan e95ae83
Move Dataloader wrapper to core/datasets
parthmannan 0a0339a
Formatting
parthmannan 4af66dd
Fix conflict
parthmannan 35a86a3
Fixes and address comments
parthmannan bf7e2ac
Lint fix
parthmannan 2497931
Merge branch 'dev' of github.com:NVIDIA/Megatron-LM into pmannan/hybr…
parthmannan aa3858d
Lint fix
parthmannan 60234b3
Fix TP hanging issue
kunlunl e2a32cb
Merge branch 'dev' of github.com:NVIDIA/Megatron-LM into pmannan/hybr…
parthmannan 0ba6f2c
Packed seq in DSA arg match
parthmannan d53c323
Lint
parthmannan 66404ca
Mamba script fix
parthmannan 70b9758
Merge branch 'dev' of github.com:NVIDIA/Megatron-LM into pmannan/hybr…
parthmannan 9387269
API check fix
parthmannan 2bde6c8
API check parallel_state
parthmannan 604ddd2
Merge branch 'dev' of github.com:NVIDIA/Megatron-LM into pmannan/hybr…
parthmannan 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
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.
Uh oh!
There was an error while loading. Please reload this page.