Skip to content

test(ppo): add Qwen3-30B-A3B PPO + router replay single-controller nightly - #4739

Merged
yuki-97 merged 1 commit into
NVIDIA-NeMo:mainfrom
bg51717:test/ppo-r3-nightly
Oct 19, 2026
Merged

yuki-97 merged 1 commit into
NVIDIA-NeMo:mainfrom
bg51717:test/ppo-r3-nightly

Conversation

@bg51717

@bg51717 bg51717 commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

What does this PR do ?

Add a nightly that runs Megatron PPO with router replay (R3) on the SingleController path, so PPO + R3 + an MoE critic is covered end to end.

Usage

uv run examples/run_grpo_single_controller.py \
  --config examples/configs/recipes/llm/ppo-qwen3-30ba3b-3n8g-megatron-cp2-r3-async-single-controller.yaml

Details

No nemo_rl/ changes. The SC R3 wiring is algorithm-agnostic, so PPO already gets routes on the prev-logprob and train fetches; this PR only adds coverage.

  • Recipe: Qwen3-30B-A3B policy and critic, TP4 PP2 CP2 EP4 + SP, sequence packing, async (in_order, lookahead 1), vLLM TP4 EP4 on a dedicated node, 3n8g.
  • Test script mirrors grpo-qwen3-30ba3b-10n8g-megatron-cp2-r3-async-single-controller.sh (3 steps instead of 10) and additionally checks the critic. It asserts:
    • median(train/token_mult_prob_error) < 1.02
    • train/critic/loss logged every step
    • data-plane tensor hash: mismatches == 0, rows_checked > 0
    • tools/check_r3_trace.py --require-forward-verify --require-cp-identity
  • The critic does not replay routes (its config carries no router_replay, and TQValue does not fetch routed_experts); it routes with its own router.

Test results

3-step run of the new suite script on 3n8g:

Status Check Value
PASS median(train/token_mult_prob_error) < 1.02 1.0127
PASS len(train/critic/loss) == 3 3
PASS data-plane hash mismatches == 0 0
PASS data-plane hash rows_checked > 0 64

tools/check_r3_trace.py --require-forward-verify --require-cp-identity: PASS

  • replay set on prev-logprob (23808) and train (23808 forward + 23808 backward)
  • RouterReplay forward verifier: 47616 matched
  • CP token identity: 32 records, 52496 token rows

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? The new suite script passed end to end on 3n8g (median token_mult_prob_error ~1.013, 0 hash mismatches, all R3 forward verifications matched). Nightly DRYRUN total is 5343 (cap 5350); the full unit suite is left to CI.
  • Did you add or update any necessary documentation?

@copy-pr-bot

copy-pr-bot Bot commented Oct 15, 2026

Copy link
Copy Markdown

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.

@bg51717

bg51717 commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

/ok to test a69846b

@bg51717 bg51717 added the CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version) label Oct 15, 2026
@bg51717
bg51717 requested a review from yuki-97 October 15, 2026 16:53

@yuki-97 yuki-97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for adding the recipe, could you paste the wandb curve or metric check table to PR description to show the run could pass?
also there's a conflict with main, could you help rebase?

@bg51717
bg51717 force-pushed the test/ppo-r3-nightly branch from a69846b to 8854f91 Compare October 19, 2026 14:42
@bg51717

bg51717 commented Oct 19, 2026

Copy link
Copy Markdown
Member Author

/ok to test 8854f91

@bg51717

bg51717 commented Oct 19, 2026

Copy link
Copy Markdown
Member Author

@yuki-97 Thanks! Rebased onto main and added the metric check results to the description.

@yuki-97
yuki-97 enabled auto-merge (squash) October 19, 2026 15:46
@yuki-97
yuki-97 merged commit d7b3897 into NVIDIA-NeMo:main Oct 19, 2026
96 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants