Text Generation
Transformers
Safetensors
English
querylm_nanochat
custom_code

Standard 1.4B (DCLM-Edu), base model

The plain-text baseline for Kausp11/querylm-dclm-1.4b: a 1.4B-parameter language model with the same architecture, trained from scratch on DCLM-Edu web text without search blocks, for the same compute. QueryLM is trained on text with inline search blocks (a query followed by a retrieved passage), which makes its training sequences longer; this model spends the same compute on more plain text instead. Use the two together to measure what search-augmented pretraining changes.

This is the base model (pretraining only). The chat fine-tuned version is Kausp11/standard-dclm-1.4b-sft-search.

Stage base model (pretraining only; no chat format)
Paired model Kausp11/querylm-dclm-1.4b (same architecture and compute, pretrained with search blocks)
Architecture nanochat-style decoder: 24 layers, width 2,048, 16 heads, feed-forward 8,192, head dim 128, context 4,095 tokens
Parameters 1,409.6M reported (2,619.1M stored, including value embeddings)
Loads with transformers + trust_remote_code=True (the repo ships modeling_nanochat.py)

How to use

A text-continuation model. It was not trained to search: the four search tokens are in its vocabulary (same tokenizer as QueryLM) but it never saw them in training.

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

repo = "Kausp11/standard-dclm-1.4b"
tok = AutoTokenizer.from_pretrained(repo)
# trust_remote_code runs modeling_nanochat.py from this repo; pin `revision=` to a commit you have read.
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True, torch_dtype=torch.bfloat16).eval()

# Base model: it continues text. Few-shot examples set the question-answer format.
prompt = ("Question: Who wrote the novel Pride and Prejudice?\nAnswer: Jane Austen\n\n"
          "Question: What is the chemical symbol for gold?\nAnswer: Au\n\n"
          "Question: What is the capital of Australia?\nAnswer:")
x = tok(prompt, add_special_tokens=False, return_tensors="pt")
with torch.no_grad():
    out = model.generate(**x, max_new_tokens=16, do_sample=False, pad_token_id=tok.eos_token_id)
print("answer:", tok.decode(out[0, x.input_ids.shape[1]:], skip_special_tokens=True).split("\n")[0].strip())

Output of this exact script (CPU, bfloat16, torch 2.8.0, transformers 4.56.0, run 2026-11-20 on the files in this repo):

answer: Canberra

Tokenizer: the SmolLM2 tokenizer plus the four search tokens used by QueryLM (vocabulary 49,156).

Training data

Pretraining: DCLM-Edu as plain text: more document text than the paired QueryLM model saw, so that both use the same compute. No search blocks, no annotation.

Training procedure

Pretraining optimizer Muon for matrix weights (peak LR 0.02828), AdamW for embeddings and output head
Batch 256 sequences x 4,095 tokens = 1,048,320 tokens per update
Schedule 40 warmup steps, constant, then linear decay to 5% of peak at the end
Pretraining budget 41,936 updates; 44.0B tokens; 4.51e20 FLOPs; bf16 compute. Same number of updates and FLOPs as the paired QueryLM model

Provenance

Checkpoint run dclm_nc_baseline_d24_cm44, final step of the last training segment (segment step 8,872; 41,936 updates in total). Learning-rate decay over the last 2,872 updates; the schedule is finished
Initialised from scratch
Code nanochat (upstream commit 92d63d4) with a local search-data branch
model-00001-of-00002.safetensors sha256 fc698b4f6b04ad01d012881a08c4ffa34160a2896ce38c410fbee9fa5ce95dc1
model-00002-of-00002.safetensors sha256 db8d008f7e98ef14b534df7bc50c46ac6693dfd00ddf6e03580b860773ed4f04
Also published as Kausp11/searchlm-dclm_nc-baseline_d24_cm44 (identical weights, earlier name)

Evaluation

Evaluation results will be added later.

Intended use and limitations

  • A research artifact: the control model for studying search-augmented pretraining. Not a product.
  • Base model: it continues text and has no chat format.
  • English web text only; no safety or refusal training of any kind. It will state false things fluently.
  • Loading executes Python from this repository (modeling_nanochat.py). Read it or pin a revision.

License

Apache-2.0 (licence text in LICENSE). modeling_nanochat.py is adapted from nanochat, MIT License, Copyright (c) 2025 Andrej Karpathy (text in LICENSE-nanochat). Training text: DCLM-Edu (CC-BY-4.0).

Citation

Paper: Search From the Start: Search-Native Pretraining for Language Models · Project page: https://kaustubhp11.github.io/querylm/

@article{ponkshe2026searchfromthestart,
  title   = {Search From the Start: Search-Native Pretraining for Language Models},
  author  = {Ponkshe, Kaustubh and Je, Gyung Hyun and Taga, Stefan and Raffel, Colin and Jaggi, Martin},
  journal = {arXiv preprint arXiv:2611.26809},
  year    = {2026}
}
Downloads last month
48
Safetensors
Model size
3B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Kausp11/standard-dclm-1.4b

Finetunes
1 model

Dataset used to train Kausp11/standard-dclm-1.4b

Collection including Kausp11/standard-dclm-1.4b

Paper for Kausp11/standard-dclm-1.4b