arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2311.01906cs.LG
收藏

简化Transformer块

Simplifying Transformer Blocks

ETH Zurich(苏黎世联邦理工学院)

Bobby He, Thomas Hofmann

AI总结:

本研究基于信号传播理论简化标准Transformer块,移除跳跃连接、归一化层等组件,在保持训练速度和性能的同时实现15%的训练加速和参数减少。

摘要:

深度Transformer的一种简单设计配方是构建相同的构建块。但标准transformer块远非简单,它将注意力与MLP子块交织,并带有跳跃连接和归一化层,这些都是精确的方案。这种复杂性导致架构脆弱,微小的变化就可能显著影响训练速度,或使模型无法训练。在本研究中,我们探讨标准transformer块能在多大程度上被简化?结合信号传播理论和经验观察,我们提出了允许移除许多块组件而不损失训练速度的修改方案,包括跳跃连接、投影或值参数、顺序子块和归一化层。在自回归仅解码器和BERT仅编码器模型的实验中,我们简化的transformers在每次更新的训练速度和性能上与标准transformers相当,同时训练吞吐量快15%,参数量减少15%。

英文摘要:

A simple design recipe for deep Transformers is to compose identical building blocks. But standard transformer blocks are far from simple, interweaving attention and MLP sub-blocks with skip connections & normalisation layers in precise arrangements. This complexity leads to brittle architectures, where seemingly minor changes can significantly reduce training speed, or render models untrainable. In this work, we ask to what extent the standard transformer block can be simplified? Combining signal propagation theory and empirical observations, we motivate modifications that allow many block components to be removed with no loss of training speed, including skip connections, projection or value parameters, sequential sub-blocks and normalisation layers. In experiments on both autoregressive decoder-only and BERT encoder-only models, our simplified transformers emulate the per-update training speed and performance of standard transformers, while enjoying 15% faster training throughput, and using 15% fewer parameters.

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

↑