Two fixes for two different halves
The trainer and the engine compute the same model with different kernels, so their log probabilities differ. Deterministic inference fixes only the engine half: the same input gives the same output for any batch. True on-policy mode fixes the gap itself by making both sides run the same kernels, which works only where its contract holds: FlashAttention 3 on Hopper GPUs, compute capability 9.0, and Qwen3 dense models.
trainer, FSDP
its own attention kernel
its own matmul and sum order
engine, SGLang
its attention backend
sum order changes with batch
gap about 0.015
deterministic inference
engine repeats itself, any batch
gap stays about 0.015 in our runs
true on-policy contract
same kernels on both sides
gap goes to zero, where the contract holds
WHAT THE CONTRACT PINS AT MILES MAIN
FlashAttention 3 on both sides, Hopper GPUs only
Qwen3 dense models only
A GB10 is compute capability 12.1, so the contract does not start there.