Soft-MTP 修正多 Token 预测梯度干扰问题
研究团队发现标准多 Token 预测(MTP)训练存在梯度缺陷:MTP 交叉熵梯度中混入低信噪比的残差项,随规模增大而愈发干扰下一 Token 预测与多 Token 学习。他们提出 KL 梯度恢复技巧,通过直通梯度路由从交叉熵梯度中精确还原 KL 自蒸馏项,实现 Soft-MTP——仅需一行代码改动,无需词表级 logit 矩阵,且兼容标准融合交叉熵内核。实验显示其在 1.2B 规模微调后数学与代码推理更强,多数指标不逊于直接最小化 KL。
报道正文
Abstract Prediction (MTP) is now a common ingredient in language-model pre-training, as it improves downstream performance and enables faster inference through speculative decoding. We identify a flaw in standard MTP training, in which a residual component of the MTP gradient interferes with both next-token and multi-token learning, increasingly so with scale. Specifically, the MTP cross-entropy gradient can be decomposed exactly into a KL self-distillation term that pulls each MTP head toward the model's own next-token prediction (NTP) distribution and improves speculative decoding, and a residual that has a low signal-to-noise ratio and buries the useful KL signal. We introduce the KL gradient-recovery trick: when two distributions share a linear output head, the gradient of their KL divergence can be recovered exactly by combining their cross-entropy gradients through straight-through gradient routing. Unlike minimizing the KL directly, this trick requires no vocabulary-sized logit matrices and is compatible with standard fused cross-entropy kernels. This enables Soft Multi-Token Prediction (Soft-MTP), a one-line code change to MTP that removes the noisy residual and backpropagates only the KL self-distillation signal by reusing the existing NTP and MTP cross-entropy computations. Soft-MTP supports both DeepSeek- and Meta-style MTP, adds no parameters, and incurs no measurable overhead. From 167M to 1.2B parameters, Soft-MTP improves over standard MTP with lower NTP perplexity, faster speculative decoding and higher zero-shot accuracy at every scale, lower MTP perplexity from 689M onward, and stronger math and code reasoning after fine-tuning at 1.2B. Soft-MTP also matches, if not exceeds, direct KL divergence minimization on most metrics. Soft-MTP is, in effect, a free lunch for MTP optimization. Our code can be found at this https URL.