Multiplication-Free Transformer Training via Piecewise Affine Operations
Atli Kosson, Martin Jaggi
摘要
Multiplications are responsible for most of the computational cost involved in neural network training and inference. Recent research has thus looked for ways to reduce the cost associated with them. Inspired by Mogami (2020), we replace multiplication with a cheap piecewise affine approximation that is achieved by adding the bit representation of the floating point numbers together as integers. We show that transformers can be trained with the resulting modified matrix multiplications on both vision and language tasks with little to no performance impact, and without changes to the training hyperparameters. We further replace all non-linearities in the networks making them fully and jointly piecewise affine in both inputs and weights. Finally, we show that we can eliminate all multiplications in the entire training process, including operations in the forward pass, backward pass and optimizer update, demonstrating the first successful training of modern neural network architectures in a fully multiplication-free fashion.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 1 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Adder Attention for Vision Transformer 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Adder Attention for Vision Transformer 引用了 AdderNet: Do We Really Need Multiplications in Deep Learning?
- Adder Attention for Vision Transformer 引用了 Training data-efficient image transformers & distillation through attention
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale 引用了 On the Relationship between Self-Attention and Convolutional Layers
- Training data-efficient image transformers & distillation through attention 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
引用它的顶会 Paper1
它引用的 Paper5
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
- Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa 等ICML 2021 · 8,974 次引用
- On the Relationship between Self-Attention and Convolutional LayersJean-Baptiste Cordonnier, Andreas Loukas, Martin JaggiICLR 2020 · 629 次引用
- Adder Attention for Vision TransformerHan Shu, Jiahao Wang, Hanting Chen, Lin Li 等NeurIPS 2021 · 23 次引用
- AdderNet: Do We Really Need Multiplications in Deep Learning?Hanting Chen, Yunhe Wang, Chunjing Xu, Boxin Shi 等CVPR 2020
相关 Paper
- Is Integer Arithmetic Enough for Deep Learning Training?Alireza Ghaffari, Marzieh S. Tahaei, Mohammadreza Tayaranian, Masoud Asgharian 等NeurIPS 2022 · 22 次引用
- ShiftAddNet: A Hardware-Inspired Deep NetworkHaoran You, Xiaohan Chen, Yongan Zhang, Chaojian Li 等NeurIPS 2020 · 99 次引用
- Training Transformers with 4-bit IntegersHaocheng Xi, Changhao Li, Jianfei Chen, Jun ZhuNeurIPS 2023 · 96 次引用
- IM-Unpack: Training and Inference with Arbitrarily Low Precision IntegersZhanpeng Zeng, Karthikeyan Sankaralingam, Vikas SinghICML 2024 · 1 次引用
- Fully Quantized Transformer for Machine TranslationGabriele Prato, Ella Charlaix, Mehdi RezagholizadehEMNLP Findings 2020 · 62 次引用
