Fast Transformer Decoding: One Write-Head is All You Need

By Noam Shazeer. 2019

825 citations recorded by the source corpus.

Multi-head attention layers, as used in the Transformer neural sequence model, are a powerful alternative to RNNs for moving information across and between sequences. While training these layers is generally fast and simple, due to parallelizability across the length of the sequence, incremental inference (where such paralleization is impossible) is often slow, due to the memory-bandwidth cost of repeatedly loading the large "keys" and "values" tensors. We propose a variant called multi-query attention, where the keys and values are shared across all of the different attention "heads", greatly reducing the size of these tensors and hence the memory bandwidth requirements of incremental decoding. We verify experimentally that the resulting models can indeed be much faster to decode, and incur only minor quality degradation from the baseline.

Subfields: Artificial Intelligence, Computer Vision and Pattern Recognition, Model Architectures, Efficiency & Compression

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Mohit Bansal
  2. Quoc V. Le
  3. Luke S. Zettlemoyer
  4. Jianfeng Gao
  5. Percy Liang
  6. Graham Neubig
  7. Yoshua Bengio
  8. Caiming Xiong

In Computer Vision and Pattern Recognition

  1. Luc Van Gool
  2. Dacheng Tao
  3. Ming-Hsuan Yang
  4. Trevor Darrell
  5. Jitendra Malik
  6. Andrew Zisserman
  7. Xiaogang Wang
  8. Yi Yang

In Model Architectures

  1. Quoc V. Le
  2. Yoshua Bengio
  3. Xipeng Qiu
  4. Yi Tay
  5. Furu Wei
  6. Barret Zoph
  7. Irwan Bello
  8. Kyunghyun Cho

In Efficiency & Compression

  1. Barret Zoph
  2. Yi Tay
  3. Furu Wei
  4. Joseph Dean
  5. William Fedus
  6. Tri Dao
  7. Irwan Bello
  8. J. Ainslie

Citations in the corpus