Repository navigation
test: validate SingleController init from pretrained Bridge/MLM checkpoints - #5528
Merged
Merged
Conversation
macandro96
marked this pull request as ready for review
December 2, 2026 23:38
…points Add an SC sibling of grpo_megatron_mbridge_restore.sh. Phase 1 converts Qwen3-0.6B to megatron-bridge format; phases 2 and 3 run SC GRPO on Qwen3-0.6B-Base with checkpointing.pretrained_checkpoint pointing at it (format=megatron_bridge, then megatron_lm via _bridge_to_mlm_helper.py). The checkpoint holds different weights than policy.model_name, which vLLM starts from, so each restore phase checks that the trainer loaded the pretrained path (never the policy model's own conversion) and that generation matches training (token_mult_prob_error), which holds only if the initial refit delivered the loaded weights to vLLM. Registered in L1_Functional_Tests_SingleController_5.sh as a fast entry, so the CI:Lfast functional lane runs it too. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Anish Mahishi <[email protected]>
macandro96
force-pushed
the
amahishi/sc-pretrained-ckpt-init
branch
from
December 2, 2026 23:39
966742d to
7cfb6b7
Compare
Contributor
Author
|
/ok to test 7cfb6b7 |
yuki-97
approved these changes
Dec 3, 2026
yuki-97
left a comment
Contributor
There was a problem hiding this comment.
Thanks for adding SingleController coverage for both Megatron restore formats.
Scope: Checkpoint provenance, initial refit, metric assertions and fast-suite registration.
Checked: Both restore phases completed two steps in CI. The largest measured token_mult_prob_error was 1.01551 against the 1.05 limit.
nemo-rl-review: kind=expert harness=codex/0.173.0 model=gpt-6.2-astra effort=medium review-pr-team=v3 reviewed=7cfb6b7
4 of 21 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What and why
Users can start RL training from their own Megatron checkpoint instead of the Hugging Face model, by setting
checkpointing.pretrained_checkpoint. This already had a test on the legacy GRPO path, but not on SingleController (SC).This PR adds that SC test. It restores a checkpoint in both supported formats (
megatron_bridgeandmegatron_lm) and checks that training and generation both use the restored weights.One improvement over the legacy test: the legacy test restores a copy of the same model it started with, so it would pass even if the checkpoint were ignored. Here the checkpoint comes from a different model with the same architecture (
Qwen3-0.6Bloaded into aQwen3-0.6B-Baserun), so the test fails if the checkpoint isn't actually used.No library changes were needed; the feature already works on SC.
Issues
Part of #5044
Convergence / perf / functionality proof
Test-only change. Passes locally on 2×H100. I also checked that it catches the bug it's meant to catch: when SC is changed to skip syncing the restored weights to vLLM, the test fails.
Needs upstream changes
None
PR commands and CI
CI:Lfast: the default for most PRs. Runs a fast test subset.CI:L1: dependency or container changes (pyproject.toml,uv.lock,Dockerfile) or broad core changes. Builds a new image and runs unit and functional tests.CI:docs: docs-only changes. Runs doc tests only./ok to test <full-commit-sha>: start CI for that commit. Post again after each push./nightly-ci test-case=<test>: run NVIDIA's nightly CI for the PR head; eligible teams only./review: automated review comments. Addmode=strictfor a stricter review,reset=truefor a fresh full review./resolve-conflict: Autobot mergesmaininto this PR and resolves the conflicts. PRs from forks must allow edits by maintainers./review-pr-team <pr-number>for a team review before you ask for human review.🤖 Generated with Claude Code