SingleController parity with legacy GRPO/PPO: remaining features and validation gaps
Purpose. Fill the remaining gaps between SingleController (SC) and the legacy GRPO/PPO paths, then deprecate the legacy paths once SC reaches parity. Follow-up to #2625.
Acceptance criteria. Run the existing in-scope functional/nightly/release/performance tests through SC while preserving their intended behavior and assertions. Long-context, large-scale, and performance runs are part of this acceptance work rather than separate missing-feature items. Disabling validation, changing optimizer-minibatch semantics, or skipping checks does not establish parity.
Audit method. This inventory is based on a static audit of main at 93e2791: implementations, shared worker paths, configuration inheritance, CLI overrides, and all functional/nightly/release/performance test definitions, including platform-specific and disabled entries. No GPU tests were executed during this audit. Linked tests illustrate the behavior to preserve; they do not imply that SC equivalents have passed.
Scope. This issue covers legacy GRPO/PPO workflows, including on-policy distillation. A capability is not considered missing if an SC path already supports it. Exhaustive model/backend/configuration combinations are outside this issue.
1. Missing features
- [ ] Training-time validation: periodic/start/end validation, validation-specific sampling parameters, greedy/pass@k metrics, validation-based early stopping, and checkpoint ranking. Example: DeepScaleR training and checkpoint evaluation. @yuekaizhang
- [ ] GDPO / component-wise reward advantages. Example: Gym multi-reward nightly. @bg51717
- https://github.com/NVIDIA-NeMo/RL/pull/5287
- https://github.com/NVIDIA-NeMo/RL/pull/5301
- [ ] Multiple dataloaders and their resume behavior. Example: multiple-dataloader functional test. @WenzheWang
- [ ] TRT-LLM generation backend. Example: non-colocated async functional test. @shuyixiong
- #5100
- [ ] Automodel training backend. Examples: GRPO functional test, PPO functional test. @sharonyu-115
- track issue: #5090
- [ ] Automodel online draft co-training: DSpark, DFlash, and EAGLE3. Examples: DSpark, DFlash, EAGLE3. @yuekaizhang
- [ ] NVFP4 per-token rollout. Example: GB200 per-token rollout test. @zhangyimi @sharonyu-115
- [x] Dynamic sampling. Examples: DAPO release test, ProRLv2 functional test. @RayenTian
- in-order sampler: #4588
- streaming sampler: #4784
- token capture path: https://github.com/NVIDIA-NeMo/RL/pull/5202
- [x] Reward shaping, reward scaling, and length penalty. The DAPO configuration exercises reward scaling and overlong-response shaping. SC also explicitly rejects
grpo.length_penalty. @RayenTian- reward shaping: #4882
- reward scaling: #4878
- length penalty: https://github.com/NVIDIA-NeMo/RL/pull/5206
2. Missing implementation details
- [ ]
loss_fn.seq_logprob_error_in_loss: filtering inside the training forward and normalizing gradients over surviving samples. Pre-training sequence filtering does not preserve this behavior. Example: single-forward nightly with survivor assertions. @snivertynv
3. Needs explicit SC E2E validation
These items have implementation or shared-code paths, but this audit did not establish explicit SC E2E validation for the capability itself. They are not confirmed missing features.
- [ ] SGLang generation. SC setup, async rollout, and refit plumbing exist. Example validation targets: async functional test, fault-tolerance test.
- integration: https://github.com/NVIDIA-NeMo/RL/pull/5282 @shikicloud
- integration with gym:
- [ ] Megatron EAGLE3 online co-training. Example: EAGLE3 functional test. The existing EAGLE3
tq_mooncakevariant still uses the legacy controller. - [ ] MTP co-training and speculative decoding. Example: MTP + speculative-decoding test, currently listed as disabled.
- [ ] Additional loss/advantage capabilities: Reinforce++, CISPO, adaptive-ppo-clip, seq-mask-tis, positive-example NLL, and length-adaptive GAE. Example: CISPO nightly. Validate each capability without requiring exhaustive combinations.
- [ ] Megatron LoRA. Example: async LoRA functional test. @WEIXILIN0307
- [ ] Quantization capabilities: FP8 training/rollout, FP8 KV cache, MXFP8 rollout/refit, and ModelOpt QARL. Example validation targets: FP8 E2E nightly, ModelOpt functional test, MXFP8 zero-KL test.
- ModelOpt QARL track issue: https://github.com/NVIDIA-NeMo/RL/issues/5415 @mxinO
- [ ] Fused linear logprobs. Example: GRPO fused-linear-logprobs nightly.
- [ ] Initialization from pretrained Bridge/MLM checkpoints. Example: checkpoint restore/conversion functional test.
- [ ] Reward-model environments and custom native multi-turn entrypoints. Examples: RM environment, sliding-puzzle multi-turn.
- [ ] Audio-input GRPO. Validate the native SC audio path against the legacy audio functional test, preserving rollout/training logprob consistency checks. Existing AVQA coverage is audio-only and belongs to this same item.
- [ ] Sparse/delta-weight and NIXL refit transports. Examples: delta-weight nightly, NIXL functional test.
4. Equivalent alternatives — No action needed
- Legacy async configuration is expressed through the SC entrypoint and
async_rlsamplers; choose the sampler according to the required staleness semantics. - PPO generation warmup lead is represented by sampler warmup lookahead.
- Full-batch training is selected with
min_groups_for_streaming_train = num_prompts_per_step. - PPO full-batch actor/critic multi-epoch training already has SC test coverage. Example: SC PPO nightly.
- Training-data dumps are available through
async_rl.log_full_train_dataand DebugWriter. - Colocated generation has a Megatron SC path. Example: colocated SC functional test.
- Drain-before-refit is implemented by the Dynamo SC path. Example: Dynamo SC functional test.
- MOPD already has SC paths and top-k/full-vocabulary test definitions; additional teacher-assignment combinations are not tracked here.
invalid_tool_call_advantageandmalformed_thinking_advantagehave supported SC paths.- GSPO, router replay with CP/PP, basic checkpoint/recovery, and Omni image/video already have SC test definitions and are excluded from the generic validation-gap list.
5. Not planned for now
Please comment in this issue to let us know if you need any of these features.
- Multiple optimizer minibatches within one rollout batch. SC requires rollout-batch size to equal policy global-batch size. This is separate from PPO repeating full-batch training over multiple epochs. Example: legacy Megatron functional test.
- Explicit sync path. Synchronous behavior in SC can be achieved with the
in_ordersampler andstaleness=0. grpo.calculate_advantages_on_gpu: the legacy GPU baseline/std calculation path is not wired into SC. Reference: legacy implementation.grpo.debug_payload_metrics: legacy payload-debug instrumentation and aggregation are not wired through. References: generation configuration, training-loop aggregation.- Per-worker vLLM timeline plots. SC has aggregate telemetry, but the legacy per-worker visualization is not wired through. Reference: SC logging TODO.
- Colocated train and generation. Only Megatron generation backend is supported now.
I'd like to contribute the multiple dataloaders and resume behavior item in this tracker. Is anyone already working on the SingleController implementation?
On main 5939fa53, setup still rejects data.use_multiple_dataloader=True. I propose this first increment:
- GRPO with the
in_ordersampler, initiallystaleness=0and dynamic sampling disabled. - Step-bounded training: explicit
max_num_stepsandmax_num_epochs: null, matching the existing infinite multi-dataloader contract without inventing an epoch length. - Deterministic, stateless task mixing through the existing custom-dataloader interface, including cycling an exhausted source. Stateful/adaptive selection, streaming samplers, PPO and Gym fan-out remain outside this increment.
- Save/restore every source's cursor and shuffle state together with the source/task configuration. Restore the existing admitted/buffered rollout ownership before consuming new data, so resuming does not introduce skipped or duplicated logical prompt groups. This is not an exactly-once guarantee for external environment side effects.
I would reuse the existing checkpoint barrier and sidecar publication path. My preferred SC format is a composite dataloader state in the existing train_dataloader.pt, keeping single-dataloader checkpoints unchanged. Missing source state or an incompatible task/source mapping would fail before dispatch rather than silently restart a source.
I noticed #2454 already makes the shared MultipleDataloaderWrapper lazy, picklable and checkpointable for legacy async GRPO. I do not want to duplicate that work or build a competing SC-only wrapper. Would you prefer splitting/adopting the shared wrapper changes first, or coordinating the SC consumer against that PR? I would keep legacy async collector changes outside my scope.
Validation would compare uninterrupted and resumed task/sample sequences on CPU, cover source exhaustion, source-state mismatch and checkpoint/admission races, then run a small supported model on 2–4 A800s with a stop/restart. GPU acceptance would check continued optimizer steps and matched logical training input; no large-scale fault-tolerance or convergence claim.
If this boundary is suitable, I'd be happy to own the SC integration and its tests/docs. Please flag any existing owner or preferred checkpoint format before I start the production implementation.
hi @WenzheWang , thanks for your interest and appreciate the help! currently no one is working on the multiple dataloaders, let me put your name there.
I would keep legacy async collector changes outside my scope.
yes, it makes sense, just focus on the single controller path is sufficient.
I would reuse the existing checkpoint barrier and sidecar publication path. My preferred SC format is a composite dataloader state in the existing train_dataloader.pt, keeping single-dataloader checkpoints unchanged.
for the ckpt format, wdyt keep the same with the legacy sync path like below? so that we won't have bw compat issue.
if master_config.data["use_multiple_dataloader"]:
for (
task_name,
task_dataloader,
) in wrapped_dataloader.dataloaders.items():
save_dataloader_state(
task_dataloader.state_dict(),
checkpoint_path,
suffix=f"_{task_name}",
)
else:
save_dataloader_state(
wrapped_dataloader.state_dict(), checkpoint_path
)
SGLang generation on SC: #5282 covers the grpo_sglang_async.sh target (pickling fix for the generation handle, an SC SGLang recipe, and a smoke that keeps that test's assertion). The fault-tolerance target is not covered yet: SGLang fault tolerance is rejected at SC setup for now, and I will follow up on it separately.
I'd like to take 1. Training-time validation if nobody is on it. Here is a proposed first increment, built from what SC already has.
What's already there on main: SC setup builds val_dataset and the validation env handles but drops them (_val_env_handles). RolloutManager.run_rollout(sample) returns a PromptGroupRecord without pushing to the data plane. _save_checkpoint already strips the val_reward sentinel, and validate_single_controller_config rejects any checkpointing.metric_name that isn't train:.
PR 1 (GRPO, non-colocated generation):
- Remove the
val_period/val_at_start/val_at_endrejection. Run validation at the same points as legacy (val_at_startbefore step 1, everyval_periodsteps fromval_start_at,val_at_endafter the last step). Each run happens after that step's refit, so it scores the step's weights. - While validation runs, pause dispatch of new training rollouts and let in-flight ones finish (as the legacy async loop pauses its collector). Validation prompts go through
run_rollout, so they never enter the buffer or affect staleness accounting, andval_num_generations_per_prompt,max_val_samplesandval_batch_sizebehave as in legacy. - Validation sampling (
policy.generation.val_temperature/val_top_p/val_top_k) needs a per-request sampling override on the rollout path. If none exists yet, PR 1 adds it. - Metrics: move legacy's accuracy / avg_length / pass@k / env-metric aggregation into one helper that both loops call, so the numbers stay comparable. Log under
validation/and writeval_data_step{N}.jsonlas legacy does. - Checkpoint ranking: accept
checkpointing.metric_name: val:<metric>on SC, using the latest validation result with legacy's semantics. - Tests: CPU unit tests for scheduling (which steps validate), the metric helper (legacy parity), pause/resume around validation, and
val:top-k ranking; plus an SC functional test modelled on an existing legacy validation one, for CI.
PR 2: validation-based early stopping (stop_at_validation_metric/threshold), NeMo-Gym validation if PR 1 doesn't already cover it, and colocated Megatron generation (stand down / wake around validation). PPO validation after that.
Does this split work for you? Any constraint I should know first, such as whether validation should share the generation fleet with in-flight training rollouts rather than pausing them?
hi @lonexreb , thanks for your interest and appreciate the help! let me ask around the team first to check whether there's someone working on it and get back to you.
hi @lonexreb , FYI @yuekaizhang is working on this, and thanks again for your help!
Hi @yuki-97, is the Megatron LoRA E2E validation item in section 3 still available? I’d like to port the existing async LoRA test to SingleController, keeping the small Qwen2.5 model, disaggregated async vLLM, and merged refit. I’d retain the reward and generation-KL checks and verify that a post-refit rollout actually uses the updated policy. Would that be a useful first PR? Thanks!
hi @WEIXILIN0307 , yea that's still available and this will be a useful PR. thanks for help and put your name there~
Hi @yuki-97, is the "Additional loss/advantage capabilities" item still open? I'd like to take it.
SingleController uses the same loss and advantage estimator classes as the legacy GRPO/PPO path, so for these it's mostly about whether the right inputs reach them and whether there are tests. I looked at each one:
- adaptive-ppo-clip already works. The SingleController step loop updates
k, it's saved in checkpoints, andgrpo_score_centering_gym_single_controller.shtests it (with score centering on). - positive-example NLL is accepted with the default normalization but doesn't do anything. The loss only adds the NLL term when
"rewards" in data, and SingleController doesn't send rewards to the training step (they're not inDP_TRAIN_FIELDS), sopositive_nll_lossis always 0, with no warning. Legacy GRPO has the same problem, which #3792 fixes. Legacy PPO is fine because it passestotal_rewardasrewards, and SingleController already has atotal_rewardcolumn, so the fix should be small. - Reinforce++, seq-mask-tis and length-adaptive GAE seem to be wired through, but there are no SingleController tests for them.
- CISPO is wired through too, but the example nightly can't be ported as is because it trains several minibatches per step, which SingleController doesn't support yet.
What I'd do:
- Fix positive-example NLL on SingleController, with a test that fails on main today.
- Add CPU tests that run Reinforce++ (with KL in the reward), seq-mask-tis and length-adaptive GAE through the SingleController advantage/loss path and compare with the legacy results.
- Add a small 2-GPU SingleController smoke run covering these, including CISPO with one minibatch per step.
For the NLL fix, should it use the raw reward or the reward after shaping/scaling?