Skip to content

feat: basic ppo training implementation#2027

Draft
hXl3s wants to merge 2 commits intoNVIDIA-NeMo:mainfrom
hXl3s:lukaszp/ppo
Draft

feat: basic ppo training implementation#2027
hXl3s wants to merge 2 commits intoNVIDIA-NeMo:mainfrom
hXl3s:lukaszp/ppo

Conversation

@hXl3s
Copy link

@hXl3s hXl3s commented Feb 26, 2026

DO NOT MERGE! WORK IN PROGRESS!

What does this PR do ?

This PR adds basic Proximal Policy Optimization training loop to Nemo-RL.

What is added:

  • Support for value model. Current value model is a separate worker. Case where value model is just a head of Policy is not covered yet
  • PPO training loop and example of training math model (no convergence tested yet)
  • Basic logging and validation during PPO training

Issues

No direct issue

closes #2047

Usage

uv run example/run_ppo.py

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you run the unit tests and functional tests locally? Visit our Testing Guide for how to run tests
  • Did you add or update any necessary documentation? Visit our Document Development Guide for how to write, build and test the docs.

Additional Information

  • ...

@github-actions
Copy link

✅ Submodule Fast-Forward Check Results

Check based on commit: 08aa60d (PR #2027 from lukaszp/ppo)

✅ Submodules that are properly updated:

Automodel: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

@github-actions
Copy link

⚠️ File Consistency Check

Check based on commit: 08aa60d (PR #2027 from lukaszp/ppo)

⚠️ DTensor Policy Worker Synchronization Warning

The file nemo_rl/models/policy/workers/dtensor_policy_worker_v2.py was modified in this PR, but nemo_rl/models/policy/workers/dtensor_policy_worker.py was not updated.

Why this matters:
These files contain related DTensor policy worker implementations that should be kept synchronized to ensure consistency across different versions.

Action required:

  • Please review if the changes in nemo_rl/models/policy/workers/dtensor_policy_worker_v2.py should also be applied to nemo_rl/models/policy/workers/dtensor_policy_worker.py
  • Update nemo_rl/models/policy/workers/dtensor_policy_worker.py if necessary to maintain consistency
  • If the files are intentionally different, please add a comment in the PR explaining why

Files to check:

  • Modified: nemo_rl/models/policy/workers/dtensor_policy_worker_v2.py
  • Not modified: nemo_rl/models/policy/workers/dtensor_policy_worker.py

This check ensures that related file implementations remain synchronized across the codebase. If you believe this warning is incorrect or the files should intentionally differ, please add a comment explaining the reasoning.

@github-actions
Copy link

✅ Submodule Fast-Forward Check Results

Check based on commit: efd71bb (PR #2027 from lukaszp/ppo)

✅ Submodules that are properly updated:

Automodel: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

@copy-pr-bot
Copy link

copy-pr-bot bot commented Mar 10, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions
Copy link

✅ Submodule Fast-Forward Check Results

Check based on commit: 7b83db2 (PR #2027 from lukaszp/ppo)

✅ Submodules that are properly updated:

Automodel: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

@github-actions
Copy link

✅ Submodule Fast-Forward Check Results

Check based on commit: aee85c3 (PR #2027 from lukaszp/ppo)

✅ Submodules that are properly updated:

Automodel: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

@github-actions
Copy link

✅ Submodule Fast-Forward Check Results

Check based on commit: 90116e9 (PR #2027 from lukaszp/ppo)

✅ Submodules that are properly updated:

Automodel: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[dtensor] PPO

1 participant