feat(sc): stream PPO actor and critic minibatches - #3963
Open
tianyi-zhang-02 wants to merge 3 commits into
Open
Conversation
Signed-off-by: Tianyi Zhang <123608656+tianyi-zhang-02@users.noreply.github.com>
Signed-off-by: Tianyi Zhang <123608656+tianyi-zhang-02@users.noreply.github.com>
Signed-off-by: Tianyi Zhang <123608656+tianyi-zhang-02@users.noreply.github.com>
tianyi-zhang-02
marked this pull request as ready for review
September 2, 2026 15:11
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 ?
Lets Single Controller PPO stream actor and Megatron critic minibatches from native TQ replay without materializing one merged training payload. The critic now has an explicit begin/train-chunk/finish/abort lifecycle: chunks accumulate gradients and correctly normalized diagnostics, then perform one optimizer step at the end of each critic epoch.
The controller retains replay rows through all critic and actor epochs, cleans up partial failures, skips invalid chunks, and rejects configurations whose drop budget cannot preserve data-parallel batch divisibility.
Issues
Relates to #2625.
Usage
The extended functional recipe exercises training, checkpointing, and resume:
Validation
main; Python 3.13At the final step the run had 8 valid samples / 4,034 valid tokens, actor loss
1.29e-04, critic loss2.6001, actor grad norm5.3551, critic grad norm99.6567, and no masked sequences. The resumed run's critic loss stayed in[2.6001, 4.0994]; clamped probability-ratio bounds and logprob-error checks also passed.The run used upstream
mainat9b25508a3340bffdd8e3a2245ada72279fbc15d6,nvcr.io/nvidia/nemo-rl:v0.7.0, driver 570.133.20, CUDA 12.8 compatibility runtime, and PyTorch cu130.Before your PR is "Ready for review"
Pre checks:
Additional Information
The GPU parity test exposed a real metric-normalization bug during development; the fix and a CPU regression assertion are included. This change is independent of other open contributor branches.