Sharing Attention Weights for Fast Transformer

By Tong Xiao, Yinqiao Li, Jingbo Zhu, Zhengtao Yu, Tongran Liu. 2019

62 citations recorded by the source corpus.

Recently, the Transformer machine translation system has shown strong results by stacking attention layers on both the source and target-language sides. But the inference of this model is slow due to the heavy use of dot-product attention in auto-regressive decoding. In this paper we speed up Transformer via a fast and lightweight attention model. More specifically, we share attention weights in adjacent layers and enable the efficient re-use of hidden states in a vertical manner. Moreover, the sharing policy can be jointly learned with the MT model. We test our approach on ten WMT and NIST OpenMT tasks. Experimental results show that it yields an average of 1.3X speed-up (with almost no decrease in BLEU) on top of a state-of-the-art implementation that has already adopted a cache for fast inference. Also, our approach obtains a 1.8X speed-up when it works with the AAN model. This is even 16 times faster than the baseline with no use of the attention cache.

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

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. Krzysztof Marcin Choromanski
  2. Adrian Weller
  3. Shang-Wen Li
  4. Hung-yi Lee
  5. Luca Soldaini
  6. Tamás Sarlós
  7. Valerii Likhosherstov
  8. Xingyou Song

In Computer Vision and Pattern Recognition

  1. Krzysztof Marcin Choromanski
  2. Adrian Weller
  3. Tamás Sarlós
  4. Valerii Likhosherstov
  5. Luca Soldaini
  6. Tong Xiao
  7. Jingbo Zhu
  8. Xingyou Song

In Model Architectures

  1. Adrian Weller
  2. Valerii Likhosherstov
  3. Jared Davis
  4. Xingyou Song
  5. Chunliang Zhang
  6. Tong Xiao
  7. Hung-yi Lee
  8. Alessandro Moschitti

In Efficiency & Compression

  1. Tong Xiao
  2. Adrian Weller
  3. Hung-yi Lee
  4. Alessandro Moschitti
  5. Jingbo Zhu
  6. Krzysztof Marcin Choromanski
  7. Tongran Liu
  8. Jared Davis

Citations in the corpus