Training Inference Mismatch

Author

Updated

Nov, 04, 2026

Category

Introduction

现代的 RL 框架比如 verl (Sheng et al., 2025) 会使用不同的框架来完成 inference engine 和 training engine, 比如说使用 megatron (Shoeybi et al., 2020) 或者 FSDP (Zhao et al., 2023) 进行训练,使用 vLLM (Kwon et al., 2023) 或者 SGLang (Zheng et al., 2024) 进行推理。

尽管使用的模型一致,但由于 training engine 和 inference engine 的优化目标不同:前者要求数值稳定性和精度, 后者强调最大化 throughput.

这种优化目标的不一致使得 inference engine 和 training engine 的实现和最终输出不完全一致,最终体现为随着 RL 训练进行,gradient norm 会突然爆炸,reward 突然下降,模型训练崩溃。 实验结果如下图所示 【TODO】

我们将这个问题称为 training-inference mismatch (TIM) 问题。

本文我们将深入探讨 TIM 的原因,解决方法以及相关的前沿研究。

  1. Kwon, W., Li, Z., Zhuang, S., Sheng, Y., Zheng, L., Yu, C. H., Gonzalez, J. E., Zhang, H., & Stoica, I. (2023). Efficient Memory Management for Large Language Model Serving with PagedAttention. Proceedings of the ACM SIGOPS 29th Symposium on Operating Systems Principles.
  2. Sheng, G., Zhang, C., Ye, Z., Wu, X., Zhang, W., Zhang, R., Peng, Y., Lin, H., & Wu, C. (2025). HybridFlow: A Flexible and Efficient RLHF Framework. Proceedings of the Twentieth European Conference on Computer Systems, 1279–1297. 10.1145/3689031.3696075
  3. Shoeybi, M., Patwary, M., Puri, R., LeGresley, P., Casper, J., & Catanzaro, B. (2020). Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism. https://arxiv.org/abs/1909.08053
  4. Zhao, Y., Gu, A., Varma, R., Luo, L., Huang, C.-C., Xu, M., Wright, L., Shojanazeri, H., Ott, M., Shleifer, S., Desmaison, A., Balioglu, C., Damania, P., Nguyen, B., Chauhan, G., Hao, Y., Mathews, A., & Li, S. (2023). PyTorch FSDP: Experiences on Scaling Fully Sharded Data Parallel. https://arxiv.org/abs/2304.11277
  5. Zheng, L., Yin, L., Xie, Z., Sun, C., Huang, J., Yu, C. H., Cao, S., Kozyrakis, C., Stoica, I., Gonzalez, J. E., Barrett, C., & Sheng, Y. (2024). SGLang: Efficient Execution of Structured Language Model Programs. The Thirty-Eighth Annual Conference on Neural Information Processing Systems. https://openreview.net/forum?id=VqkAKQibpq

Problem Definition

我们首先从优化目标的角度来定义 TIM.

RL Objective and Policy Gradient

RL 的目标函数为

J(θ)=Ex∼D,y∼πθ(⋅∣x)[R(x,y)]\mathcal{J}(\theta) = \mathbb{E}_{x\sim\mathcal{D},y\sim\pi_{\theta}(\cdot\mid x)}[R(x,y)]

其中 πθ\pi_{\theta} 是优化的 policy, R(x,y)R(x,y) 是 reward function.

对应的梯度为

∇θJ(θ)=Ex∼D,y∼πθ(⋅∣x)[R(x,y)∇θlog⁡πθ(θ)]\nabla_{\theta}\mathcal{J}(\theta) =\mathbb{E}_{x\sim\mathcal{D},y\sim\pi_{\theta}(\cdot\mid x)}[R(x,y)\nabla_{\theta}\log\pi_{\theta}(\theta)]

其计算过程为,先从 πθ\pi_{\theta} 中采样得到轨迹 {(x,y,R(x,y))}\{(x,y, R(x,y))\}, 然后更新 πθ\pi_{\theta}

