< Explain other AI papers

Scaling Retrieval-Based Language Models with a Trillion-Token Datastore

Rulin Shao, Jacqueline He, Akari Asai, Weijia Shi, Tim Dettmers, Sewon Min, Luke Zettlemoyer, Pang Wei Koh

2024-07-19

Scaling Retrieval-Based Language Models with a Trillion-Token Datastore

Summary

This paper explores how increasing the size of the data storage (called a datastore) can improve the performance of retrieval-based language models (LMs). It presents a new, massive datastore containing 1.4 trillion tokens, which helps smaller models perform better than larger models that don't use a datastore.

What's the problem?

Traditional language models often rely on their own training data and parameters to generate text. However, they can struggle with knowledge-intensive tasks because they may not have enough relevant information stored. This limits their effectiveness in providing accurate and detailed responses.

What's the solution?

The authors created a massive datastore called MassiveDS, which contains a diverse range of information. They found that when retrieval-based LMs use this large datastore, even smaller models can outperform larger models that do not use any datastore. They conducted experiments to show that increasing the size of the datastore consistently leads to better performance across various tasks, especially those requiring specific knowledge.

Why it matters?

This research is important because it demonstrates that the size and quality of the data available at inference time can significantly enhance the capabilities of language models. By optimizing datastores, developers can create more efficient AI systems that provide better answers and insights, which is crucial for applications in education, customer service, and many other fields.

Abstract

Scaling laws with respect to the amount of training data and the number of parameters allow us to predict the cost-benefit trade-offs of pretraining language models (LMs) in different configurations. In this paper, we consider another dimension of scaling: the amount of data available at inference time. Specifically, we find that increasing the size of the datastore used by a retrieval-based LM monotonically improves language modeling and several downstream tasks without obvious saturation, such that a smaller model augmented with a large datastore outperforms a larger LM-only model on knowledge-intensive tasks. By plotting compute-optimal scaling curves with varied datastore, model, and pretraining data sizes, we show that using larger datastores can significantly improve model performance for the same training compute budget. We carry out our study by constructing a 1.4 trillion-token datastore named MassiveDS, which is the largest and the most diverse open-sourced datastore for retrieval-based LMs to date, and designing an efficient pipeline for studying datastore scaling in a computationally accessible manner. Finally, we analyze the effect of improving the retriever, datastore quality filtering, and other design choices on our observed scaling trends. Overall, our results show that datastore size should be considered as an integral part of LM efficiency and performance trade-offs. To facilitate future research, we open-source our datastore and code at https://github.com/RulinShao/retrieval-scaling.