Hugging Face Daily Papers论文
迈向正确的循环模型(二):在不动点处重新思考
该研究针对循环语言模型(Looped Models)的训练与推理成本问题,提出基于不动点(Fixed Points)的优化方法。核心观点是当循环状态接近不动点时,到达该状态的路径依赖性降低。据此实现了四项改进:训练中使用截断反向传播;解码时通过终端键值(KV)共享实现几乎无损的精度提升;蒸馏学生模型预填充速度提升1.79倍;强化学习更新利用保存的 rollout 状态计算梯度,速度比传统反向传播快2倍。
这篇是正式发表的长论文,站内提供中文解读,全文请到原文阅读 PDF。
Abstract
Every recurrence of a looped language model adds cost in training, decoding, prefill, and reinforcement learning (RL). The closer recurrent states get to fixed points, the less the path to them matters. This enables truncated backpropagation in training; terminal key-value (KV) sharing for decoding with almost no loss in accuracy; a distilled student that prefills up to 1.79x faster; and RL updates that compute gradients from saved rollout states, 2x faster than backpropagating through the replayed trajectory. We therefore improve the two components of training that shape these fixed points: the depth prior and input injection. Fixed-depth training breaks KV sharing, and Huginn's broad depth prior supports sharing but dilutes supervision at the target depth more than sharing requires; we learn the prior from prediction feedback, with an entropy term that keeps it broad. Existing injection schemes let the state's component along the input amplify or cancel the injection; we remove this component with orthogonal injection. From 100M to 1.6B parameters, the learned prior and orthogonal injection lower perplexity at every scale relative to Huginn's prior and existing injection schemes, respectively. At 1.6B, the learned prior with a 3x smaller KV cache matches the downstream average of fixed-depth training with the full cache.
Scaling up a model has meant paying twice, in compute and in memory.We show that looped models can pay in compute alone, using the loop's fixed point as a shortcut.
A 1.6B looped model runs twelve blocks deep on four blocks of memory. On the same tokens, it beats a four-block Transformer by 17.5% and comes within 2.4% of a twelve-block one needing 3x memory. It can also train, pre-fill, and post-train without paying for every loop.
Code: github.com/ifm-ai/xllm-loop