Training and Inference Policies

对于现代 RL 训练框架如 verl (Sheng et al., 2025) 来说,由于 training engine 和 inference engine 的不同,我们的采样的输出 yy 实际上来源不再是 πθ\pi_{\theta}, 而是 inference engine 如 vllm 或 SGLang 对 policy πθ\pi_{\theta} 的实现,我们将这个策略记为 μθ\mu_{\theta}.

此时,我们使用的梯度实际上是

∇θJbiased(θ)=Ex∼D,y∼μθ(⋅∣x)[R(x,y)∇θlog⁡πθ(θ)]\nabla_{\theta}\mathcal{J}_{\text{biased}}(\theta) =\mathbb{E}_{x\sim\mathcal{D},y\sim\mu_{\theta}(\cdot\mid x)}[R(x,y)\nabla_{\theta}\log\pi_{\theta}(\theta)]

所以,TIM 其实指的就是

∇θJ(θ)≠∇θJbiased(θ)\nabla_{\theta}\mathcal{J}(\theta) \neq \nabla_{\theta}\mathcal{J}_{\text{biased}}(\theta)

其具体原因在于

πθ(⋅∣x)≠μθ(⋅∣x)\pi_{\theta}(\cdot\mid x)\neq \mu_{\theta}(\cdot\mid x)

也就是说,inference engine 和 training engine 对于同一输入的输出概率不同。

  1. Sheng, G., Zhang, C., Ye, Z., Wu, X., Zhang, W., Zhang, R., Peng, Y., Lin, H., & Wu, C. (2025). HybridFlow: A Flexible and Efficient RLHF Framework. Proceedings of the Twentieth European Conference on Computer Systems, 1279–1297. 10.1145/3689031.3696075

Causes and Theoretical Analysis

这一节我们分析如何定量分析 TIM 以及可能导致 TIM 的原因

Kernel Consistency and Determinism

Discrepancy and Policy Staleness

我们使用 MiniRL (Zheng et al., 2025) 提出的框架来分析 TIM. 注意到我们可以将 importance sampling (IS) 重写为

πθ(y∣x)μθold(y∣x)=πθold(yt∣x,y<t)μθold(yt∣x,y<t)⋅πθ(yt∣x,y<t)πθold(yt∣x,y<t)\frac{\pi_{\theta}(y\mid x)}{\mu_{\theta_{\mathrm{old}}}(y\mid x) } = \frac{\pi_{\theta_{\mathrm{old}}}(y_t\mid x,y_{<t})}{\mu_{\theta_{\mathrm{old}}}(y_t\mid x,y_{<t})}\cdot \frac{\pi_{\theta}(y_t\mid x,y_{<t})}{\pi_{\theta_{\mathrm{old}}}(y_t\mid x,y_{<t})}

其中第一项代表了 TIM, 第二项代表了 policy staleness.

对于 TIM, 这一点主要是训练和推理精度不一致导致的,比如训练和推理使用了不同的 kernel 和实现方式等. Thinking Machine Lab, non-deterministic inference, numerical instability. 但是其问题在于

  1. 训练和推理引擎会使用不同的 kernel 来实现 peak performance
  2. 就算是一个 engine, batch-invariant kernels 也会被禁用来实现 maximum throughput.

https://zhuanlan.zhihu.com/p/1980312064305169845

对于 policy staleness, 这一点主要是我们使用了 micro batch 来提高训练效率。

早期大家研究的都是针对 dense model 的 RL 训练, dense model 由于连续性比较强,即 μθ(x)≈πθ(x)\mu_{\theta}(x)\approx \pi_{\theta}(x), 因此 TIM 现象并不严重。

