arXiv Science⌕ Search

arXiv subjects

Yongguang Lin

Publications and source records attributed to Yongguang Lin.

2 recordsLinked to original sources

Different Parallelism, Same Bits: Bitwise-Consistent LLM Reinforcement Learning with Unimatch

Reinforcement learning (RL) of LLMs computes each token's probability twice, once in rollout and once in the trainer, and expects the two to be bitwise consistent. In practice they differ, and this training-inference mismatch (TIM) can make training collapse. TIM mainly comes from parallelism. An engine splits its computation across GPUs, runs the pieces in parallel, and combines their results by a reduction, mostly an addition. Floating-point addition is non-associative, so adding in different orders gives different results. Existing work takes two directions. The first forces rollout and the trainer to add in one agreed order. Each engine then gives up its own configuration (e.g., its batch size and parallel degrees), which can cost up to 91% of the training throughput. The second keeps parallelism and mitigates TIM in the algorithm, which adds up to 47% to the step time and leaves the mismatch. Both thus trade parallelism against bitwise consistency, and the two appear to conflict. Our key insight is that what really conflicts with bitwise consistency is not parallelism, but the non-associative reductions in parallelism. If these reductions are eliminated, the two can coexist. We present Unimatch, which makes these reductions associative with two techniques. Structural elimination changes how a computation is split, so that each GPU computes complete outputs and the reduction is a gather without any addition. Arithmetic elimination changes the operation of a reduction to integer addition, which is associative. With Unimatch, the two engines return bitwise-identical results under their own configurations, and Unimatch achieves the performance of the unmodified engines (0.98-1.04x their step time). In 300 RL steps on Qwen3-30B-A3B, training on the unmodified engines collapses, with and without a standard algorithmic mitigation, and training with Unimatch keeps improving.

cs.DC↗

Beyond Uniform Token-Level Trust Region in LLM Reinforcement Learning

Reinforcement learning with verifiable rewards (RLVR) has become standard for improving LLM reasoning. However, existing PPO-style trust-region mechanisms remain position-agnostic by enforcing uniform thresholds across all tokens independently. This pointwise treatment conflicts with autoregressive generation in two critical ways. First, uniform thresholds ignore autoregressive asymmetry. Early-stage deviations produce compounding sequence-level drift, causing static thresholds to under-regulate early divergence and excessively constrain late-stage exploration. Second, evaluating token-level divergence in isolation overlooks cumulative prefix drift, granting the same divergence allowance regardless of how far the conditioning history has already deviated from the rollout policy. To address this limitation, we propose CPPO (Cumulative Prefix-divergence Policy Optimization), a token-level masking rule that aligns updates with a finite-horizon policy-improvement bound via two coupled mechanisms. First, a position-weighted threshold imposes stricter limits at early positions whose effects persist longer, relaxing constraints for late-stage tokens. Second, a cumulative prefix budget tracks historical deviations, dynamically restricting further token-level deviation to prevent compounding errors along the prefix. Empirically, CPPO enhances training stability and significantly improves reasoning accuracy across various model scales.

cs.LG↗