QueryLM adds web search queries and retrieved pages to pretraining data
Can a model learn to use search tools during pretraining instead of waiting for post-training? The authors injected web search queries and web pages retrieved from a local index into pretraining data at scale and trained QueryLM, which generates search calls and uses retrieved evidence while doing language modelling. Across the Wikipedia and DCLM-Edu corpora and sizes from 360M to 3.3B, QueryLM performed better on knowledge-intensive tasks and followed retrieved evidence more readily. The key evidence: after supervised fine-tuning of both search-pretrained and conventionally pretrained models, the former's advantage remained, suggesting the tested post-training pipeline cannot recover abilities gained in pretraining; the 1.4B QueryLM matched or beat a compute-matched 3.3B baseline on all knowledge-intensive tasks. The authors released model checkpoints and training data, but experiments cover only these two corpora and this one post-training pipeline; whether results hold with other data or fine-tuning schemes is not answered.
Models are now commonly given search tools when deployed, but pretraining still only teaches them to predict static text, and search ability is mostly added in post-training. If this ability is easier to establish during pretraining, the direction of post-training investment needs to be recalculated.
People building pretraining data pipelines can seriously consider writing retrieval calls into the corpus instead of betting all search ability on post-training. Those working on small models gain another reference point: 1.4B with search pretraining can match a compute-matched 3.3B.