但是,现在大部分模型都是 MoE 模型,MoE 模型的 MLP 是一个离散架构,由 router 来选取 topK 专家进行计算,然后再进行加权求和得到最终输出。 由于 router 的不连续性,现在 μθ(x)\mu_{\theta}(x) 和 πθ(x)\pi_{\theta}(x) 会出现比较大的误差,而这种误差会持续影响模型训练,最终导致训练崩溃。

MoE 模型的训练推理不一致性会进一步被放大,这是因为 MoE 模型中 router 输出的是离散的值,任何一点微小的扰动都会导致最终选取的专家有所不同,而这种不同又会进一步影响后面 layer 的结果。 随着训练进行,策略更新会进一步改变路由选择,加剧训练推理不一致性。

对于 MoE 模型,我们可以进一步将 IS 重写为

πθ(yt∣x,y<t)μθold(yt∣x,y<t)=πθ(yt∣x,y<t,etπ)μθold(yt∣x,y<t,eold,tπ)=πθold(yt∣x,y<t,eold,tπ)μθold(yt∣x,y<t,eold,tμ)⋅πθ(yt∣x,y<t,etπ)πθold(yt∣x,y<t,eold,tπ)\frac{\pi_{\theta}(y_t\mid x,y_{<t})}{\mu_{\theta_{\mathrm{old}}}(y_t\mid x,y_{<t}) } = \frac{\pi_{\theta}(y_t\mid x,y_{<t},\textcolor{red}{e_t^{\pi}})}{\mu_{\theta_{\mathrm{old}}}(y_t\mid x,y_{<t},\textcolor{red}{e_{\mathrm{old},t}^{\pi}}) } =\frac{\pi_{\theta_{\mathrm{old}}}(y_t\mid x,y_{<t},\textcolor{red}{e_{\mathrm{old},t}^{\pi}})}{\mu_{\theta_{\mathrm{old}}}(y_t\mid x,y_{<t},\textcolor{red}{e_{\mathrm{old},t}^{\mu}})}\cdot \frac{\pi_{\theta}(y_t\mid x,y_{<t},\textcolor{red}{e_t^{\pi}})}{\pi_{\theta_{\mathrm{old}}}(y_t\mid x,y_{<t},\textcolor{red}{e_{\mathrm{old},t}^{\pi}})}

这里 eπe^\pi, eμe^\mu 分别是训练和推理引擎的 routed experts. 可以看到,现在 importance sampling 在前面的基础上引入了额外的两项:

  1. 训练和推理引擎的 expert routing 不一致
  2. policy model πθ\pi_{\theta} 和旧 policy model πθold\pi_{\theta_{\mathrm{old}}} 的 expert routing 不一致

(Yao et al., 2025) 提出了 TODO

Measuring TIM with KL Divergence

前面已经提到,TIM 实际指的是 πθ(⋅∣x)≠μθ(⋅∣x)\pi_{\theta}(\cdot\mid x)\neq \mu_{\theta}(\cdot\mid x), 而这其实是两个概率分布,因此,一个比较直观的评估 metric 是衡量 μθold\mu_{\theta_{\mathrm{old}}} 和 πθ\pi_{\theta} 两个分布之间的区别,即 KL divergence

KLTIM=Ex∼D[KL(μθ(⋅∣x)∣∣πθ(⋅∣x))]\mathrm{KL}_{\mathrm{TIM}} = \mathbb{E}_{x\sim \mathcal{D}}\left[\mathrm{KL}(\mu_{\theta}(\cdot\mid x)\mid\mid \pi_{\theta}(\cdot\mid x))\right]

这里我们使用 sequence-wise KL divergence.

KLTIM\mathrm{KL}_{\mathrm{TIM}} 的计算方式如下

rollout_log_probs = batch.batch["rollout_log_probs"]
actor_old_log_probs = batch.batch["old_log_probs"]
response_mask = batch.batch["response_mask"]
log_ratio = actor_old_log_probs - rollout_log_probs
kl_tim_k3 = torch.exp(log_ratio) - log_ratio - 1
kl_tim_k3 = masked_mean(kl_tim_k3.response_mask)

