feat(recipes): add optimized 32-GPU Nano-Omni GRPO recipes - #3737
feat(recipes): add optimized 32-GPU Nano-Omni GRPO recipes#3737youngeunkwon0405 wants to merge 5 commits into
Conversation
Signed-off-by: Youngeun Kwon <youngeunk@nvidia.com>
Signed-off-by: Youngeun Kwon <youngeunk@nvidia.com>
youngeunkwon0405
left a comment
There was a problem hiding this comment.
Team review of the two new 32-GPU Nano-Omni GRPO recipes (5 agents: RL expert, bug finder, test agent, devil's advocate; all findings adversarially verified against pinned submodule sources).
Great perf writeup — the W&B-linked optimization journey and 10-step functional validation made this easy to review. Both YAMLs pass tools/config_cli.py minimize-check, all overridden keys were verified to exist in the schema (including the vLLM kwargs against pinned vLLM 0.25.1 source), and the batch/parallelism/resource math all checks out.
2 blocking items (async entrypoint dispatch; recipe-accounting unit test), 1 real footgun (shared checkpoint dir), 3 low-severity consistency notes, 1 informational — all as inline comments.
Generated by Claude Code
Signed-off-by: Youngeun Kwon <youngeunk@nvidia.com>
Signed-off-by: Youngeun Kwon <youngeunk@nvidia.com>
|
/ok to test b00fb48 |
Signed-off-by: Youngeun Kwon <youngeunk@nvidia.com>
|
/okay to test f6091f6 |
|
@DanialTaheri, can I ask for your review of this nano omni recipe too? |
What does this PR do?
Adds two production-shaped 32-GPU Nemotron-3-Nano-Omni GRPO recipes:
Both recipes inherit from the native 1-node/8-GPU Nano-Omni recipe and preserve its 8K total sequence length, 4K generation cap, and group size 16. The 32-GPU recipes use 64 prompts per step for a global rollout batch of 1024.
The shared optimized stack uses learner TP1/EP8, no activation checkpointing, a 10K packed-training token budget, fused weighted squared ReLU, and vLLM TP2/EP2 with CUDA graphs, FlashInfer CUTLASS MoE, and one-sided NVLink all-to-all. The async recipe additionally enables lag-1 GRPO with in-flight weight updates, uses a 16+16 GPU split, and raises
max_num_seqsto 128.This PR contains only the two recipe YAMLs and their required test-suite registrations. Matching suite drivers are registered as disabled because NeMo-RL requires every recipe YAML to have a same-named suite driver, while each of these recipes reserves eight GB200 nodes. The NeMo-Gym dynamic-image-padding propagation used by the private benchmark environment remains independent in #3738. The parallel image-encoding implementation remains independent in #3721.
The async recipe was validated through
examples/nemo_gym/run_grpo_nemo_gym.py, which already dispatches to the async trainer. Async dispatch for the generalexamples/run_vlm_grpo.pyentrypoint is proposed separately in #3740 and is intentionally outside this recipe PR.Known limitation
examples/run_vlm_grpo.pydoes not currently dispatch toasync_grpo_trainwhengrpo.async_grpo.enabled=true. That general entrypoint fix is tracked by #3740 and intentionally remains outside this recipe-only PR. The async recipe was validated with the existing async-capable NeMo-Gym entrypoint.Usage
# Sync colocated, 8 nodes x 4 GPUs uv run examples/run_vlm_grpo.py \ --config examples/configs/recipes/vlm/vlm_grpo-nemotron-omni-30ba3b-clevr-8n4g-megatron-tp1ep8.v1.yamlThe async 1-off recipe was launched through
examples/nemo_gym/run_grpo_nemo_gym.pywith the private NeMo-Gym dataset and environment supplied as launch-time overrides.Performance
All timings below are means over warm Steps 2-10 with the same 32-GPU scale, batch 1024, 8K total sequence length, 4K generation cap, and data.
The measured optimization journey is:
221.98snaive ->117.17soptimized recipe (47.2% lower) ->81.28swith parallel image encoding (30.6% additional, 63.4% end-to-end).124.98sinitial ->85.12soptimized recipe (31.9% lower) ->43.24swith parallel image encoding (49.2% additional, 65.4% end-to-end).The sync
generation exposedcolumn is the synchronous generation phase. For async, it is only the generation latency exposed on the learner critical path; rollout collection overlaps policy work.The private performance launch selected NeMo Gym and supplied its dataset/environment options at launch time. It also supplied benchmark-control choices such as disabled validation, deterministic data order, and rollout filtering. Those workload-specific controls are intentionally not baked into these portable recipes. The performance-critical scale, parallelism, packing, learner, generation, and async settings in the YAMLs match the validated runs. The runs also included the separately scoped dynamic-image-padding propagation because the private examples contain heterogeneous image shapes.
The final-stack runs additionally contained the changes from #3721. The incremental values above are observed between separate benchmark runs, not a claim that image encoding alone explains every timing difference. A controlled preparation-path A/B reduced image-encoding wall time from
4.83sto1.22swith 32 workers; #3721 uses a conservative cap of 8 workers. This recipe PR does not include either the dynamic-padding fix or the image-encoding implementation.The integrated sync policy mean includes three intermittent slow learner steps (62.27s, 105.63s, and 59.69s); its warm policy median was 13.54s. The end-to-end mean retains those outliers.
Functional validation
The performance-critical settings represented by both YAMLs completed 10 steps in the private NeMo-Gym benchmark environment with the separate padding fix. They were then run again from the isolated final-stack branch containing #3721. Private dataset and benchmark-control overrides were supplied by the launcher rather than embedded in the portable recipe.
COMPLETED 0:0COMPLETED 0:0For sync, warm Steps 2-10 also produced finite mean loss
0.079477, mean gradient norm0.016560, and mean probability ratio1.000000001. For async, warm Steps 2-10 produced finite mean loss0.101380, mean gradient norm0.032467, mean probability ratio0.999999993, and mean trajectory age1.0. Both jobs completed all ten timing blocks without OOM or weight-update failure.Before your PR is "Ready for review"
Pre checks:
tools/config_cli.py minimize-checkdisabled.txtAdditional Information
The private NeMo Gym dataset/environment used for performance validation was supplied as launch-time overrides and is not embedded in these portable public recipes.