CopyLoop:通过上下文复制与浅层筛选实现的快速循环Transformer解码
CopyLoop: Fast Looped Transformer Decoding via Context Copying and Shallow Screening
AI总结:
提出无需训练的CopyLoop解码算法,结合上下文复制、浅层筛选与连续循环调度,在6个模型检查点上较全深度自回归解码实现2.74x-10.70x加速,性能优于或接近竞争基线。
摘要:
循环Transformer通过重复应用共享模块提升计算能力,但其循环深度使得传统全深度解码成本高昂。现有推测流水线虽通过在不同深度处理连续token位置加速生成,但通常受限于顺序解码开销。我们提出CopyLoop,一种无需训练的解码算法,结合低成本上下文复制提议、浅层筛选与连续循环调度。CopyLoop并非逐步生成,而是从重复上下文提出多token后缀,随后在浅层循环深度早期评估以高效过滤错误分支,在早期模块仍向全深度验证推进时,并行处理更新的模块。我们在Ouro、Raven、Huginn系列的6个模型检查点上评估CopyLoop,涵盖代码生成与多步数学推理。CopyLoop在Base模型上较全深度自回归解码实现2.98x至10.70x的解码加速,在Thinking模型上实现2.74x至3.52x的加速,在所有评估任务中始终优于或接近所有竞争基线。此外,消融研究证实浅层筛选与连续调度间存在强协同作用,分析显示CopyLoop仅需轻量模型校准,且在具有可重用上下文的更长生成中能获得更大加速。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。