这里我们使用了 k3 estimator 来近似进行计算。

已有研究发现:

  1. KLTIM\mathrm{KL}_{\mathrm{TIM}} 与 entropy 的 spike 的相关性非常高,而与 reward 的相关性没那么高
  2. 训练引擎会给 inference policy sample 的 token 极低的概率,导致梯度爆炸

TIM 的 pattern: KL divergence 对于推理引擎 μθold\mu_{\theta_{\mathrm{old}}} 采样概率低的 token 更大,特别是在 μθold(y∣y<t)\mu_{\theta_{\mathrm{old}}}(y\mid y_{<t}) 趋近 00 时。

另外,对于 MoE models, 基于前面的分析,我们还可以分析 πθ\pi_{\theta} 和 μθ\mu_{\theta} 的 routing 情况来监控是否有 TIM

TODO

  1. Yao, F., Liu, L., Zhang, D., Dong, C., Shang, J., & Gao, J. (2025). Your Efficient RL Framework Secretly Brings You Off-Policy RL Training. In Feng Yao’s Notion. https://fengyao.notion.site/off-policy-rl
  2. Zheng, C., Dang, K., Yu, B., Li, M., Jiang, H., Lin, J., Liu, Y., Lin, H., Wu, C., Hu, F., Yang, A., Zhou, J., & Lin, J. (2025). Stabilizing Reinforcement Learning with LLMs: Formulation and Practices. https://arxiv.org/abs/2512.01374

Solutions

解决 TIM 的方法可以分为两类:

  1. infra 上进行优化,解决 training engine 和 inference engine 实现不一致的问题
  2. algorithm 上进行优化,通过设计算法来解决不收敛的问题

Infra Optimizations

(Yao et al., 2025) 提到,我们可以

  1. 获取 inference engine 真实的采样概率
  2. 解决 inference engine 和 training engine 的数值不一致性
  3. deterministic kernel implementations

Numerical Precision

MiniMax-M1 (MiniMax et al., 2025) 提出了使用 FP32 的 lm head. Ring-Zero (Tang et al., 2026) 进一步使用了 FP32 精度来计算 attention 部分的 softmax.

(Qi et al., 2025) 提出了使用 FP16 精度来进行训练。 作者认为 BF16 精度在 post-training 阶段的精度太低,会影响最终结果。 FP16 进行训练时需要使用 dynamic scaling factor.

(Qi et al., 2025) 提出了使用 FP16 来进行 RL 训练。相较于 BF16,FP16 的尾数位更多、舍入误差更小,但指数范围也更窄。

Kernel Optimization

Ring-Flash-Linear-2.0 手动对齐了不同的 kernels,

Thinking Machine labs 提出了 batch-invariant inference kernels, 但是会导致训练效率降低。

  1. 利用 torch.compile 来固化 RoPE 实现,底层消除算子行为差异
  2. 通过 enable_batch_invariant_mode 来强制训练端采用与 SGLang 一致的算子,消除 batch size 对计算结果的影响
  3. training 和 inference 都使用 FlashAttention3 作为 backend, 来实现 bitwise equal
  4. 使用 DeepGEMM 进行矩阵乘法

Router Replay

在训练阶段,使用推理阶段的 MoE router, 避免 sample 时对 policy gradient 引入噪声。

  1. vanilla router replay: R2, 梯度更新时,replay inference engine 选中的专家,减少策略滞后性
  2. rollout router replay: R3, 在训练引擎中重放推理引擎选中的专家,减少训练推理差异。相关工作有 DeepSeek-V3.2 (DeepSeek-AI et al., 2025), (Ma et al., 2025)

MiMo-V2.6 (Xiaomi MiMo Team, 2026) 在 RL 训练的时候冻结了 router, 发现这样可以提高负载均衡

Sampling Mask Replay

