English

Bag of Tricks for Optimizing Transformer Efficiency

Machine Learning 2021-09-10 v1

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.80X on CPU and 2.52X on GPU. The code is publicly available at https://github.com/Lollipop321/mini-decoder-network.

Keywords

Cite

@article{arxiv.2109.04030,
  title  = {Bag of Tricks for Optimizing Transformer Efficiency},
  author = {Ye Lin and Yanyang Li and Tong Xiao and Jingbo Zhu},
  journal= {arXiv preprint arXiv:2109.04030},
  year   = {2021}
}

Comments

accepted by EMNLP (Findings) 2021

R2 v1 2026-06-24T05:48:44.216Z