跳到正文
arXiv cs.AI· Chanakya Ekbote, Artidoro Pagnoni, Devendra Singh Sachan, Shruti Bhosale, Mike Lewis, Maryam Fazel-Zarandi, Shashank Rajput, Sujan Kumar Gonugondla·· 3 小时前AI 评分49

Transformer 循环机制如何做:循环缩放、专门化与并行推理

How to Loop Your Transformer: Loop Scaling, Specialization, and Parallel Inference

AI 导读

一项 arXiv 研究系统分析 Transformer 循环(复用权重反复应用)在参数量、训练算力和推理效率约束下的权衡,实验涵盖最多 1B 参数、155B token、1.07×10^21 FLOPs 和 32 次循环的模型。

正文 · 原文

View PDF HTML (experimental)

Abstract:Looping in transformer models reuses weights by repeatedly applying the same transformer, or parts of it, making the model deeper without increasing its parameter count. Whether looping is useful depends on which constraint dominates: model size, training compute, or autoregressive inference efficiency. We study these trade-offs jointly in dense decoder-only transformers trained from scratch, varying which parts of the model are looped, how many loops are applied, and how information is passed between loops. Our experiments span models with up to 1B parameters, trained on up to 155B tokens with up to $1.07\times10^{21}$ FLOPs and 32 loops. We find that looping the full transformer generally gives the strongest quality at a fixed parameter budget, whereas looping a middle block of layers gives a better return when training FLOPs are constrained. Adding loops is not uniformly beneficial: gains eventually saturate, reverse, or become unstable. This motivates asking whether forcing every loop to use the same weights limits the benefit of deeper looping. We address this by adding small loop-specific low-rank adapters that improve quality, with larger gains as more loops are added. Looped transformers also suffer a decoding slowdown proportional to the number of loops. Parallel Loop Transformers address this by passing hidden states between loops across adjacent token positions, allowing loop stages to run concurrently. However, in our experiments the original formulation does not consistently retain the quality gains of ordinary looping. We find that preserving the current-token embedding and separately normalizing it and the previous-token hidden state before combining them recovers strong performance across model scales and training budgets. Together, these results show that effective looping requires matching the design to the resource constraint and inference setting.
Comments: 149 pages with appendix. Prerpint
Subjects: Machine Learning (cs.LG); Artificial Intelligence (cs.AI)
Cite as: arXiv:2610.40325 [cs.LG]
  (or arXiv:2610.40325v1 [cs.LG] for this version)
  https://doi.org/10.48550/arXiv.2610.40325

arXiv-issued DOI via DataCite

Submission history

From: Sujan Kumar Gonugondla [view email]
[v1] Thu, 29 Oct 2026 15:56:09 UTC (5,376 KB)

来源:arXiv cs.AI · arxiv.org