Loops加MoE让语言模型更省显存还更快,还能提前输出。
Sparse Layers are Critical to Scaling Looped Language Models

- 用共享层循环+专家混合(MoE)提升模型表达力,不增参数
- 循环模型比标准模型在相同算力下质量更高,且可提前退出
- 适合追求高效推理、资源受限场景的开发者
循环语言模型通过重复一组Transformer层来降低内存开销,并在循环边界自然实现早期退出。然而,与具有唯一层的标准Transformer相比,循环模型的扩展性较差。我们对比了标准模型和专家混合(MoE)模型,有无循环的情况,发现两个关键结果:第一,循环MoE模型的扩展性能优于标准基线,而密集型循环模型则不然。我们将其归因于循环间的路由分歧:在循环MoE模型中,每次经过共享层时激活不同的专家,从而在不增加参数的前提下恢复表达能力。第二,循环模型在早期退出时具有更好的计算-质量权衡。由于每个循环结尾都使用相同的产生最终输出的层,循环边界成为更优的退出点,这由这些点上更早的输出收敛所证实。综上所述,我们为扩展循环模型提供了明确方向:带有早期退出的循环MoE模型不仅能超越标准Transformer的扩展能力,还能在几乎不损失质量的前提下实现显著的内存和推理节省。
原文摘要 · Abstract (English)
Looped language models repeat a set of transformer layers through depth, reducing memory costs and providing natural early-exit points at loop boundaries. However, looped models do not scale as favorably as standard transformers with unique layers. We compare standard and Mixture-of-Experts (MoE) transformers, with and without looping, and find two main results. First, we find Looped-MoE models scale better than the standard baseline while dense looped models do not. We trace this to routing divergence between loops: in Looped-MoE models, different experts are activated on each pass through the same shared layers, recovering expressivity without additional parameters. Our second finding is that looped models have better compute-quality trade-offs with early exits than standard models. Because each loop ends with the same layers that produce the final output, loop boundaries are superior exit points, as confirmed by earlier output convergence at these points. In sum, we provide a clear direction for scaling looped models: a Looped-MoE model with early exits can not only beat standard transformers at scale, but also enable significant memory and inference savings with minimal degradation in quality.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。