Shall We Pretrain Autoregressive Language Models with Retrieval? A Comprehensive Study
Authors:
- Boxin WangBWBoxin Wang
- Wei PingWPWei Ping
- Peng XuPXPeng Xu
- Lawrence McAfeeLMLawrence McAfee
- Zihan LiuZLZihan Liu
- Mohammad ShoeybiMSMohammad Shoeybi
- Yi DongYDYi Dong
- Oleksii KuchaievOKOleksii Kuchaiev
- Bo LiBLBo Li
- Chaowei XiaoCXChaowei Xiao
- Anima AnandkumarAAAnima Anandkumar
- Bryan CatanzaroBCBryan Catanzaro
Preprint
Abstract
Large decoder-only language models (LMs) can be largely improved in terms of perplexity by retrieval (e.g., RETRO), but its impact on text generation quality and downstream task accuracy is unclear. Thus, it is still an open question: shall we pretrain large autoregressive LMs with retrieval? To answer it, we perform a comprehensive study on a scalable pre-trained retrieval-augmented LM (i.e., RETRO) compared with standard GPT and retrieval-augmented GPT incorporated at fine-tuning or inference stages. We first provide the recipe to reproduce RETRO up to 9.5B parameters while retrieving a text corpus with 330B tokens. Based on that, we have the following novel findings: i) RETRO outperforms GPT on text generation with much less degeneration (i.e., repetition), moderately higher factual accuracy, and slightly lower toxicity with a nontoxic retrieval database. ii) On the LM Evaluation Harness benchmark, RETRO largely outperforms GPT on knowledge-intensive tasks, but is on par with GPT on other tasks. Furthermore, we introduce a simple variant of the model, RETRO++, which largely improves open-domain QA results of original RETRO (e.g., EM score +8.6 on Natural Question) and significantly outperforms retrieval-augmented GPT in both fine-tuning and zero-shot evaluation settings. Our findings highlight the promising direction of pretraining autoregressive LMs with retrieval as future foundation models. We release our implementation at: https://github.com/NVIDIA/Megatron-LM#retro.Keywords
All Related Versions
This publication has 22 references indexed in Scilit:
- Retrieval Augmentation Reduces Hallucination in Conversation2021
- Investigating the Effect of Natural Language Explanations on Out-of-Distribution Generalization in Few-shot NLI2021
- PIQA: Reasoning about Physical Commonsense in Natural LanguageProceedings of the AAAI Conference on Artificial Intelligence, 2020
- Dense Passage Retrieval for Open-Domain Question Answering2020
- BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension2020
- Adversarial NLI: A New Benchmark for Natural Language Understanding2020
- Billion-Scale Similarity Search with GPUsIEEE Transactions on Big Data, 2019
- Texygen2018
- Optimized Product QuantizationIEEE Transactions on Pattern Analysis and Machine Intelligence, 2013
- QuantizationIEEE Transactions on Information Theory, 1998