CopyLoop:免训练解码算法让 Looped Transformer 提速最高 10.70 倍
CopyLoop: Fast Looped Transformer Decoding via Context Copying and Shallow Screening
arXiv 上这篇论文提出了 CopyLoop,不用重新训练就能给 Looped Transformer 解码提速最高 10.70 倍,在 6 个模型检查点上验证过,做推理加速的可以看看。
CopyLoop 是一种免训练的解码算法,核心思路是用低成本上下文复制来提议多 token 后缀,再在浅层循环深度提前筛选掉错误分支。论文在 Ouro、Raven、Huginn 三个家族共 6 个模型检查点上测试,覆盖代码生成和多步数学推理。在 Base 模型上,CopyLoop 相比全深度自回归解码取得 2.98x 到 10.70x 的加速,在 Thinking 模型上为 2.74x 到 3.52x。消融实验显示浅层筛选与连续调度之间存在明显协同,且上下文可复用的长生成场景加速更高。
CopyLoop: Fast Looped Transformer Decoding via Context Copying and Shallow Screening
Looped Transformers increase computational capacity through the repeated application of shared blocks, but their recurrent depth makes conventional full-depth decoding expensive. While existing speculative pipelines accelerate generation by processing consecutive token positions at varying depths, they are typically limited by sequential decoding overheads. We introduce CopyLoop, a training-free decoding algorithm that combines low-cost context-copy proposals with shallow screening and continuous recurrent scheduling. Rather than step-by-step generation, CopyLoop proposes multi-token suffixes from repeated context. It then evaluates them early at a shallow recurrent depth to efficiently filter out incorrect branches, processing newer blocks concurrently while earlier blocks are still progressing toward full-depth verification. We evaluate CopyLoop across six model checkpoints from the Ouro, Raven, and Huginn families, covering code generation and multi-step mathematical reasoning. CopyLoop achieves decoding speedups of 2.98x--10.70x over full-depth autoregressive decoding on Base models and 2.74x--3.52x on Thinking models, consistently outperforming or closely matching all competing baselines across evaluation tasks. Furthermore, ablation studies confirm a strong synergy between shallow screening and continuous scheduling, while our analyses show that CopyLoop requires only lightweight model calibration and yields greater speedups on longer generations with reusable contexts.