You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PPO DTensor value-head initialization is nondeterministic across Ray worker launches #2953
The original report observed a much higher initial critic loss for DTensor PPO with value dynamic batching, while reward remained aligned: original PR discussion.
Follow-up experiments show that the mismatch was not caused by dynamic batching. It came from nondeterministic initialization of the DTensor value head across Ray worker launches.
Root cause
The PPO controller seeded its own process, but each DTensor value worker runs in a separate Ray process. The base causal-LM checkpoint does not contain a regression score head, so the head is initialized when the worker constructs the value model. Before the fix, the controller seed did not reach this initialization, and separate DB-OFF/DB-ON launches received different value heads.
MCore did not show the same cross-launch symptom because its worker setup already seeded model initialization. A shared numeric seed does not make fresh MCore and Automodel heads identical, because the two backends use different head implementations and initialization schemes.
Resolution
PR #3321 makes fresh DTensor value-model initialization reproducible and enables value dynamic batching:
add seed to the value configuration and default it to ${ppo.seed};
seed each DTensor value worker after distributed setup and before checkpoint-manager/model construction;
add fresh-initialization and checkpoint-pinned TP2+SP equivalence coverage for DB-OFF versus DB-ON.
Validation
Two independent Automodel launches with seed=42 saved the value model before the first optimizer step. All 584 checkpoint tensors matched exactly, including score.weight and score.bias:
These results isolate the original mismatch to value-head initialization rather than dynamic batching.
Related follow-up
Issue #3412 remains a separate follow-up. Fixing the value seed removes the fresh-head randomness confound, but does not eliminate the remaining critic-metric regression associated with the vLLM rollout-distribution change.
changed the title [-]PPO DTensor with dynamic batching has high critic loss at beginning[/-][+]PPO DTensor value-head initialization is nondeterministic across Ray worker launches[/+]on Aug 12, 2026
Activity
[-]PPO DTensor with dynamic batching has high critic loss at beginning[/-][+]PPO DTensor value-head initialization is nondeterministic across Ray worker launches[/+]