Repository navigation
feat: GDPO vs GRPO multi-reward example and collapse demo - #2681
Conversation
|
Hi, @anjalibshah thanks a lot for the pr. All looks good to me. The only caveat is about the skills, looks like experiment-specific content isn't appropriate as part of nemo-rl repo skill: All existing skills are for general, recurring workflows including setup, k8s, documentation etc, while none of it is specific for an experiment recipe. So what do you think to make it a doc instead or fold the content into |
|
/ok to test 90f71f4 |
Thanks Zhiyu — agree, and good catch on the convention. You're right that the existing skills are all general infra/process, so I'll fold the content into docs/guides/grpo.md file in the GDPO subsection. And I'll remove skills/nemo-rl-gdpo-experiment/ entirely |
|
Done in 11a3268. Removed skills/nemo-rl-gdpo-experiment/ entirely and folded the additive pieces into the existing GDPO section of docs/guides/grpo.md. |
|
Found DCO failure in unit tests. Could you finally git commit / amend -s to sign the commits? |
terrykong
left a comment
There was a problem hiding this comment.
Team review (5 agents; the demo was independently re-run by three of them and passes on the PR head). The content is technically sound: the demo's estimator API usage is correct, the new config deep-merges cleanly (verified via load_config and the config-walker unit test), and both "Practical notes" claims are true against source (scale_rewards rescales each rewardN; GDPO's final normalization is unconditional). Inline comments cover a CI-blocking format issue and a few doc-wording accuracy points.
A few non-inline notes:
- #2680 coordination: this PR's three new
grpo.mdsubsections and #2680's#### Per-reward weightssection insert at the same anchor (right after this line), so they will conflict textually on merge. Your plan to merge #2680 first and then rebase this PR so its subsections stack under thereward_weightsone looks right — just noting the conflict is real. There's no hard dependency otherwise; this PR is safe against currentmain. - PR title/description: after 11a3268 removed
skills/nemo-rl-gdpo-experiment/, the description's skill bullet and the NVSkills-CI note (and the "and experiment skill" part of the title) no longer match the diff — worth a quick refresh so reviewers see the actual scope (docs + control config + demo). - DCO: the head commit 11a3268 is missing a
Signed-off-bytrailer (the first two commits have it) — that's the DCO failure already flagged; sounds like it's covered by your planned rebase.
Generated by Claude Code
…t skill Add a matched GRPO control config for the multi-reward math env, a CPU-only advantage-collapse demo (GRPO collapses same-total responses to one advantage; GDPO separates them), and the nemo-rl-gdpo-experiment skill (SKILL.md + evals) documenting multi-reward GDPO setup and the GDPO-vs-GRPO comparison workflow. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: Anjali Shah <[email protected]>
Add the author-provided model card (owner, license, use case, risks, references, output spec, eval task composition) required before NVSkills CI benchmarking and signing. Evaluation results are left pending; they are populated by NVSkills CI. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: Anjali Shah <[email protected]>
…-experiment skill Per review on NVIDIA-NeMo#2681: experiment-specific content doesn't fit the repo's skill convention (existing skills are general infra/process workflows). Remove the skills/nemo-rl-gdpo-experiment/ directory and fold the genuinely additive pieces into the existing GDPO section of docs/guides/grpo.md: - matched GDPO-vs-GRPO comparison workflow (points at the examples/ control config and CPU collapse demo, both unchanged) - what to measure (per-reward convergence, per-prompt advantage spread) - practical notes: reward_scaling applies per component; final batch normalization always runs regardless of normalize_rewards Deliberately excludes reward_weights guidance to avoid overlap with NVIDIA-NeMo#2680, which documents that option. Env-authoring contract is left in docs/guides/environments.md where it already lives. Co-Authored-By: Claude Opus 4.8 <[email protected]> Signed-off-by: Anjali Shah <[email protected]>
Addresses review on NVIDIA-NeMo#2681 (bridge-emission block was uncovered by any test). Move the reward/<name> column construction from run_async_nemo_gym_rollout into a pure helper next to extract_reward_components, and unit-test it in test_nemo_gym.py: keys are exactly what get_gdpo_reward_component_keys selects, missing components fill 0.0, ordering is deterministic (sorted), and no-components -> no columns. This directly guards the producer->consumer contract that the reward1/reward2 bug slipped through. Signed-off-by: Anjali Shah <[email protected]>
…o.md wording Per review on NVIDIA-NeMo#2681: - Remove examples/run_gdpo_grpo_advantage_demo.py (untested, bit-rots; breaks on main after the reward/<name> rename) and cite the GDPO paper's collapse example. - Remove examples/configs/grpo_math_1B_multireward.yaml (untested config); show the GRPO control as a CLI override on gdpo_math_1B.yaml instead. - grpo.md: note per-component rewards are not logged out of the box; use reward/<name> naming (post-NVIDIA-NeMo#2597) in "What to measure" and "Practical notes"; name the checkpoint dir / logger deltas in the comparison so it doesn't overstate "only the estimator". Signed-off-by: Anjali Shah <[email protected]>
11a3268 to
3596242
Compare
3596242 to
30b6243
Compare
|
/ok to test 30b6243 |
…gym nightly Addresses review on #2681: point the GDPO nightly at the multi-reward gym path so it exercises the *new* reward/<name> bridge end to end, instead of the native rollout path (already covered on main). Qwen2.5-1.5B on 1x8 H100, DTensor backend. - examples/nemo_gym/gdpo_example_tool_call_multireward.yaml: GDPO-gym base wired to the example_tool_call_multireward env (config_paths, shipped data, reward_weights). - examples/configs/recipes/llm/gdpo-qwen2.5-1.5b-1n8g-gym-multireward.yaml + .sh: nightly recipe/launcher (gym entrypoint, DTensor for the 1.5B model, hermes tool parser). - Remove the native gdpo-...-fsdp2-reward-weights recipe/.sh and swap the nightly.txt entry. reward_weights math stays covered by unit tests; the bridge emission is now covered by test_build_reward_component_columns. Signed-off-by: Anjali Shah <[email protected]>
terrykong
left a comment
There was a problem hiding this comment.
lgtm. thanks @anjalibshah . merge subject to nightly test running
30b6243 to
28454c0
Compare
Thanks @terrykong! |
|
from @anjalibshah : |
28454c0 to
d0e9f39
Compare
|
/ok to test d0e9f39 |
…gym nightly Addresses review on #2681: point the GDPO nightly at the multi-reward gym path so it exercises the *new* reward/<name> bridge end to end, instead of the native rollout path (already covered on main). Qwen2.5-1.5B on 1x8 H100, DTensor backend. - examples/nemo_gym/gdpo_example_tool_call_multireward.yaml: GDPO-gym base wired to the example_tool_call_multireward env (config_paths, shipped data, reward_weights). - examples/configs/recipes/llm/gdpo-qwen2.5-1.5b-1n8g-gym-multireward.yaml + .sh: nightly recipe/launcher (gym entrypoint, DTensor for the 1.5B model, hermes tool parser). - Remove the native gdpo-...-fsdp2-reward-weights recipe/.sh and swap the nightly.txt entry. reward_weights math stays covered by unit tests; the bridge emission is now covered by test_build_reward_component_columns. Signed-off-by: Anjali Shah <[email protected]>
…gym nightly Addresses review on NVIDIA-NeMo#2681: point the GDPO nightly at the multi-reward gym path so it exercises the *new* reward/<name> bridge end to end, instead of the native rollout path (already covered on main). Qwen2.5-1.5B on 1x8 H100, DTensor backend. - examples/nemo_gym/gdpo_example_tool_call_multireward.yaml: GDPO-gym base wired to the example_tool_call_multireward env (config_paths, shipped data, reward_weights). - examples/configs/recipes/llm/gdpo-qwen2.5-1.5b-1n8g-gym-multireward.yaml + .sh: nightly recipe/launcher (gym entrypoint, DTensor for the 1.5B model, hermes tool parser). - Remove the native gdpo-...-fsdp2-reward-weights recipe/.sh and swap the nightly.txt entry. reward_weights math stays covered by unit tests; the bridge emission is now covered by test_build_reward_component_columns. Signed-off-by: Anjali Shah <[email protected]>
d0e9f39 to
2278596
Compare
|
/ok to test 2278596 |
Summary
Documentation and tooling for multi-reward RL with GDPO (arXiv:2601.05242); no runtime-code changes.
examples/configs/grpo_math_1B_multireward.yaml— a matched GRPO control, identical togdpo_math_1B.yamlexceptadv_estimator.name(grpovsgdpo), for an apples-to-apples comparison on the same multi-reward env.examples/run_gdpo_grpo_advantage_demo.py— a CPU-only demonstration of advantage collapse: GRPO assigns identical advantages to same-total/different-composition responses, while GDPO separates them. Doubles as a regression test via assertions.(skill removed during review — guidance folded intoskills/nemo-rl-gdpo-experiment/— an agent skill (SKILL.md + skill-card + evals + references) for setting up multi-reward GDPO and the GDPO-vs-GRPO comparison workflow.docs/guides/grpo.md)Note
The skill's(no longer applicable — the skill was removed)BENCHMARK.mdand signature are produced by NVSkills CI (a maintainer comment of/nvskills-ci), not included in this PR.