(DeepSeek-AI et al., 2025) 提出了 sampling mask replay 来解决因为 top-p 和 top-k sampling 导致的 action space 不一致的问题

Algorithm Optimizations

Decoupled PPO and Sample Filtering

AreaL (Fu et al., 2026) 使用了 decoupled PPO (Hilton et al., 2022) 来构建 rollout generation 和 gradient computation 之间的关系,但是 AreaL 对于相差比较大的 sample, 会直接丢弃。

Truncated Importance Sampling

(Yao et al., 2025) 提出了使用 truncated importance sampling (TIS) 来优化 目标函数 的梯度, 新的梯度变为

∇θJ(θ)=Ex∼D,y∼μθold(y∣x)[min⁡(πθ(y∣x)μθold(y∣x),C)R(x,y)∇θlog⁡πθ(y∣x)]\htmlId{tis_reinforce_gradient}{\begin{equation} \nabla_{\theta}\mathcal{J}(\theta) = \mathbb{E}_{x\sim\mathcal{D}, y\sim\mu_{\theta_{\mathrm{old}}}(y\mid x)}\left[\min\left(\frac{\pi_{\theta}(y\mid x)}{\mu_{\theta_{\mathrm{old}}}(y\mid x) }, C\right)R(x,y)\nabla_{\theta}\log \pi_{\theta}(y\mid x)\right] \end{equation}}

其中 C>0C>0 是一个超参数。

对于 PPO (Schulman et al., 2017) 算法,其目标函数为

JPPO(θ)=Ex∼D,y∼μθold(y∣x)[min⁡(πθ(y∣x)πθold(y∣x)A^t,clip(πθ(y∣x)πθold(y∣x),1−ϵ,1+ϵ)A^t)]\mathcal{J}_{PPO}(\theta) = \mathbb{E}_{x\sim\mathcal{D}, y\sim\mu_{\theta_{\mathrm{old}}}(y\mid x)}\left[\min\left(\frac{\pi_{\theta}(y\mid x)}{\pi_{\theta_{\mathrm{old}}}(y\mid x) }\hat{A}_t,\mathrm{clip}\left(\frac{\pi_{\theta}(y\mid x)}{\pi_{\theta_{\mathrm{old}}}(y\mid x) },1-\epsilon,1+\epsilon\right)\hat{A}_t\right)\right]

使用 TIS 之后,梯度为

∇θJPPO(θ)=Ex∼D,y∼μθold(y∣x)[min⁡(πθ(y∣x)μθold(y∣x),C)∇θmin⁡(πθ(y∣x)πθold(y∣x)A^t,clip(πθ(y∣x)πθold(y∣x),1−ϵ,1+ϵ)A^t)]\htmlId{tis_ppo_gradient}{\begin{equation} \nabla_{\theta}\mathcal{J}_{PPO}(\theta) = \mathbb{E}_{x\sim\mathcal{D}, y\sim\mu_{\theta_{\mathrm{old}}}(y\mid x)}\left[\min\left(\frac{\pi_{\theta}(y\mid x)}{\mu_{\theta_{\mathrm{old}}}(y\mid x) }, C\right)\nabla_{\theta}\min\left(\frac{\pi_{\theta}(y\mid x)}{\pi_{\theta_{\mathrm{old}}}(y\mid x) }\hat{A}_t,\mathrm{clip}\left(\frac{\pi_{\theta}(y\mid x)}{\pi_{\theta_{\mathrm{old}}}(y\mid x) },1-\epsilon,1+\epsilon\right)\hat{A}_t\right)\right] \end{equation}}

Masked Importance Sampling

Sequence-Level MIS

(Liu et al., 2025) 提出了 sequence level 的 MIS

