Repository navigation
feat: configurable GDPO per-reward weights and multi-reward NeMo Gym bridge #2680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
terrykong
merged 6 commits into
NVIDIA-NeMo:main
from
anjalibshah:gdpo-weights-and-gym-multireward-upstream
Jul 21, 2026
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
cdf9b99
feat: configurable GDPO per-reward weights and multi-reward NeMo Gym …
anjalibshah 19da816
docs: point gdpo_multireward recipe at the example_tool_call_multirew…
anjalibshah fbef9f9
fix: don't overwrite total_reward in NeMo Gym multireward path; valid…
anjalibshah de41394
test: cover reward==sum(components) validation; extract to helper
anjalibshah d00b431
fix: emit reward/<name> keys from NeMo Gym GDPO bridge (was reward1/r…
anjalibshah 9143bf2
test: add GDPO per-reward-weights nightly test
anjalibshah File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # GDPO over a multi-reward NeMo Gym environment. | ||
| # | ||
| # Inherits the workplace-assistant NeMo Gym recipe and switches only the advantage | ||
| # estimator to GDPO. GDPO requires the Gym environment to return multiple reward | ||
| # components: its verify endpoint must include `reward_components` (a mapping of | ||
| # component-name -> score) in addition to the scalar `reward`. The Gym->NeMo-RL bridge | ||
| # (nemo_rl/environments/nemo_gym.py::extract_reward_components, surfaced in | ||
| # run_async_nemo_gym_rollout) then exposes them as reward1, reward2, ... for the GDPO | ||
| # advantage estimator. | ||
| # | ||
| # NOTE: workplace_assistant is single-reward today; point `env.nemo_gym` at a | ||
| # multi-reward environment (one whose verifier emits `reward_components`) before | ||
| # training, or GDPO will raise "GDPO requires multiple reward components". A ready | ||
| # reference env is `example_tool_call_multireward` in NVIDIA-NeMo/Gym (scored on | ||
| # correctness / schema_valid / format). See | ||
| # skills/nemo-rl-gdpo-experiment/references/gym-multireward-scope.md. | ||
|
terrykong marked this conversation as resolved.
Resolved
|
||
| defaults: grpo_workplace_assistant_nemotron_nano_v2_9b.yaml | ||
|
|
||
| grpo: | ||
| adv_estimator: | ||
| name: "gdpo" | ||
| normalize_rewards: true | ||
| use_leave_one_out_baseline: false | ||
| # Optional per-component weights, ordered to match reward1, reward2, ... . | ||
| # Omit for equal weighting; uncomment and size to your env's components to tune. | ||
| # reward_weights: [1.0, 0.5, 0.25] | ||
|
|
||
| checkpointing: | ||
| checkpoint_dir: "results/gdpo_nemo_gym" | ||
|
|
||
| logger: | ||
| wandb: | ||
| project: "gdpo-dev" | ||
| name: "gdpo-nemo-gym-multireward" | ||
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.