A Length-Extrapolatable Transformer

By Yutao Sun, Li Dong, Barun Patra, Shuming Ma, Shaohan Huang, Alon Benhaim, Vishrav Chaudhary, Xia Song, Furu Wei. 2022

176 citations recorded by the source corpus.

Position modeling plays a critical role in Transformers. In this paper, we focus on length extrapolation, i.e., training on short texts while evaluating longer sequences. We define attention resolution as an indicator of extrapolation. Then we propose two designs to improve the above metric of Transformers. Specifically, we introduce a relative position embedding to explicitly maximize attention resolution. Moreover, we use blockwise causal attention during inference for better resolution. We evaluate different Transformer variants with language modeling. Experimental results show that our model achieves strong performance in both interpolation and extrapolation settings. The code will be available at https://aka.ms/LeX-Transformer.

Subfields: Artificial Intelligence, Large Language Models, Model Architectures

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. Furu Wei
  2. Li Dong
  3. Shaohan Huang
  4. Shuming Ma
  5. Wenhui Wang
  6. Saksham Singhal
  7. Zewen Chi
  8. Xia Song

In Large Language Models

  1. Furu Wei
  2. Li Dong
  3. Shaohan Huang
  4. Shuming Ma
  5. Wenhui Wang
  6. Xia Song
  7. Zewen Chi
  8. Saksham Singhal

In Model Architectures

  1. Furu Wei
  2. Wenhui Wang
  3. Li Dong
  4. Shuming Ma
  5. Shaohan Huang
  6. Boris Ginsburg
  7. Vishrav Chaudhary
  8. Samuel Kriman

Citations in the corpus