Jseq−mis(θ)=Ex∼D,y∼μθold(y∣x)[ρ⋅1(ρ≤C)⋅min⁡(πθ(y∣x)πθold(y∣x)A^t,clip(πθ(y∣x)πθold(y∣x),1−ϵ,1+ϵ)A^t)]\mathcal{J}_{seq-mis}(\theta) = \mathbb{E}_{x\sim\mathcal{D}, y\sim\mu_{\theta_{\mathrm{old}}}(y\mid x)}\left[\rho\cdot\mathbf{1}\left(\rho \leq C\right)\cdot\min\left(\frac{\pi_{\theta}(y\mid x)}{\pi_{\theta_{\mathrm{old}}}(y\mid x) }\hat{A}_t,\mathrm{clip}\left(\frac{\pi_{\theta}(y\mid x)}{\pi_{\theta_{\mathrm{old}}}(y\mid x) },1-\epsilon,1+\epsilon\right)\hat{A}_t\right)\right]

其中

ρ=πθ(y∣x)μθold(y∣x)\rho = \frac{\pi_{\theta}(y\mid x)}{\mu_{\theta_{\mathrm{old}}}(y\mid x)}
DeepSeek-V3.2: Rollout Masking

DeepSeek-V3.2 (DeepSeek-AI et al., 2025) 提出了针对 rollout 的的 binary mask

JGRPO(θ)=Ex∼D,yi∼μθold(y∣x),i=1,…,G[1G∑i=1G1∣yi∣∑t=1∣yi∣Mi,t⋅min⁡(ri,t(θ)A^i,t,clip(ri,t(θ),1−ϵ,1+ϵ)A^t)]\mathcal{J}_{GRPO}(\theta) = \mathbb{E}_{x\sim\mathcal{D}, y_i\sim\mu_{\theta_{\mathrm{old}}}(y\mid x),i=1,\dots,G}\left[\frac{1}{G}\sum_{i=1}^G\frac{1}{|y_i|}\sum_{t=1}^{|y_i|}\mathcal{M}_{i,t}\cdot\min\left(r_{i,t}(\theta)\hat{A}_{i,t},\mathrm{clip}\left(r_{i,t}(\theta),1-\epsilon,1+\epsilon\right)\hat{A}_t\right)\right]

其中

ri,t(θ)=πθ(yi,t∣yi,<t,x)πθold(yi,t∣yi,<t,x)r_{i,t}(\theta) = \frac{\pi_{\theta}(y_{i,t}\mid y_{i,<t},x)}{\pi_{\theta_{old}}(y_{i,t}\mid y_{i,<t},x)}

Mi,tM_{i,t} 是针对 advantage 为负的 sequence 的 masking

