arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.26030cs.LGstat.ML
收藏

截断与否?带截断反向传播的循环Transformer的缩放研究

Truncate or Not? A Scaling Study of Looped Transformers with Truncated Backpropagation

Xuyuan Xiong, Siyu Chen, Zihan Shao, Yue Su, Weiyang Jin, Ping Luo, Zhuoran Yang, Xihui Liu

AI总结:

本研究通过近600次训练运行拟合缩放定律,发现联合优化循环次数时完整BPTT更优,确定两个完全训练的循环为最佳设置,其损失更低且参数与计算量更优。

摘要:

循环Transformer复用共享层块以在不增加可训练参数数量的情况下提升计算深度,其通过时间反向传播(BPTT)进行训练。为节省训练计算资源,BPTT常被截断至最后几个循环,不过这可能削弱循环的优势。为系统研究该权衡,我们在近600次训练运行中联合改变模型规模、训练token数以及前向和后向循环次数,并拟合了统一缩放定律,该定律通过有效参数捕捉循环与截断的影响。尽管截断可节省训练计算,我们拟合的定律表明,当前向和后向循环次数联合优化时,完整BPTT更具优势。在计算量匹配的运行中,通过更少循环的完整BPTT始终优于相同计算量的截断设置。该定律进一步显示,在固定模型规模下,计算最优循环次数和训练token预算均随计算量增长;当模型规模也自由时,该定律确定两个完全训练的循环为最佳循环设置。实验中,该设置比计算最优的非循环模型损失更低,且非嵌入参数少约27%,训练计算仅多8%。

英文摘要:

Looped transformers reuse a shared block of layers to increase computational depth without increasing the number of trainable parameters. They are trained with backpropagation through time (BPTT). To save training compute, BPTT is often truncated to the last few loops, but truncation yields biased gradients that may weaken the benefit of looping. In this work, we study the value of truncation in looped transformer training in a systematic way: we jointly vary model size, training tokens, and forward and backward loop counts across nearly 600 training runs and fit a unified scaling law that captures the effects of looping and truncation through effective parameters. Despite the training-compute savings of truncation, our fitted law favors full BPTT when forward and backward loop counts are jointly optimized. In matched-compute runs, full BPTT through fewer loops consistently outperforms truncated settings of the same compute. The law further shows that at fixed model size, the compute-optimal loop count and training-token budget both grow with compute. When model size is also free, the law identifies two fully trained loops as the best looped setting. Experimentally, this setting achieves lower validation loss than the compute-optimal non-looped model with about 27% fewer non-embedding parameters and only 8% more training compute.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