Efficient Training of Language Models to Fill in the Middle

By Mo Bavarian, Heewoo Jun, Nikolas A. Tezak, John Schulman, Christine McLeavey, Jerry Tworek, Mark Chen. 2022

317 citations recorded by the source corpus.

We show that autoregressive language models can learn to infill text after we apply a straightforward transformation to the dataset, which simply moves a span of text from the middle of a document to its end. While this data augmentation has garnered much interest in recent years, we provide extensive evidence that training models with a large fraction of data transformed in this way does not harm the original left-to-right generative capability, as measured by perplexity and sampling evaluations across a wide range of scales. Given the usefulness, simplicity, and efficiency of training models to fill-in-the-middle (FIM), we suggest that future autoregressive language models be trained with FIM by default. To this end, we run a series of ablations on key hyperparameters, such as the data transformation frequency, the structure of the transformation, and the method of selecting the infill span. We use these ablations to prescribe strong default settings and best practices to train FIM models. We have released our best infilling model trained with best practices in our API, and release our infilling benchmarks to aid future research.

Subfields: Artificial Intelligence, General Social Sciences, Large Language Models, Natural Language Processing

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. Caiming Xiong
  7. Noah A. Smith
  8. Yoshua Bengio

In General Social Sciences

  1. Qian Liu
  2. Fei Huang
  3. Wen-tau Yih
  4. Eric Wallace
  5. Silvio Savarese
  6. Ramesh Karri
  7. Jingren Zhou
  8. Chris Dyer

In Large Language Models

  1. Luke S. Zettlemoyer
  2. Michael Lewis
  3. Caiming Xiong
  4. Armen Aghajanyan
  5. Wen-tau Yih
  6. Omer Levy
  7. Eric Wallace
  8. Thomas Scialom

In Natural Language Processing

  1. Luke S. Zettlemoyer
  2. Mohit Bansal
  3. Graham Neubig
  4. Caiming Xiong
  5. Jianfeng Gao
  6. Jason Aaron Edward Weston
  7. Kyunghyun Cho
  8. Richard Socher

Citations in the corpus