feat: Support for dtensor ppo - #2837
Conversation
|
/ok to test 980ef04 |
|
/ok to test 980ef04 |
@fujial-code, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/ |
|
/ok to test 980ef04 |
@fujial-code, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/ |
|
/ok to test 8681202 |
8681202 to
138ae84
Compare
|
/ok to test 138ae84 |
c5dc3ae to
a9d9ea8
Compare
|
/ok to test a9d9ea8 |
|
/ok to test aa7a690 |
473ddaf to
6f4ddc6
Compare
Signed-off-by: Yuki Huang <yukih@nvidia.com>
Signed-off-by: Yuki Huang <yukih@nvidia.com>
Signed-off-by: Yuki Huang <yukih@nvidia.com>
Signed-off-by: Yuki Huang <yukih@nvidia.com>
Signed-off-by: Yuki Huang <yukih@nvidia.com>
Signed-off-by: Yuki Huang <yukih@nvidia.com>
Signed-off-by: Yuki Huang <yukih@nvidia.com>
|
/ok to test 51cad68 |
Signed-off-by: Yuki Huang <yukih@nvidia.com>
|
/ok to test c569d70 |
yuki-97
left a comment
There was a problem hiding this comment.
Two cleanup nits: dead _v2=False branch in Value.save_checkpoint and an unused-arg wrapper in the new DTensor value worker. Neither is blocking.
… actor, tighten value-backend assert Signed-off-by: Yuki Huang <yukih@nvidia.com>
|
/ok to test 8403d74 |
The PPO value worker (MegatronValueWorkerImpl) landed in main after this branch was first written and runs a Megatron model on GPU like the policy worker, but did not call bind_to_gpu_numa(). Add the bind early in __init__ for parity with the Megatron/DTensor policy workers and vLLM workers. Note: the DTensor PPO value worker (PR #2837, feat: Support for dtensor ppo) will need the same call; whichever of the two PRs merges second must add it. Signed-off-by: Terry Kong <terryk@nvidia.com>
POR Test Summary — NVIDIA-NeMo/RL PR #2837 (DTensor PPO support)Result: PASS ✅ What PR #2837 addsDTensor (FSDP2) backend support for the value model in PPO. Prior to this, It now states the test covers: Test
Run
Metric gate (all PASS — from real stdout.log)
DTensor backend confirmed exercised in logs: Status flip
Artifacts
Branch / worktree
|
What does this PR do ?
Adds DTensor/FSDP2 support for the PPO value model path and aligns the DTensor PPO 1.5B GSM8K recipe with the existing Megatron-Core PPO baseline.
The main correctness fix is a value temporal alignment issue: DTensor value inference/training was not using the same
V(s_t)convention as the Megatron PPO path. After right-shifting token values to match Megatron's temporal semantics, the DTensor reward curve aligns with the Megatron baseline on the Qwen2.5-1.5B GSM8K 1-node recipe.Issues
close [#2047]
Summary of Changes
DTensor PPO Value Model
DTensorValueWorkerV2for PPO value model training and inference on the DTensor/FSDP2 backend.LMValue.Value Temporal Alignment
V(s_t).Recipe and Config Alignment
examples/configs/recipes/llm/ppo-qwen2.5-1.5b-gsm8k-1n8g-dtensor.yamlppo_epochs: 1math_verify_impl: hf_math_verifyRuntime Compatibility Fixes
Tests
_right_shift_valuesand_RightShiftLossWrapper.train/reward > 0.75andvalidation/accuracy > 0.65at step 40.git diff --check.Validation
Validated the DTensor PPO path against the Megatron-Core PPO baseline on the Qwen2.5-1.5B GSM8K 1-node 8-GPU setup.
Ran 100-step PPO training for both backends with matched recipe settings:
ppo_epochs: 1math_verify_impl: hf_math_verifyResults:
train/reward: DTensor and Megatron follow the same learning curve and both converge to around0.88-0.90by step 100.validation/accuracy: DTensor and Megatron track closely across training and reach around0.78-0.80by step 100.These results indicate that the DTensor PPO value path now matches the Megatron-Core PPO baseline behavior on the 1.5B GSM8K recipe.