Add DP-balanced sequence-packing scheduler and wrap_data_iterator entry point - #6684
Queued
ilml wants to merge 1 commit into
Queued
Add DP-balanced sequence-packing scheduler and wrap_data_iterator entry point#6684ilml wants to merge 1 commit into
ilml wants to merge 1 commit into
Conversation
Contributor
Author
|
/ok to test e3923e7 |
…ry point Split 5/10 from NVIDIA#3386 (sequence packing / THD E2E support). Adds BasePackingScheduler, DpBalancedScheduler, PackingSchedulerEnum, the wrap_data_iterator entry point, docs, and the wrap_dataloader unit tests. Original changes by @xiaoyao0115 in NVIDIA#3386. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: ilml <tolong@nvidia.com>
ilml
marked this pull request as ready for review
August 19, 2026 21:22
jaredcasper
approved these changes
Aug 19, 2026
Phlip79
approved these changes
Aug 19, 2026
dimapihtar
approved these changes
Aug 20, 2026
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.
What does this PR do?
Adds the DP-balanced sequence-packing scheduler and the
wrap_data_iteratorentry point tomegatron/core/datasets/data_schedule.py, plus documentation and unit tests. Megatron Core changes only — no training-loop or entry-point wiring (those follow in later PRs of the series).Part of the #3386 split series tracked in the Dynamic Context Parallelism project. Original changes by @xiaoyao0115 in #3386.
GPTDatasetConfigfields already merged in Add data-schedule utilities and GPTDatasetConfig fields for sequence packing #5903. Nothing else in the series is required.wrap_data_iteratorinto the training loop.Changes
megatron/core/datasets/data_schedule.pySequencePackingScheduler(DP-balanced) +wrap_data_iterator(+395)megatron/core/datasets/readme.mdtests/unit_tests/test_sequence_packing.pyContribution process
Series status (updated)
Remaining PRs of the #3386 split, tracked in the Dynamic Context Parallelism project. Reviews run in parallel; merge order:
Merged so far: #5901, #5903, #5908, #6625.