feat: PPO with MCore - #2530
Conversation
|
/ok to test 50e878e |
Signed-off-by: bg51717 <biguo@nvidia.com>
Signed-off-by: bg51717 <biguo@nvidia.com>
Signed-off-by: bg51717 <biguo@nvidia.com>
Signed-off-by: bg51717 <biguo@nvidia.com>
Signed-off-by: bg51717 <biguo@nvidia.com>
Signed-off-by: bg51717 <biguo@nvidia.com>
Signed-off-by: bg51717 <biguo@nvidia.com>
Signed-off-by: bg51717 <biguo@nvidia.com>
Signed-off-by: Gerald Shen <geshen@nvidia.com> Signed-off-by: bg51717 <biguo@nvidia.com>
…n value model Signed-off-by: bg51717 <biguo@nvidia.com>
…n value model Signed-off-by: bg51717 <biguo@nvidia.com>
…tron value model Signed-off-by: bg51717 <biguo@nvidia.com>
Signed-off-by: bg51717 <biguo@nvidia.com>
Signed-off-by: bg51717 <biguo@nvidia.com>
Signed-off-by: bg51717 <biguo@nvidia.com>
|
/ok to test 47d84e6 |
|
/ok to test a53ce1a |
Signed-off-by: bg51717 <biguo@nvidia.com>
|
/ok to test 47d5e37 |
Signed-off-by: bg51717 <biguo@nvidia.com>
…pstream Signed-off-by: bg51717 <biguo@nvidia.com>
|
/ok to test 4d9ae3f |
Signed-off-by: bg51717 <biguo@nvidia.com>
|
/ok to test cc0b381 |
|
/ok to test 40a67cc |
Signed-off-by: bg51717 <biguo@nvidia.com>
Signed-off-by: bg51717 <biguo@nvidia.com>
# Conflicts: # nemo_rl/algorithms/loss/loss_functions.py # nemo_rl/models/policy/workers/megatron_policy_worker.py
Signed-off-by: bg51717 <biguo@nvidia.com>
|
/ok to test a567bfb |
Test Summary — NVIDIA-NeMo/RL PR #2530 ("feat: PPO with MCore")POR RL coverage for the new PPO + Megatron-Core actor-critic path. MR: All cases drive the real product entrypoint What the PR adds and these tests gate: the value model (critic) + GAE 1. Function / code-path coverage matrix
Coverage spread: cases 1–4 are fast 2-GPU function smokes isolating one PPO 2. Metric assertions (what "pass" actually verifies)Common to all (clipped-surrogate / actor sanity):
Critic / value-head (PPO-unique — proves the PR's value model ran):
Branch-specific teeth:
3. Run results
Evidence note: dsr1 has an on-disk summary.json (status=passed). qwen is cited
4. Coverage gaps / notes
|
What does this PR do ?
Adds full Proximal Policy Optimization (PPO) support to NeMo-RL with an actor-critic architecture, using the Megatron-Core (mcore) backend for both the policy and value models. The policy (actor) and value function (critic) are jointly trained using Generalized Advantage Estimation (GAE). Both models run on Megatron-Core with GPU/CPU offloading for colocated execution on the same set of GPUs as vLLM generation.
Issues
close #2048
Summary of Changes
PPO Training Algorithm
steps_per_epoch)policy_training_start_step) — trains value model alone before policy updates beginGeneralized Advantage Estimation (GAE)
lambda_policy = 1 - 1/(alpha * response_length)Value Model (Megatron-Core backend)
Shared Algorithm Improvements
Configuration and Recipes
examples/configs/ppo_math_1B_megatron.yaml(DAPO-style PPO: no KL penalty, asymmetric clipping, dual-clip, reward scaling)ppo-dsr1-7b-math-8n8g-megatron— DeepSeek-R1-7B on DAPOMath-17K, 8 nodes, KL penalty + importance samplingppo-qwen2.5-1.5b-gsm8k-1n8g-megatron— Qwen2.5-1.5B-Instruct on GSM8K, 1 node, VAPO decoupled GAETests
Documentation
Architecture
PPO Training Loop (mcore)
8.Steps 6-7 repeat
steps_per_epochtimesExperimental Results
GSM8K: Qwen2.5-1.5B-Instruct, 1 node x 8 GPUs
val:accuracyover steps — shows convergence on GSM8K test settrain/rewardover steps — shows reward progressionDAPOMath-17K: DeepSeek-R1-7B, 8 nodes x 8 GPUs
Metrics to screenshot from wandb (project:
nemo-rl, run:ppo-dsr1-7b-math-8n8g-megatron):val:accuracy(AIME 2024) over steps — shows convergence on competition mathtrain/rewardover steps — shows reward progressionBefore your PR is "Ready for review"
Pre checks: