arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2301.13310cs.LGcs.CL
收藏

面向高效Transformer的交替更新方法

Alternating Updates for Efficient Transformers

Google Research(谷歌研究院);UC Berkeley(加州大学伯克利分校)

Cenk Baykal, Dylan Cutler, Nishanth Dikkala, Nikhil Ghosh, Rina Panigrahy, Xin Wang

AI总结:

针对Transformer扩规模带来的高计算成本与延迟问题,提出易于实现的交替更新(AltUp)方法,通过子块运算加预测校正机制拓宽表示且延迟增幅极小,可结合稀疏混合专家等方法,在多语言基准上实现同精度下最高87%的加速。

摘要:

众所周知,深度Transformer网络规模的扩大能够提升模型的质量与性能,但规模提升往往会带来难以承受的计算成本与推理延迟增长。我们提出交替更新(Alternating Updates,AltUp)——一种易于实现的方法,可在不带来计算负担的前提下提升模型容量。AltUp支持拓宽学习得到的表示(即token嵌入),且仅带来可忽略的延迟增长。其实现原理是:每一层仅对拓宽后表示的一个子块进行运算,并通过预测-校正机制更新未激活的块。我们还提出了AltUp的扩展方案,例如其在序列维度的适用性,并展示了AltUp可与现有方法(如稀疏混合专家Sparse Mixture-of-Experts模型)协同结合,以获得容量更高的高效模型。我们在基准Transformer模型和语言任务上的实验证明,AltUp在多种场景下均具备持续有效性。值得注意的是,在SuperGLUE和SQuAD基准上,在相同精度下,AltUp相较于稠密基线模型实现了最高87%的加速。

英文摘要:

It has been well established that increasing scale in deep transformer networks leads to improved quality and performance. However, this increase in scale often comes with prohibitive increases in compute cost and inference latency. We introduce Alternating Updates (AltUp), a simple-to-implement method to increase a model's capacity without the computational burden. AltUp enables the widening of the learned representation, i.e., the token embedding, while only incurring a negligible increase in latency. AltUp achieves this by working on a subblock of the widened representation at each layer and using a predict-and-correct mechanism to update the inactivated blocks. We present extensions of AltUp, such as its applicability to the sequence dimension, and demonstrate how AltUp can be synergistically combined with existing approaches, such as Sparse Mixture-of-Experts models, to obtain efficient models with even higher capacity. Our experiments on benchmark transformer models and language tasks demonstrate the consistent effectiveness of AltUp on a diverse set of scenarios. Notably, on SuperGLUE and SQuAD benchmarks, AltUp enables up to $87\%$ speedup relative to the dense baselines at the same accuracy.

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

↑