Shortformer: Better Language Modeling using Shorter Inputs

By Ofir Press, Noah A. Smith, Michael Lewis. 2021

100 citations recorded by the source corpus.

Increasing the input length has been a driver of progress in language modeling with transformers. We identify conditions where shorter inputs are not harmful, and achieve perplexity and efficiency improvements through two new methods that decrease input length. First, we show that initially training a model on short subsequences before moving on to longer ones both reduces overall training time and, surprisingly, substantially improves perplexity. Second, we show how to improve the efficiency of recurrence methods in transformers, which let models condition on previously processed tokens when generating sequences that exceed the maximal length the transformer can handle at once. Existing methods require computationally expensive relative position embeddings; we introduce a simple alternative of adding absolute position embeddings to queries and keys instead of to word embeddings, which efficiently produces superior results. We show that these recurrent models also benefit from short input lengths. Combining these techniques speeds up training by a factor of 1.65, reduces memory usage, and substantially improves perplexity on WikiText-103, without adding any parameters.

Subfields: Artificial Intelligence, Natural Language Processing, 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. Luke S. Zettlemoyer
  2. Mohit Bansal
  3. Jianfeng Gao
  4. Percy Liang
  5. Graham Neubig
  6. Yejin Choi
  7. Hannaneh Hajishirzi
  8. Noah A. Smith

In Natural Language Processing

  1. Mohit Bansal
  2. Luke S. Zettlemoyer
  3. Jianfeng Gao
  4. Graham Neubig
  5. Percy Liang
  6. Yejin Choi
  7. Hannaneh Hajishirzi
  8. Caiming Xiong

In Efficiency & Compression

  1. Quoc V. Le
  2. Luke S. Zettlemoyer
  3. Michael Lewis
  4. Mingxing Tan
  5. Jason Aaron Edward Weston
  6. Sam Shleifer
  7. Song Han
  8. Christopher R'e

Citations in the corpus