InstructRetro (Wang et al., 2023b) scales up the size of Retro to 48B, featuring the largest LLM pretrained with retrieval (as of December 2023).
The obtained foundation model, Retro 48B, largely outperforms the GPT counterpart in terms of perplexity.
With instruction tuning on Retro, InstructRetro demonstrates significant improvement over the instruction tuned GPT on downstream tasks in the zero-shot setting. Specifically, the average improvement of InstructRetro is 7% over its GPT counterpart across 8 short-form QA tasks, and 10% over GPT across 4 challenging long-form QA tasks. We also find that one can ablate the encoder from InstructRetro architecture and directly use the InstructRetro decoder backbone as GPT, while achieving comparable results.
For more information about InstructRetro, check the Documentation!
Background
Retro (Borgeaud et al., 2022) is an autoregressive decoder-only language model (LM) pretrained with retrieval-augmentation.
Retro features practical scalibility to support large-scale pretraining from scratch by retrieving from trillions of token.
Pretraining with retrieval provides a more efficient storage mechanism of factual knowledge, when compared to storing factual knowledge implicitly within the network's parameters, thus largely reducing model parameters while achieving lower perplexity than standard GPT.
Retro also provides the flexibility to update the
knowledge stored in LMs (Wang et al., 2023a)
by updating the retrieval database without training LMs again.
We present an example command to run retro generation with the InstructRetro checkpoints for the Natural Question (NQ) task. The example command is for the 48b InstructRetro. Please specify the directory for the NQ dataset and update the command accordingly for other checkpoints.
The generated responses will be saved in the corresponding checkpoint directory. For example, for the 48b InstructRetro, it will be saved to
<path/to/retro>/retro-generate-nq_5_2_48b_test_greedy_0_20000_1000.txt.
To evaluate the F1 / Exact Match (EM) scores of the generated responses, we provide an example script to run the evaluation on the NQ dataset. Please specify the directory for the NQ dataset and update the command accordingly for other checkpoints and downstream tasks.
Boxin Wang, Wei Ping, Lawrence McAfee, Peng Xu, Bo Li, Mohammad Shoeybi, Bryan Catanzaro. (ICML 2024)
Please cite the papers as follows if you use the data or code from this repo:
bibtex
1@inproceedings{wang2023shall,
2 title = {Shall We Pretrain Autoregressive Language Models with Retrieval? A Comprehensive Study},
3 author = {Boxin Wang and Wei Ping and Peng Xu and Lawrence McAfee and Zihan Liu and Mohammad Shoeybi and Yi Dong and Oleksii Kuchaiev and Bo Li and Chaowei Xiao and Anima Anandkumar and Bryan Catanzaro},
4 journal = {The 2023 Conference on Empirical Methods in Natural Language Processing},
5 year = {2023}
6}
78@article{wang2023instructretro,
9 title = {InstructRetro: Instruction Tuning post Retrieval-Augmented Pretraining},
10 author = {Boxin Wang and Wei Ping and Lawrence McAfee and Peng Xu and Bo Li and Mohammad Shoeybi and Bryan Catanzaro},
11 year = {2023},
12 journal = {arXiv preprint arXiv: 2310.07713}
13}