Lune

EMNLP Findings2021

Bag of Tricks for Optimizing Transformer Efficiency

Ye Lin, Yanyang Li, Tong Xiao, Jingbo Zhu

Abstract

Improving Transformer efficiency has become increasingly attractive recently. A wide range of methods has been proposed, e.g., pruning, quantization, new architectures and etc. But these methods are either sophisticated in implementation or dependent on hardware. In this paper, we show that the efficiency of Transformer can be improved by combining some simple and hardware-agnostic methods, including tuning hyper-parameters, better design choices and training strategies. On the WMT news translation tasks, we improve the inference efficiency of a strong Transformer system by 3.80× on CPU and 2.52× on GPU. The code is publicly available at https://github.com/Lollipop321/mini-decoder-network.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

Builds onCited byLeft to right by year; the more cited, the higher.

Builds on5

  1. ALBERT: A Lite BERT for Self-supervised Learning of Language RepresentationsZhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel et al.ICLR 2020 · 7,418 citations
  2. Losing Heads in the Lottery: Pruning Transformer Attention in Neural Machine TranslationMaximiliana Behnke, Kenneth HeafieldEMNLP 2020 · 50 citations
  3. An Efficient Transformer Decoder with Compressed Sub-layersYanyang Li, Ye Lin, Tong Xiao, Jingbo ZhuAAAI 2021 · 32 citations
  4. Extremely Low Bit Transformer Quantization for On-Device Neural Machine TranslationInsoo Chung, Byeongwook Kim, Yoonjung Choi, Se Jung Kwon et al.EMNLP Findings 2020 · 23 citations
  5. Weight Distillation: Transferring the Knowledge in Neural Network ParametersYe Lin, Yanyang Li, Ziyang Wang, Bei Li et al.ACL 2021

Related papers

  1. Understanding Int4 Quantization for Language Models: Latency Speedup, Composability, and Failure CasesXiaoxia Wu, Cheng Li, Reza Yazdani Aminabadi, Zhewei Yao et al.ICML 2023 · 41 citations
  2. NeuroPrune: A Neuro-inspired Topological Sparse Training Algorithm for Large Language ModelsAmit Dhurandhar, Tejaswini Pedapati, Ronny Luss, Soham Dan et al.ACL Findings 2024 · 3 citations
  3. Numerical Pruning for Efficient Autoregressive ModelsXuan Shen, Zhao Song, Yufa Zhou, Bo Chen et al.AAAI 2025 · 5 citations
  4. LightSeq2: Accelerated Training for Transformer-Based Models on GPUsXiaohui Wang, Yang Wei, Ying Xiong, Guyue Huang et al.SC 2022 · 25 citations
  5. Sparse is Enough in Scaling TransformersSebastian Jaszczur, Aakanksha Chowdhery, Afroz Mohiuddin, Lukasz Kaiser et al.NeurIPS 2021 · 127 citations
Dusk over the sea between two cliffs drawn in fine vertical lines