Curated summary
Efficient training of language models to fill in the middle
Autoregressive language models can learn to fill in text in the middle of a document with a simple data transformation: a span is moved from the middle of a document to its end. The authors show that training with a large fraction of data transformed this way does not hurt standard left-to-right generation, as measured by perplexity and sampling across a range of model scales. Because the method is useful, simple, and efficient, they argue that future autoregressive models should be trained with fill-in-the-middle (FIM) by default.
The Transformation
- A span of text is cut from the middle of a document and placed at the end.
- The model is trained on the rearranged sequences, which lets it learn infilling with no change to the architecture.
- Data augmentation of this kind has drawn considerable interest, but the authors focus on whether it costs anything in left-to-right performance.
Preserving Left-to-Right Capability
- Training with a large share of transformed data does not degrade original generative ability.
- The authors check this with perplexity and sampling evaluations across a wide range of model scales.
Recommended Training Practices
- The authors run ablations on key hyperparameters: the frequency of the data transformation, the structure of the transformation, and the method for selecting the infill span.
- These ablations produce recommended default settings and best practices for training FIM models.
Released Resources
- The authors released their best infilling model, trained with these practices, through their API.
- They also released their infilling benchmarks to support future research.
Related reading
Continue with another curated summary.
OpenAI2026-11-21 Perplexity and Intelligence
Read original
OpenAI2026-11-19 Can AI help scientists identify promising drug candidates?
Read original
OpenAI2025-09-04 Why language models hallucinate
Read original
OpenAI2023-03-16 GPTs are GPTs: An early look at the labor market impact potential of large language models
Read original