Concepedia

TLDR

The study proposes conditioning autoregressive language models on retrieved document chunks from a large corpus to improve generation. RETRO employs a frozen BERT retriever, a differentiable encoder, and chunked cross‑attention to predict tokens from retrieved chunks, trained from scratch or fine‑tuned onto pre‑trained transformers. With a 2‑trillion‑token database, RETRO matches GPT‑3 and Jurassic‑1 on the Pile using 25× fewer parameters, excels on downstream QA after fine‑tuning, and shows that large‑scale explicit memory can enhance language models.

Abstract

We enhance auto-regressive language models by conditioning on document chunks retrieved from a large corpus, based on local similarity with preceding tokens. With a $2$ trillion token database, our Retrieval-Enhanced Transformer (RETRO) obtains comparable performance to GPT-3 and Jurassic-1 on the Pile, despite using 25$\times$ fewer parameters. After fine-tuning, RETRO performance translates to downstream knowledge-intensive tasks such as question answering. RETRO combines a frozen Bert retriever, a differentiable encoder and a chunked cross-attention mechanism to predict tokens based on an order of magnitude more data than what is typically consumed during training. We typically train RETRO from scratch, yet can also rapidly RETROfit pre-trained transformers with retrieval and still achieve good performance. Our work opens up new avenues for improving language models through explicit memory at unprecedented scale.