Proceedings

A Survey on Efficient Training of Transformers

Download BibTeX Cite

Proceedings of the Thirty-Second International Joint Conference on Artificial Intelligence. Survey Track. Pages 6823-6831.

https://doi.org/10.24963/ijcai.2023/764

Abstract

Recent advances in Transformers have come with a huge requirement on computing resources, highlighting the importance of developing efficient training techniques to make Transformer training faster, at lower cost, and to higher accuracy by the efficient use of computation and memory resources. This survey provides the first systematic overview of the efficient training of Transformers, covering the recent progress in acceleration arithmetic and hardware, with a focus on the former. We analyze and compare methods that save computation and memory costs for intermediate tensors during training, together with techniques on hardware/algorithm co-design. We finally discuss challenges and promising areas for future research.

  1. [Aghajanyan et al., 2021] Armen Aghajanyan, Sonal Gupta, et al. Intrinsic dimensionality explains the effectiveness of language model fine-tuning. In ACL, 2021.
  2. [Allen-Zhu et al., 2019a] Zeyuan Allen-Zhu, Yuanzhi Li, and Yingyu Liang. Learning and generalization in over- parameterized neural networks, going beyond two layers. In NeurIPS, 2019.
  3. [Allen-Zhu et al., 2019b] Zeyuan Allen-Zhu, Yuanzhi Li, and Zhao Song. A convergence theory for deep learning via over-parameterization. In ICML, 2019.
  4. [Arora et al., 2018] Sanjeev Arora, Nadav Cohen, and Elad Hazan. On the optimization of deep networks: Implicit acceleration by overparameterization. In ICML, 2018.
  5. [Bachlechner et al., 2021] Thomas Bachlechner, Bod- hisattwa Prasad Majumder, et al. Rezero is all you need: Fast convergence at large depth. In UAI, 2021.
  6. [Bao et al., 2022] Hangbo Bao, Li Dong, et al. Beit: Bert pre-training of image transformers. In ICLR, 2022.
  7. [Beaumont et al., 2021] Olivier Beaumont, Eyraud-Dubois, et al. Efficient combination of rematerialization and of- floading for training dnns. In NeurIPS, 2021.
  8. [Bian et al., 2021] Zhengda Bian, Hongxin Liu, et al. Colossal-ai: A unified deep learning system for large-scale parallel training. arXiv preprint arXiv:2110.14883, 2021.
  9. [Bottou et al., 2018] Léon Bottou, Frank E Curtis, and Jorge Nocedal. Optimization methods for large-scale machine learning. SIAM Review, 2018.
  10. [Brown et al., 2020] Tom Brown, Benjamin Mann, Nick Ry- der, Melanie Subbiah, et al. Language models are few-shot learners. In NeurIPS, 2020.
  11. [Cambier et al., 2020] Léopold Cambier, Anahita Bhiwandi- walla, et al. Shifted and squeezed 8-bit floating point for- mat for low-precision training of deep neural networks. In ICLR, 2020.
  12. [Chen et al., 2016] Tianqi Chen, Bing Xu, et al. Training deep nets with sublinear memory cost. arXiv preprint arXiv:1604.06174, 2016.
  13. [Chen et al., 2021a] Jianfei Chen, Lianmin Zheng, et al. Actnn: Reducing training memory footprint via 2-bit acti- vation compressed training. In ICML, 2021.
  14. [Chen et al., 2021b] Minghao Chen, Houwen Peng, Jianlong Fu, and Haibin Ling. Autoformer: Searching transformers for visual recognition. In ICCV, 2021.
  15. [Chen et al., 2021c] Tianlong Chen, Yu Cheng, et al. Chas- ing sparsity in vision transformers: An end-to-end explo- ration. In NeurIPS, 2021.
  16. [Chen et al., 2021d] Xiaohan Chen, Yu Cheng, et al. Early- bert: Efficient bert training via early-bird lottery tickets. In ACL, 2021.
  17. [Chen et al., 2022] Xiangning Chen, Cho-Jui Hsieh, et al. When vision transformers outperform resnets without pre- training or strong data augmentations. In ICLR, 2022.
  18. [Chen et al., 2023] Xiangning Chen, Chen Liang, et al. Sym- bolic discovery of optimization algorithms. arXiv preprint arXiv:2302.06675, 2023.
  19. [Cordonnier et al., 2020] Jean-Baptiste Cordonnier, Andreas Loukas, and Martin Jaggi. On the relationship between self-attention and convolutional layers. In ICLR, 2020.
  20. [Dao et al., 2022] Tri Dao, Daniel Y. Fu, et al. FlashAtten- tion: Fast and memory-efficient exact attention with IO- awareness. In NeurIPS, 2022.
  21. [Das et al., 2018] Dipankar Das, Naveen Mellempudi, et al. Mixed precision training of convolutional neural networks using integer operations. In ICLR, 2018.
  22. [De and Smith, 2020] Soham De and Sam Smith. Batch normalization biases residual blocks towards the identity function in deep networks. In NeurIPS, 2020.
  23. [Du et al., 2022a] Jiawei Du, Hanshu Yan, et al. Efficient sharpness-aware minimization for improved training of neural networks. In ICLR, 2022.
  24. [Du et al., 2022b] Jiawei Du, Daquan Zhou, et al. Sharpness-aware training for free. In NeurIPS, 2022.
  25. ['Ascoli et al., 2021] Stéphane d'Ascoli, Hugo Touvron, et al. Convit: Improving vision transformers with soft con- volutional inductive biases. In ICML, 2021.
  26. [Evci et al., 2020] Utku Evci, Trevor Gale, et al. Rigging the lottery: Making all tickets winners. In ICML, 2020.
  27. [Fedus et al., 2022] William Fedus, Barret Zoph, and Noam Shazeer. Switch transformers: Scaling to trillion parame- ter models with simple and efficient sparsity. JMLR, 2022.
  28. [Foret et al., 2021] Pierre Foret, Ariel Kleiner, et al. Sharpness-aware minimization for efficiently improving generalization. In ICLR, 2021.
  29. [Frankle and Carbin, 2019] Jonathan Frankle and Michael Carbin. The lottery ticket hypothesis: Finding sparse, trainable neural networks. In ICLR, 2019.
  30. [Gong et al., 2019] Linyuan Gong, Di He, et al. Efficient training of bert by progressively stacking. In ICML, 2019.
  31. [Goyal et al., 2017] Priya Goyal, Piotr Dollár, et al. Accu- rate, large minibatch sgd: Training imagenet in 1 hour. arXiv preprint arXiv:1706.02677, 2017.
  32. [Gu et al., 2021] Xiaotao Gu, Liyuan Liu, et al. On the trans- former growth for progressive bert training. In NAACL, 2021.
  33. [Ham et al., 2020] Tae Jun Ham, Sung Jun Jung, et al. Aˆ 3: Accelerating attention mechanisms in neural networks with approximation. In HPCA, 2020.
  34. [Ham et al., 2021] Tae Jun Ham, Yejin Lee, et al. Elsa: Hardware-software co-design for efficient, lightweight self-attention mechanism in neural networks. In ISCA, 2021.
  35. [He et al., 2022] Kaiming He, Xinlei Chen, et al. Masked autoencoders are scalable vision learners. In CVPR, 2022.
  36. [Herrmann et al., 2019] Julien Herrmann, Olivier Beau- mont, et al. Optimal checkpointing for heterogeneous chains: how to train deep neural networks with limited memory. arXiv preprint arXiv:1911.13214, 2019.
  37. [Hoffmann et al., 2022] Jordan Hoffmann, Sebastian Borgeaud, et al. Training compute-optimal large language models. arXiv preprint arXiv:2203.15556, 2022.
  38. [Houlsby et al., 2019] Neil Houlsby, Andrei Giurgiu, et al. Parameter-efficient transfer learning for nlp. In ICML, 2019.
  39. [Hu et al., 2022] Edward J Hu, yelong shen, et al. Lora: Low-rank adaptation of large language models. In ICLR, 2022.
  40. [Huang et al., 2019] Yanping Huang, Youlong Cheng, et al. Gpipe: Efficient training of giant neural networks using pipeline parallelism. In NeurIPS, 2019.
  41. [Huang et al., 2020] Xiao Shi Huang, Felipe Perez, et al. Im- proving transformer optimization through better initializa- tion. In ICML, 2020.
  42. [Hubara et al., 2017] Itay Hubara, Matthieu Courbariaux, et al. Quantized neural networks: Training neural net- works with low precision weights and activations. JMLR, 2017.
  43. [Jia et al., 2022] Menglin Jia, Luming Tang, Bor-Chun Chen, Claire Cardie, Serge Belongie, Bharath Hariharan, and Ser-Nam Lim. Visual prompt tuning. In ECCV, 2022.
  44. [Johnson and Guestrin, 2018] Tyler B Johnson and Carlos Guestrin. Training deep models faster with robust, approx- imate importance sampling. In NeurIPS, 2018.
  45. [Jouppi et al., 2017] Norman P Jouppi, Cliff Young, et al. In-datacenter performance analysis of a tensor processing unit. In ISCA, 2017.
  46. [Kaddour, 2022] Jean Kaddour. Stop wasting my time! sav- ing days of imagenet and bert training with latest weight averaging. In NeurIPS workshop, 2022.
  47. [Katharopoulos and Fleuret, 2018] Angelos Katharopoulos and Franc ¸ois Fleuret. Not all samples are created equal: Deep learning with importance sampling. In ICML, 2018.
  48. [Kenton and Toutanova, 2019] Jacob Devlin Ming- Wei Chang Kenton and Lee Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In NAACL-HLT, 2019.
  49. [Kim et al., 2020] Chiheon Kim, Heungsub Lee, et al. torchgpipe: On-the-fly pipeline parallelism for training gi- ant models. arXiv preprint arXiv:2004.09910, 2020.
  50. [Kingma and Ba, 2015] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015.
  51. [Lan et al., 2020] Zhenzhong Lan, Mingda Chen, et al. Al- bert: A lite bert for self-supervised learning of language representations. In ICLR, 2020.
  52. [Lee et al., 2019] Namhoon Lee, Thalaiyasingam Ajanthan, and Philip Torr. Snip: Single-shot network pruning based on connection sensitivity. In ICLR, 2019.
  53. [Lester et al., 2021] Brian Lester, Rami Al-Rfou, and Noah Constant. The power of scale for parameter-efficient prompt tuning. In EMNLP, 2021.
  54. [Li and Liang, 2018] Yuanzhi Li and Yingyu Liang. Learn- ing overparameterized neural networks via stochastic gra- dient descent on structured data. In NeurIPS, 2018.
  55. [Li et al., 2017] Qunwei Li, Yi Zhou, et al. Convergence analysis of proximal gradient with momentum for noncon- vex optimization. In ICLR, 2017.
  56. [Li et al., 2020] Zhuohan Li, Eric Wallace, et al. Train big, then compress: Rethinking model size for efficient train- ing and inference of transformers. In ICML, 2020.
  57. [Li et al., 2022a] Changlin Li, Bohan Zhuang, et al. Auto- mated progressive learning for efficient training of vision transformers. In CVPR, 2022.
  58. [Li et al., 2022b] Yanghao Li, Haoqi Fan, et al. Scaling language-image pre-training via masking. arXiv preprint arXiv:2212.00794, 2022.
  59. [Lin et al., 2020a] Ji Lin, Wei-Ming Chen, et al. Mcunet: Tiny deep learning on iot devices. In NeurIPS, 2020.
  60. [Lin et al., 2020b] Zhouchen Lin, Huan Li, and Cong Fang. Accelerated optimization for machine learning. Nature Singapore: Springer, 2020.
  61. [Liu et al., 2022] Xiaoxuan Liu, Lianmin Zheng, et al. GACT: activation compressed training for generic network architectures. In ICML, 2022.
  62. [Loshchilov and Hutter, 2019] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In ICLR, 2019.
  63. [Lu et al., 2021] Liqiang Lu, Yicheng Jin, et al. Sanger: A co-design framework for enabling sparse attention using reconfigurable architecture. In MICRO, 2021.
  64. [Micikevicius et al., 2018] Paulius Micikevicius, Sharan Narang, et al. Mixed precision training. In ICLR, 2018.
  65. [Mishra et al., 2021] Asit Mishra, Jorge Albericio Latorre, et al. Accelerating sparse deep neural networks. arXiv preprint arXiv:2104.08378, 2021.
  66. [Narayanan et al., 2021] Deepak Narayanan, Mohammad Shoeybi, et al. Efficient large-scale language model train- ing on gpu clusters using megatron-lm. In SC, 2021.
  67. [Nesterov, 1983] Yurii Nesterov. A method for uncon- strained convex minimization problem with the rate of convergence o (1/kˆ2). In Doklady ANSSSR, volume 269, pages 543-547, 1983.
  68. [Pal et al., 2018] Subhankar Pal, Jonathan Beaumont, et al. Outerspace: An outer product based sparse matrix multi- plication accelerator. In HPCA, 2018.
  69. [Pan et al., 2021] Zizheng Pan, Peng Chen, et al. Mesa: A memory-saving training framework for transformers. arXiv preprint arXiv:2111.11124, 2021.
  70. [Paul et al., 2021] Mansheej Paul, Surya Ganguli, et al. Deep learning on a data diet: Finding important examples early in training. In NeurIPS, 2021.
  71. [Qu et al., 2022] Zheng Qu, Liu Liu, et al. Dota: detect and omit weak attentions for scalable transformer acceleration. In ASPLOS, 2022.
  72. [Radford et al., 2021] Alec Radford, Jong Wook Kim, et al. Learning transferable visual models from natural language supervision. In ICML, 2021.
  73. [Rajbhandari et al., 2020] Samyam Rajbhandari, Jeff Rasley, et al. Zero: Memory optimizations toward training trillion parameter models. In SC, 2020.
  74. [Rasley et al., 2020] Jeff Rasley, Samyam Rajbhandari, Olatunji Ruwase, and Yuxiong He. Deepspeed: System optimizations enable training deep learning models with over 100 billion parameters. In KDD, 2020.
  75. [Ren et al., 2021] Jie Ren, Samyam Rajbhandari, et al. Zero- offload: Democratizing billion-scale model training. In USENIX ATC, 2021.
  76. [Schwartz et al., 2020] Roy Schwartz, Jesse Dodge, Noah A Smith, and Oren Etzioni. Green ai. Communications of the ACM, 2020.
  77. [Shoeybi et al., 2019] Mohammad Shoeybi, Mostofa Pat- wary, et al. Megatron-lm: Training multi-billion parameter language models using model parallelism. arXiv preprint arXiv:1909.08053, 2019.
  78. [Smith et al., 2022] Shaden Smith, Mostofa Patwary, et al. Using deepspeed and megatron to train megatron-turing nlg 530b, a large-scale generative language model. arXiv preprint arXiv:2201.11990, 2022.
  79. [So et al., 2019] David So, Quoc Le, and Chen Liang. The evolved transformer. In ICML, pages 5877-5886, 2019.
  80. [Song et al., 2019] Kaitao Song, Xu Tan, et al. Mass: Masked sequence to sequence pre-training for language generation. In ICML, 2019.
  81. [Sorscher et al., 2022] Ben Sorscher, Robert Geirhos, et al. Beyond neural scaling laws: beating power law scaling via data pruning. In NeurIPS, 2022.
  82. [Strubell et al., 2019] Emma Strubell, Ananya Ganesh, and Andrew McCallum. Energy and policy considerations for deep learning in nlp. In ACM, 2019.
  83. [Touvron et al., 2021a] Hugo Touvron, Matthieu Cord, et al. Going deeper with image transformers. In ICCV, 2021.
  84. [Touvron et al., 2021b] Hugo Touvron, Matthieu Cord, et al. Training data-efficient image transformers & distillation through attention. In ICML, 2021.
  85. [Touvron et al., 2023] Hugo Touvron, Thibaut Lavril, Gau- tier Izacard, et al. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971, 2023.
  86. [Vaswani et al., 2017] Ashish Vaswani, Noam Shazeer, et al. Attention is all you need. In NeurIPS, 2017.
  87. [Wang et al., 2018] Naigang Wang, Jungwook Choi, et al. Training deep neural networks with 8-bit floating point numbers. In NeurIPS, 2018.
  88. [Wang et al., 2020] Chaoqi Wang, Guodong Zhang, and Roger Grosse. Picking winning tickets before training by preserving gradient flow. In ICLR, 2020.
  89. [You et al., 2017] Yang You, Igor Gitman, and Boris Gins- burg. Large batch training of convolutional networks. arXiv preprint arXiv:1708.03888, 2017.
  90. [You et al., 2019] Yang You, Jing Li, et al. Large batch op- timization for deep learning: Training bert in 76 minutes. In ICLR, 2019.
  91. [You et al., 2020] Haoran You, Chaojian Li, et al. Drawing early-bird tickets: Towards more efficient training of deep networks. In ICLR, 2020.
  92. [You et al., 2023] Haoran You, Zhanyi Sun, et al. Vitcod: Vi- sion transformer acceleration via dedicated algorithm and accelerator co-design. In HPCA, 2023.
  93. [Zaken et al., 2022] Elad Ben Zaken, Yoav Goldberg, et al. Bitfit: Simple parameter-efficient fine-tuning for transformer-based masked language-models. In ACL, 2022.
  94. [Zhang and He, 2020] Minjia Zhang and Yuxiong He. Ac- celerating training of transformer-based language models with progressive layer dropping. In NeurIPS, 2020.
  95. [Zhang et al., 2019a] Hongyi Zhang, Yann N Dauphin, and Tengyu Ma. Fixup initialization: Residual learning with- out normalization. In ICLR, 2019.
  96. [Zhang et al., 2019b] Jingzhao Zhang, Sai Praneeth Karim- ireddy, et al. Why adam beats sgd for attention models. In OpenReview, 2019.
  97. [Zhou et al., 2016] Shuchang Zhou, Yuxin Wu, et al. Dorefa- net: Training low bitwidth convolutional neural net- works with low bitwidth gradients. arXiv preprint arXiv:1606.06160, 2016.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards