English

Transformer Quality in Linear Time

Machine Learning 2022-06-28 v2 Artificial Intelligence Computation and Language Neural and Evolutionary Computing

Abstract

We revisit the design choices in Transformers, and propose methods to address their weaknesses in handling long sequences. First, we propose a simple layer named gated attention unit, which allows the use of a weaker single-head attention with minimal quality loss. We then propose a linear approximation method complementary to this new layer, which is accelerator-friendly and highly competitive in quality. The resulting model, named FLASH, matches the perplexity of improved Transformers over both short (512) and long (8K) context lengths, achieving training speedups of up to 4.9×\times on Wiki-40B and 12.1×\times on PG-19 for auto-regressive language modeling, and 4.8×\times on C4 for masked language modeling.

Keywords

Cite

@article{arxiv.2202.10447,
  title  = {Transformer Quality in Linear Time},
  author = {Weizhe Hua and Zihang Dai and Hanxiao Liu and Quoc V. Le},
  journal= {arXiv preprint arXiv:2202.10447},
  year   = {2022}
}

Comments

Accepted to the 39th International Conference on Machine Learning (ICML'22)

R2 v1 2026-06-24T09:48:27.374Z