Repository navigation
feat(core): support shared-prefix training trees with context parallelism - #7387
Draft
arnavkomaragiri wants to merge 1 commit into
Draft
arnavkomaragiri wants to merge 1 commit into
arnavkomaragiri wants to merge 1 commit into
Conversation
This was referenced Sep 16, 2026
Draft
…lism Signed-off-by: Arnav Komaragiri <akomaragiri@nvidia.com>
arnavkomaragiri
force-pushed
the
akomaragiri/mcore-shared-prefix-cp-20260915
branch
from
September 17, 2026 17:38
7fa19a3 to
6085ca3
Compare
This was referenced Sep 17, 2026
Open
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.
PR Dependencies
Depends on: none within this stack.
Required by: NVIDIA-NeMo/RL#4147.
Summary
Add opt-in shared-prefix training through
TreePackedSeqParams, leaving ordinary packed sequences on their existing path.The trainer owns exact-call compatibility, fragment sizing, and loss ownership. No dense arbitrary attention mask or benchmark-specific logic is introduced in MCore.
Dependencies
Design discussion: #7386.
This is the sole MCore change required by the RL stack. Gradient-buffer lifecycle and optional MTP bypass are owned by NVIDIA-NeMo/RL#4147, using existing upstream APIs. No changes to
TransformerConfigor gradient offload are included.For Hybrid models with MTP, the caller must explicitly disable auxiliary computation using the existing
compute_mtp_loss=Falseforward argument. MTP-bearing GPT training with tree packing is rejected; this PR does not add a GPT MTP bypass.Validation And Known Limitations
54c62dfb6852e9218bf38590be9b90930bf7d589.Review Status
Draft for author/design review only. Not ready for merge or reviewer assignment. The supported model/backend combinations and final upstream reconciliation remain readiness items.