Repository navigation
feat(algorithms): AReaL decoupled-PPO async training on the SingleController - #2940
Draft
haitian-nvidia wants to merge 13 commits into
Draft
haitian-nvidia wants to merge 13 commits into
haitian-nvidia wants to merge 13 commits into
Conversation
haitian-nvidia
force-pushed
the
haitianj/areal-sc
branch
from
June 27, 2026 00:02
6b31fda to
54a9bd0
Compare
yuki-97
force-pushed
the
yukih/sc-entrypoint
branch
3 times, most recently
from
June 28, 2026 12:17
e0513e5 to
1e0107e
Compare
haitian-nvidia
force-pushed
the
haitianj/areal-sc
branch
3 times, most recently
from
July 9, 2026 04:17
dde2684 to
307f5cb
Compare
haitian-nvidia
force-pushed
the
haitianj/areal-sc
branch
from
July 15, 2026 06:54
307f5cb to
10341ef
Compare
yuki-97
force-pushed
the
yukih/sc-entrypoint
branch
from
July 15, 2026 12:15
d1b196c to
d803d4c
Compare
Signed-off-by: haitian-nvidia <[email protected]>
Signed-off-by: haitian-nvidia <[email protected]>
Signed-off-by: haitian-nvidia <[email protected]>
Signed-off-by: haitian-nvidia <[email protected]>
Signed-off-by: haitian-nvidia <[email protected]>
Signed-off-by: haitian-nvidia <[email protected]>
Initialize and shut down NeMo-Gym environments in the AReaL entrypoint. Add multi-node launch and DataPlane configuration. Enforce full-step rollout claims and report generation token metrics. Support preinstalled TransferQueue environments and deduplicate replicated TP/CP/PP training metrics. Guard Megatron-only KV recompute configuration from vLLM runs. Signed-off-by: haitian-nvidia <[email protected]>
Signed-off-by: haitian-nvidia <[email protected]>
Avoid accessing an uninitialized reference model in SingleController when reference_policy_kl_penalty is zero. Signed-off-by: haitian-nvidia <[email protected]>
The train pump reduced only the last minibatch's finish_train_step result (aggregate_step_metrics(step_results[-1])), so with M = rl_step_samples // train_global_batch_size > 1 the first M-1 optimizer results were dropped: global_valid_toks / total_flops (and thus valid_tokens_per_sec_per_gpu) were undercounted ~M×, and train/loss was a single-minibatch slice. Add aggregate_step_metrics_multi_minibatch, which reduces the whole list of finish results: - per-microbatch metric lists are concatenated, then the existing GRPO min/max/mean/sum rules apply; summed keys are rescaled by 1/M since each result's lists are already normalized within its own minibatch (a result's list sums to that minibatch's mean), keeping kl_penalty, probs_ratio, moe/* and mtp/* at legacy-comparable magnitudes instead of M× inflated - loss and grad_norm are averaged across optimizer results - total_flops and global_valid_seqs/toks are summed for correct throughput accounting - lr/wd/num_ranks come from the final optimizer result - M == 1 delegates to aggregate_step_metrics (behavior unchanged) aggregate_step_metrics itself is untouched and keeps serving the base single-controller path. Add unit tests for the reducer and update the train-pump publish test to the new semantics. Signed-off-by: haitian-nvidia <[email protected]>
- consume ready rollouts without enforcing sampler order - make stale rollout eviction configurable - tune the NanoV3 recipe and multinode launcher for larger async runs Signed-off-by: haitian-nvidia <[email protected]>
haitian-nvidia
force-pushed
the
haitianj/areal-sc
branch
from
July 18, 2026 05:17
10341ef to
7f5304b
Compare
Signed-off-by: haitian-nvidia <[email protected]>
haitian-nvidia
force-pushed
the
haitianj/areal-sc
branch
from
July 21, 2026 00:14
e2b0d74 to
d03e8fb
Compare
Signed-off-by: haitian-nvidia <[email protected]>
haitian-nvidia
added a commit
to haitian-nvidia/RL
that referenced
this pull request
Aug 11, 2026
Port the AReaL decoupled-PPO admission policy from PR NVIDIA-NeMo#2940 onto the current SingleController sampler interface as a new built-in ArealAdmissionSampler (name="areal_admission"): - admission gates dispatch to at most `max_staleness_versions` (eta) batches ahead of the trainer version, reusing the shared _GatedSampler dispatch counter; the controller keeps no duplicate staleness state - selection is ready-first across weight versions (mixed-version batches) instead of draining one version at a time - a typed `evict_stale_samples` knob (default false) controls both the selection lower bound and eviction together: false keeps late stragglers trainable and never evicts; true applies the hard window [v - eta, v] to selection and evicts ready groups below it, skipping uncommitted slots to avoid racing commit() - ArealAdmissionSamplerConfig joins the discriminated SamplerConfig union, create_sampler(), and required_buffer_capacity_for_config() (capacity = num_prompts_per_step * (eta + 1)) - validate_single_controller_config() rejects areal_admission unless loss_fn.use_importance_sampling_correction=true and loss_fn.force_on_policy_ratio=false, so prev_logprobs are real and used as the behavior-policy correction (decoupled PPO), and fails before any setup factory allocates resources Covered by sampler-interface unit tests (admission gating, mixed-version selection, both eviction modes, config parsing/capacity) and setup tests for the new validator guards. Verified e2e: 10-step M=1 run (Llama-3.1-8B, Megatron TP2 + non-colocated vLLM) under areal_admission completes with finite losses. Signed-off-by: haitian-nvidia <[email protected]>
3 of 4 tasks
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 does this PR do ?
Adds an AReaL-style decoupled-PPO async-RL training path on the SingleController — a standalone SingleControllerArealActor with a two-phase train loop (full-batch barrier → frozen π_prox → per-minibatch optimizer steps) on top of the TransferQueue data plane.
Usage
The AReaL decoupled-PPO objective reuses existing machinery — it is ClippedPGLossFn with the always-on importance-sampling correction (π_prox/π_behav) and no KL term; the only new runtime logic is the controller's two-phase loop. Launch via the SC entrypoint + the AReaL recipe:
Before your PR is "Ready for review"
Pre checks:
nightly functional entries.
container; functional recipe added to tests/test_suites/nightly.txt.