Repository navigation
feat(policy): bound physical-row dispatch and chunk packed wire broadcasts - #5518
Open
jinglinglingling wants to merge 2 commits into
Open
jinglinglingling wants to merge 2 commits into
jinglinglingling wants to merge 2 commits into
Conversation
1 task done
jinglinglingling
force-pushed
the
linglinj/pr-a-dispatch-and-broadcast
branch
from
December 3, 2026 01:11
8a47876 to
eb51595
Compare
Partition SC train and logprob metadata before sharding, respecting DP and static microbatch alignment. Accumulate the partitions into the caller's existing train step and wait for each fanout before materializing more rows. Signed-off-by: Linglin Jing <[email protected]>
Stage CPU packed data through a reusable collective-device buffer, and rebuild CUDA payloads on each follower's own device. Exercise chunk boundaries on the int16 byte wire for Gloo and NCCL. Signed-off-by: Linglin Jing <[email protected]>
jinglinglingling
force-pushed
the
linglinj/pr-a-dispatch-and-broadcast
branch
from
December 4, 2026 01:43
eb51595 to
a649c98
Compare
Contributor
Author
|
/ok to test a649c98 |
This branch has not been deployed
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 and why
Split out from #4581 per review feedback so the general policy/data-plane memory-bounding changes can be reviewed and verified independently.
nemo_rl/models/policy/tq_policy.py,nemo_rl/models/policy/__init__.py)max_physical_rows_per_dispatchandmax_physical_rows_per_logprob_dispatchtoPolicyConfigto split large multi-turn/multimodal physical-row batches across multipletrain_microbatches_from_meta/ logprob worker calls instead of materializing every row's media payloads on every worker simultaneously._dispatch_row_alignment): requires divisibility bydp_worldwhen sequence packing or dynamic batching is enabled, and bydp_world * micro_batch_size(ordp_world * logprob_batch_sizefor logprobs) under static batching, raising a clearValueErrorotherwise instead of silently producing uneven or invalid shards.nemo_rl/data_plane/worker_mixin.py)tests/unit/models/policy/test_split_api_wrappers.py,tests/unit/data_plane/test_leader_broadcast.py)shard_meta_for_dpfor static batching, sequence packing, and logprob dispatch, plus explicit misalignment rejection tests (e.g.,DP=8, 40 rows, limit=30and staticDP=4, mbs=2, limit=12), and verifies chunked wire broadcast behavior.Issues
Split from #4581.
Convergence / perf / functionality proof
rl.nightlycontainer:pytest tests/unit/models/policy/test_split_api_wrappers.py tests/unit/data_plane/test_leader_broadcast.py: 43 passed, 8 skipped (2-GPU NCCL tests on single-GPU node).ruff checkandruff format --checkpass on all modified files.None), dispatch behavior is unchanged.Needs upstream changes
None.