Mi,t={0, if A^i,t<0,1∣yi∣∑i=1∣yi∣log⁡ri,t>δ1, otherwise\mathcal{M}_{i,t} = \begin{cases} 0, &\text{ if } \hat{A}_{i,t}<0,\frac{1}{|y_i|}\sum_{i=1}^{|y_i|}\log r_{i,t}>\delta\\ 1, &\text{ otherwise} \end{cases}
IcePop: Ratio-Based Masking

IcePop (Zhao et al., 2025) 提出了基于 mask 的 importance sampling 方法,其目标函数如下所示

JIcePop(θ)=Ex∼D,y∼μθold(y∣x)[M(πθ(y∣x)μθold(y∣x),α,β)⋅min⁡(πθ(y∣x)πθold(y∣x)A^t,clip(πθ(y∣x)πθold(y∣x),1−ϵ,1+ϵ)A^t)]\mathcal{J}_{IcePop}(\theta) = \mathbb{E}_{x\sim\mathcal{D}, y\sim\mu_{\theta_{\mathrm{old}}}(y\mid x)}\left[\mathcal{M}\left(\frac{\pi_{\theta}(y\mid x)}{\mu_{\theta_{\mathrm{old}}}(y\mid x)},\alpha,\beta\right)\cdot\min\left(\frac{\pi_{\theta}(y\mid x)}{\pi_{\theta_{\mathrm{old}}}(y\mid x) }\hat{A}_t,\mathrm{clip}\left(\frac{\pi_{\theta}(y\mid x)}{\pi_{\theta_{\mathrm{old}}}(y\mid x) },1-\epsilon,1+\epsilon\right)\hat{A}_t\right)\right]

其中

M(x,α,β)={x, if k∈[α,β]0, otherwise\mathcal{M}\left(x,\alpha,\beta\right) = \begin{cases} x, &\text{ if } k\in [\alpha,\beta]\\ 0, &\text{ otherwise} \end{cases}
KPop: Binary KL-Based Masking

但是,随着训练进行, IcePop mask 的 token 数越来越少,导致 TIM 现象仍然存在,为了解决这个问题,KPop (Guo et al., 2026) 进行了优化,最终目标函数一致,但是 mask 区域变成了

M(yt;ϕ)=1(KLB(πθ(yt∣y<t,x)∣∣μθold(yt∣y<t,x))≤ϕ)⋅1(KLB(μθold(yt∣y<t,x)∣∣πθ(yt∣y<t,x))≤ϕ)\mathcal{M}\left(y_t;\phi\right) = \mathbf{1}\left(\mathrm{KL}_B(\pi_{\theta}(y_t\mid y_{<t},x)\mid\mid \mu_{\theta_{\mathrm{old}}}(y_t\mid y_{<t},x))\leq \phi\right)\cdot \mathbf{1}\left(\mathrm{KL}_B(\mu_{\theta_{\mathrm{old}}}(y_t\mid y_{<t},x)\mid\mid \pi_{\theta}(y_t\mid y_{<t},x))\leq \phi\right)

其中 KLB(P(x)∣∣Q(x))\mathrm{KL}_B(P(x)\mid\mid Q(x)) 是 symmetry binary KL:

KLB(P(x)∣∣Q(x))=P(x)log⁡P(x)Q(x)+(1−P(x))log⁡1−P(x)1−Q(x)\mathrm{KL}_B(P(x)\mid\mid Q(x)) = P(x)\log \frac{P(x)}{Q(x)} + (1-P(x))\log\frac{1-P(x)}{1-Q(x)}
IPO: Probability-Difference Masking

Prime RL 使用了 IPO (Team, 2026), 作者认为 IcePop 使用的比值可能存在较大误差, 比如概率从 0.010.01 提高到 0.060.06 变化了 6 倍而被 mask, 从 0.90.9 变化到 0.20.2 仅变化 0.220.22 倍而被保留。因此,作者的做法是使用 difference 来决定是否 mask:

∣πθ(yi,t∣yi,<t,x)−μθ(yi,t∣yi,<t,x)∣>ϵ|\pi_{\theta}(y_{i,t}\mid y_{i,<t},x) - \mu_{\theta}(y_{i,t}\mid y_{i,<t},x)|> \epsilon

通过实验作者发现,IPO 比 IcePop 更加稳定。

  1. DeepSeek-AI, Liu, A., Mei, A., Lin, B., Xue, B., Wang, B., Xu, B., Wu, B., Zhang, B., Lin, C., Dong, C., Lu, C., Zhao, C., Deng, C., Xu, C., Ruan, C., Dai, D., Guo, D., Yang, D., … Qu, Z. (2025). DeepSeek-V3.2: Pushing the Frontier of Open Large Language Models. https://arxiv.org/abs/2512.02556 back: 1, 2, 3
  2. Fu, W., Gao, J., Shen, X., Zhu, C., Mei, Z., He, C., Xu, S., Wei, G., Mei, J., Wang, J., Yang, T., Yuan, B., & Wu, Y. (2026). AReaL: A Large-Scale Asynchronous Reinforcement Learning System for Language Reasoning. https://arxiv.org/abs/2505.24298
  3. Guo, J., Sun, Y., Huang, Z., Wang, Z., Wen, Z., Zhang, Z., Zhou, J., & Kok, S. (2026). KPop: Taming Training–Inference Mismatch in Reinforcement Learning with Adaptive Masking Regions. https://ringtech.notion.site/kpop
  4. Hilton, J., Cobbe, K., & Schulman, J. (2022). Batch size-invariance for policy optimization. https://arxiv.org/abs/2110.00641
  5. Liu, J., Li, Y., Fu, Y., Wang, J., Liu, Q., & Jiang, Z. (2025, September). When Speed Kills Stability: Demystifying RL Collapse from the Training-Inference Mismatch. https://richardli.xyz/rl-collapse
  6. Ma, W., Zhang, H., Zhao, L., Song, Y., Wang, Y., Sui, Z., & Luo, F. (2025). Stabilizing MoE Reinforcement Learning by Aligning Training and Inference Routers. https://arxiv.org/abs/2510.11370
  7. MiniMax, :, Chen, A., Li, A., Gong, B., Jiang, B., Fei, B., Yang, B., Shan, B., Yu, C., Wang, C., Zhu, C., Xiao, C., Du, C., Zhang, C., Qiao, C., Zhang, C., Du, C., Guo, C., … Sun, Z. (2025). MiniMax-M1: Scaling Test-Time Compute Efficiently with Lightning Attention. https://arxiv.org/abs/2506.13585
  8. Qi, P., Liu, Z., Zhou, X., Pang, T., Du, C., Lee, W. S., & Lin, M. (2025). Defeating the Training-Inference Mismatch via FP16. https://arxiv.org/abs/2510.26788 back: 1, 2
  9. Schulman, J., Wolski, F., Dhariwal, P., Radford, A., & Klimov, O. (2017). Proximal Policy Optimization Algorithms. https://arxiv.org/abs/1707.06347
  10. Tang, X., Cao, Q., Liu, Y., Zhan, Y., Lan, X., Li, Y., Yan, Y., Peng, H., Dong, Z., Zhang, Z., Wang, T., Kong, X., Wen, Z., Zhao, W. X., Zhang, Z., & Zhou, J. (2026). Ring-Zero: Scaling Zero RL to a Trillion Parameters for Emergent Reasoning. https://arxiv.org/abs/2607.12395
  11. Team, P. I. (2026). prime-rl 0.10.0: faster training, our new RL loss IPO, and one unified eval stack. Prime Intellect Blog.
  12. Xiaomi MiMo Team. (2026). MiMo-V2.6-Pro-RL. https://huggingface.co/XiaomiMiMo/MiMo-V2.6-Pro-RL
  13. Yao, F., Liu, L., Zhang, D., Dong, C., Shang, J., & Gao, J. (2025). Your Efficient RL Framework Secretly Brings You Off-Policy RL Training. In Feng Yao’s Notion. https://fengyao.notion.site/off-policy-rl back: 1, 2
  14. Zhao, X., Liu, Y., Xu, K., Guo, J., Wang, Z., Sun, Y., Kong, X., Cao, Q., Jiang, L., Wen, Z., Zhang, Z., & Zhou, J. (2025). Small Leak Can Sink a Great Ship–Boost RL Training on MoE with IcePop! https://ringtech.notion.site/icepop

Engineering Practices

Framework Implementations

Methods Used in Models

MethodModelsDescription
FP32 lm headMiniMax-M1
R3MAI-thinking-1, MiMo-V2-Flashreplay routing (default)
IcePop, KpopLing-2.6TIS
TISRing-Zero
MISNemotron-3-Super
  1. Team, T. M. A. (2026). MAI-Thinking-1: Building a Hill-Climbing Machine [Techreport]. Microsoft AI. https://microsoft.ai/pdf/mai-thinking-1.pdf
  2. Zheng, C., Liu, S., Li, M., Chen, X.-H., Yu, B., Gao, C., Dang, K., Liu, Y., Men, R., Yang, A., Zhou, J., & Lin, J. (2025). Group Sequence Policy Optimization. https://arxiv.org/abs/2507.18071