QueryLM Moves Search into Pretraining: A 1.4B Model Matches a FLOP-Matched 3.3B Baseline
Summary:QueryLM moves search behavior into pretraining instead of adding it only during post-training. The authors augment Wikipedia and DCLM-Edu corpora with search queries and locally retrieved web responses, then train models from 360M to 3.3B parameters to emit search calls and condition generation on the returned evidence. Across the reported knowledge-intensive evaluations, a 1.4B QueryLM matches or exceeds a FLOP-matched 3.3B baseline, and its advantage remains after supervised fine-tuning of bo
Core Mechanism
QueryLM moves three behaviors from post-training into pretraining: when to search, how to express a query, and how retrieved evidence should constrain subsequent generation. The training corpus contains search queries and web responses retrieved through a local index rather than static text alone. During standard next-token prediction, the model therefore learns both to emit search calls and to continue generation conditioned on retrieved evidence. The central hypothesis is that repeated exposure to retrieval protocols and evidence use across a large token distribution produces a stronger prior than a limited set of post-training demonstrations.
At a logical level, a training sequence can be represented as [user context] → [search call] → [retrieved evidence] → [answer continuation]. If both search calls and answer spans are supervised, gradients directly shape query generation and evidence conditioning. If only answer spans are supervised, the model must infer where a call should be inserted from context. The abstract does not disclose special tokens, sequence construction, or span-level loss masks, so the degree to which the search protocol is directly supervised remains unclear.
A local index is central to reproducibility. Versioning the web snapshot, query set, and index allows researchers to replay the same retrieval results without ranking changes in a live search service. The tradeoff is that snapshot storage, refresh pipelines, copyright filtering, and deduplication move into the training infrastructure.
Training and Inference Pipeline
Training can be decomposed into four stages: derive search intents from ordinary text, query a local web index in bulk, concatenate the retrieved evidence with the original sequence, and optimize the language model. This avoids manually writing a complete agent trajectory for every example, but shifts substantial cost toward indexing and batch retrieval. The paper does not report the number of queries, indexed pages, index size, or preprocessing throughput.
Inference remains a closed loop rather than a lookup of live knowledge stored in the weights. QueryLM generates a search call, the retrieval service returns evidence, and the model continues generation. A typical request therefore adds at least one decoding step, one network or index lookup, and a longer evidence-context prefill. Search-native therefore describes where the capability is trained, not an ability to deploy without a search backend, index, or cache.
Retrieved evidence also enlarges the KV Cache. For a standard attention implementation, a rough estimate is 2 × layers × kv_heads × head_dim × sequence_length × bytes_per_element. Longer documents directly increase memory use and prefill cost. A 1.4B model has smaller weights than a 3.3B model, but evidence expansion can prevent end-to-end memory and latency from falling in proportion to parameter count.
Engineering Trade-offs
The authors report that a 1.4B QueryLM matches or exceeds a FLOP-matched 3.3B baseline on knowledge-intensive tasks. This suggests that a better data curriculum may let a smaller model use retrieval more effectively, but it does not by itself prove a 2.36-fold inference-cost reduction. A common rough estimate for dense-transformer training is 6ND FLOPs. Matching that budget may involve different token counts, training durations, or data mixtures; reproduction requires checking parameter count, training tokens, and repetition rates.
FLOP matching also does not automatically include index construction, offline retrieval, evidence encoding, online search latency, or failed-request retries. Production systems should separately track model-token cost, retrieval QPS, index-refresh cost, and total answer latency rather than comparing parameter counts alone.
Search-native training expands the attack surface. Web evidence can contain stale claims, misinformation, prompt injection, or benchmark answer leakage. A model trained to follow retrieved evidence more strongly may become better at using high-quality evidence and more vulnerable to malicious evidence at the same time. Training records should preserve source, timestamp, content hash, and licensing metadata, with page-level and answer-level deduplication against evaluation sets.
Reported Results and Evaluation Limits
The experiments cover Wikipedia and DCLM-Edu corpora and model sizes from 360M to 3.3B parameters. The paper reports better knowledge-intensive performance and stronger steerability toward retrieved evidence. After supervised fine-tuning is applied to both search-pretrained and conventionally pretrained models, the search-pretrained advantage remains, indicating that the tested post-training procedures do not fully recover the capability developed during pretraining.
The abstract does not provide task names, baseline models, absolute scores, random seeds, confidence intervals, or a formal definition of higher steerability. The metric could reward faithful evidence attribution, but it could also reward document copying without distinguishing faithful grounding from echoing incorrect or injected content. Independent evaluation should therefore measure answer accuracy, evidence entailment, citation correctness, abstention without evidence, and factual stability under erroneous or malicious documents.
Deployment Guidance
For teams training foundation models, the most transferable contribution is the curriculum rather than an immediate replacement for existing RAG stacks. A practical pilot should version search queries and web snapshots, construct replayable next-token samples, ablate supervision of search calls versus evidence spans, and compare equal-token, equal-FLOP, and equal-post-training-data settings.
For teams operating retrieval-augmented applications, QueryLM is better treated as a smaller-model candidate than a default upgrade. Production validation should cover search-call precision and recall, end-to-end p50 and p95 latency, total cost per answer, factual stability under stale or conflicting documents, and the commercial licensing of checkpoints, datasets, and derived web content.
The serving layer needs explicit search-call limits, timeout fallback, result caching, and a no-search fallback when no acceptable evidence exists. Private indexes also require source allowlists, document isolation, and prompt-injection sanitization. Evaluation sets should be temporally separated from indexed snapshots and deduplicated at the page and answer levels; otherwise gains on knowledge tasks may partly reflect answer leakage.
The defensible conclusion is that moving search behavior into pretraining may improve knowledge-intensive performance more efficiently than scaling parameters alone. The 1.4B result supports that direction, while index reproducibility, training supervision details, and end-to-end cost remain the critical gaps before production adoption.
— END —Source: ArXiv NLP/LLM (cs.CL) (2026-11-23)
Tags: #search-native pretraining #QueryLM #retrieval-augmented generation #language model pretraining #knowledge-intensive tasks
Editorial & Fact-Checking Note: This article is compiled from primary research, official release documentation, and source papers by the ZICQ Newsroom pipeline with automated entity verification and human editorial review. If you notice any technical inaccuracy, please submit a correction via our corrections policy or email our editorial desk directly.
Community Comments