fix: load critic from policy checkpoints without value head - #2259
Open
Dodojordi wants to merge 1 commit into
Open
fix: load critic from policy checkpoints without value head#2259Dodojordi wants to merge 1 commit into
Dodojordi wants to merge 1 commit into
Conversation
Dodojordi
force-pushed
the
fix/critic-policy-checkpoint-value-head
branch
from
August 9, 2026 09:01
8a88537 to
9ce0b5c
Compare
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.
Summary
Loading a critic from a policy checkpoint can fail before slime gets a chance
to initialize the critic value head. This is especially visible with converted
Qwen3.5 checkpoints whose tied policy output head is absent from the distributed
checkpoint:
slime already detects a missing or shape-incompatible critic output layer and
plans to reinitialize it after checkpoint loading. However, Megatron's strict
distributed-checkpoint loader tries to restore that output layer first, so the
load fails before the existing reinitialization code can run.
This PR excludes only the incompatible critic value head from the checkpoint
load request. All shared transformer parameters remain strictly loaded. The
original value-head
Parameterobjects are then restored and initialized bythe existing critic initialization path.
Motivation
A policy language-model head and a critic value head are not interchangeable:
output-layer weight at all.
The runtime critic nevertheless owns an independent scalar
output_layer.When its
weightorbiasis missing from the checkpoint, or has the policyhead's incompatible shape, strict distributed-checkpoint loading treats this
as an error.
The existing metadata check correctly recognizes that the value head must be
reinitialized, but reinitializing it after a failed strict load is too late.
The incompatible tensors must be omitted from the load request itself.
Changes
reinit_critic_output_layercondition before loading.output_layer.weightandoutput_layer.biaswhile constructing/loading the checkpoint state.Parameterobjects in afinallyblock, includingwhen checkpoint loading raises an exception.
init_method_stdlow-precision optimizer's main parameters through the existing
reload_model_params()path.Normal actor loading and critic checkpoint resume are unchanged when the
checkpoint value head already has the expected shape.
Behavior
Validation
Added focused CPU unit tests covering:
Parameterobjects are restored afterward;Local checks:
The same loading strategy was also exercised in a ProRL Qwen3.5 TP=8 critic
smoke run (
pt-q35-vhead-smk-0807a): the converted distributed checkpointloaded successfully, the critic initialized, and a finite critic update was
completed.
Scope
This change does not relax checkpoint loading globally. It skips only a critic
value head that slime has already identified as missing or shape-incompatible;
unexpected mismatches in the rest of the model continue to fail strictly.