2025-07-15 · 专家 · 机器学习 · 自然语言处理

Mixture-of-Recursions: Learning Dynamic Recursive Depths for Adaptive Token-Level Computation

这篇论文提出了混合递归(MoR),一种结合参数共享和自适应计算的统一框架,通过动态调整递归深度和高效的关键值缓存,实现了大规模语言模型的高效训练和部署。

更新于 2025-07-15。作者:Sangmin Bae、Yujin Kim、Reza Bayat、Sungnyun Kim、Jiyoun Ha、Tal Schuster、Adam Fisch、Hrayr Harutyunyan、Ziwei Ji、Aaron Courville、Se-Young Yun。

中文摘要

扩展语言模型解锁了令人印象深刻的性能,但随之而来的计算和内存需求使得训练和部署成本高昂。现有的效率努力通常针对参数共享或自适应计算,但如何同时实现这两者仍然是一个未解决的问题。我们引入了混合递归(MoR),这是一个统一的框架,它在一个递归变换器内部结合了效率的两个维度。MoR通过在递归步骤中重复使用共享的层堆栈来实现参数效率,而轻量级的路由器通过动态地为单个标记分配不同的递归深度,使自适应的标记级思考成为可能。这使得MoR只需在给定递归深度仍然活跃的标记之间进行二次注意力计算,通过选择性地缓存它们的关键值对,进一步提高了内存访问效率。除了这些核心机制之外,我们还提出了一种KV共享变体,它从第一次递归中重复使用KV对,专门设计用于减少预填充延迟和内存占用。在从1.35亿到17亿参数的模型规模范围内,MoR形成了一个新的帕累托前沿:在相同的训练FLOPs和更小的模型尺寸下,它显著降低了验证困惑度,并提高了少样本准确性,同时与原始和现有的递归基线相比,提供了更高的吞吐量。这些收益表明,MoR是走向大型模型质量的有效途径,而无需承担大型模型的成本。

英文摘要

Scaling language models unlocks impressive capabilities, but the accompanying computational and memory demands make both training and deployment expensive. Existing efficiency efforts typically target either parameter sharing or adaptive computation, leaving open the question of how to attain both simultaneously. We introduce Mixture-of-Recursions (MoR), a unified framework that combines the two axes of efficiency inside a single Recursive Transformer. MoR reuses a shared stack of layers across recursion steps to achieve parameter efficiency, while lightweight routers enable adaptive token-level thinking by dynamically assigning different recursion depths to individual tokens. This allows MoR to focus quadratic attention computation only among tokens still active at a given recursion depth, further improving memory access efficiency by selectively caching only their key-value pairs. Beyond these core mechanisms, we also propose a KV sharing variant that reuses KV pairs from the first recursion, specifically designed to decrease prefill latency and memory footprint. Across model scales ranging from 135M to 1.7B parameters, MoR forms a new Pareto frontier: at equal training FLOPs and smaller model sizes, it significantly lowers validation perplexity and improves few-shot accuracy, while delivering higher throughput compared with vanilla and existing recursive baselines. These gains demonstrate that MoR is an effective path towards large-model quality without incurring large-model cost.

解读

一句话总结

这篇论文提出了混合递归(MoR),一种结合参数共享和自适应计算的统一框架,通过动态调整递归深度和高效的关键值缓存,实现了大规模语言模型的高效训练和部署。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源