Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Job has been terminated due to a temporary spike in resource usage and may be restarted later.
Error code:   JobManagerCrashedError

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

input_ids
list
attention_mask
list
labels
list
[ 2219, 47477, 365, 43, 2481, 314, 260, 10236, 282, 8118, 338, 314, 673, 376, 572, 9807, 411, 253, 1248, 30, 657, 314, 6090, 335, 253, 3964, 429, 49152, 2219, 47477, 3964, 10236, 8118, 9807, 1845, 2396, 49153, 216, 49154, 504, 19865, 25...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 2219, 47477, 365, 43, 2481, 314, 260, 10236, 282, 8118, 338, 314, 673, 376, 572, 9807, 411, 253, 1248, 30, 657, 314, 6090, 335, 253, 3964, 429, 49152, 2219, 47477, 3964, 10236, 8118, 9807, 1845, 2396, 49153, -100, -100, -100, -100, -1...
[ 49, 28, 355, 253, 28, 314, 260, 808, 4386, 284, 260, 49152, 49, 808, 4386, 12567, 1462, 5062, 49153, 216, 49154, 6077, 343, 365, 13435, 25, 1934, 343, 314, 260, 8335, 1462, 282, 260, 808, 4386, 282, 260, 492, 460, 332, 12567, 28, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 49, 28, 355, 253, 28, 314, 260, 808, 4386, 284, 260, 49152, 49, 808, 4386, 12567, 1462, 5062, 49153, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
[ 49, 1901, 4232, 27145, 314, 253, 1215, 281, 260, 46786, 2695, 282, 260, 1797, 1918, 28, 40920, 411, 14377, 288, 260, 4081, 43, 9813, 288, 260, 6251, 43, 7162, 284, 260, 10352, 282, 5647, 288, 260, 4203, 43, 284, 11861, 288, 260, 584...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 49, 1901, 4232, 27145, 314, 253, 1215, 281, 260, 46786, 2695, 282, 260, 1797, 1918, 28, 40920, 411, 14377, 288, 260, 4081, 43, 9813, 288, 260, 6251, 43, 7162, 284, 260, 10352, 282, 5647, 288, 260, 4203, 43, 284, 11861, 288, 260, 584...
[ 788, 4963, 14566, 28, 28579, 365, 2481, 355, 20416, 3285, 376, 27145, 436, 253, 5913, 282, 260, 35582, 2287, 617, 436, 1343, 347, 1036, 260, 6250, 282, 511, 260, 4963, 19722, 30, 330, 3466, 1843, 281, 24982, 506, 47920, 28, 384, 436, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 788, 4963, 14566, 28, 28579, 365, 2481, 355, 20416, 3285, 376, 27145, 436, 253, 5913, 282, 260, 35582, 2287, 617, 436, 1343, 347, 1036, 260, 6250, 282, 511, 260, 4963, 19722, 30, 330, 3466, 1843, 281, 24982, 506, 47920, 28, 384, 436, ...
[5921,10608,9643,365,8544,5096,216,33,34,28,216,33,40,32,41,15442,1494,49152,5921,10608,9643,2112,36(...TRUNCATED)
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED)
[5921,10608,9643,365,8544,5096,216,33,34,28,216,33,40,32,41,15442,1494,49152,5921,10608,9643,2112,36(...TRUNCATED)
[49,1640,13882,365,43,49152,49,1640,13882,3687,3688,33284,49153,216,49154,42569,9323,15401,26435,250(...TRUNCATED)
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED)
[49,1640,13882,365,43,49152,49,1640,13882,3687,3688,33284,49153,-100,-100,-100,-100,-100,-100,-100,-(...TRUNCATED)
[2089,1547,281,7042,314,253,17271,29,44874,2866,45988,5662,8216,365,270,9238,8216,25,327,30172,411,1(...TRUNCATED)
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED)
[2089,1547,281,7042,314,253,17271,29,44874,2866,45988,5662,8216,365,270,9238,8216,25,327,30172,411,1(...TRUNCATED)
[504,8011,30442,28,5630,1343,347,260,492,1513,954,28,359,18110,327,7540,284,5289,18022,327,260,49152(...TRUNCATED)
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED)
[504,8011,30442,28,5630,1343,347,260,492,1513,954,28,359,18110,327,7540,284,5289,18022,327,260,49152(...TRUNCATED)
[19085,30638,5885,365,369,41125,7421,312,13701,28,429,624,3432,1462,49152,19085,30638,5885,3432,1462(...TRUNCATED)
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED)
[19085,30638,5885,365,369,41125,7421,312,13701,28,429,624,3432,1462,49152,19085,30638,5885,3432,1462(...TRUNCATED)
[42750,490,918,314,260,6113,284,2180,282,1982,327,260,876,29,4709,284,31,270,8906,282,550,2973,355,2(...TRUNCATED)
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED)
[42750,490,918,314,260,6113,284,2180,282,1982,327,260,876,29,4709,284,31,270,8906,282,550,2973,355,2(...TRUNCATED)
End of preview.

QueryLM pretraining data: Wikipedia with inline search blocks

English Wikipedia articles with inline search blocks, tokenized and packed into 4,096-token training blocks. Each search block is a query written by an annotator model followed by a passage retrieved from a web corpus. This is the pretraining corpus of the QueryLM 360M Wikipedia model (Kausp11/querylm-wiki-360m), which was trained on it for 4 epochs.

Contents

Path What Size
packed_v2_search/data-*.arrow (151 shards) 2,038,836 blocks of 4,096 tokens; columns input_ids, attention_mask, labels 75 GB
packed_v2_search/dataset_info.json, state.json datasets.save_to_disk metadata
tokenizer/ the tokenizer 4 MB
meta/stats_search.json packing statistics (source of the counts on this card)
meta/holdout_curids.txt 54,582 Wikipedia page ids that were set aside and are NOT in this data
Articles 4,885,877
Blocks 2,038,836
Tokens 8.35B (99.86% non-padding)
Articles truncated to fit one block 582,868

Format of a search block

…text<WEB_QUERY>query</WEB_QUERY> <WEB_RESPONSE>retrieved passage</WEB_RESPONSE> text continues…
Token id
<WEB_QUERY> 49152
</WEB_QUERY> 49153
<WEB_RESPONSE> 49154
</WEB_RESPONSE> 49155

Tokenizer: SmolLM2 tokenizer plus these four tokens (vocabulary 49,156), in tokenizer/. labels equals input_ids where the loss applies and is -100 elsewhere: the query and its two tags carry loss; the response tags and the passage do not.

In this dataset 54% of the positions are masked (-100).

How to load

One shard:

from huggingface_hub import hf_hub_download, snapshot_download
from datasets import Dataset
from transformers import AutoTokenizer

repo = "Kausp11/querylm-wiki-pretraining-data"
ds = Dataset.from_file(hf_hub_download(repo, "packed_v2_search/data-00000-of-00151.arrow", repo_type="dataset"))
tok = AutoTokenizer.from_pretrained(snapshot_download(repo, repo_type="dataset", allow_patterns="tokenizer/*") + "/tokenizer")
row = ds[0]
print(len(ds), len(row["input_ids"]))
print(tok.decode(row["input_ids"][:120]))
print(sum(l == -100 for l in row["labels"]), "of", len(row["labels"]), "positions carry no loss")

Output (run 2026-11-19 on the files in this repo, datasets 4.x, transformers 4.56.0):

13503 4096
Albedo (; ) is the fraction of sunlight that is diffusely reflected by a body. It is measured on a scale from<WEB_QUERY>Albedo scale fraction sunlight reflected range values</WEB_QUERY> <WEB_RESPONSE>The orbital skin depth is 174 Albedo and color Albedo Last Updated on Tue, 16 Sep 2014 | Surface of Mars Albedo measures the fraction of sunlight reflected by a body. Ability to Reflect Sunlight Earthshine's brightness is also affected by the Moon's albedo. Albedo is a measurement of how much sunlight a celestial object can reflect. The
2351 of 4096 positions carry no loss

The whole corpus: snapshot_download(repo, repo_type="dataset", allow_patterns="packed_v2_search/*"), then datasets.load_from_disk("<local>/packed_v2_search").

How the search blocks were produced

  1. Where to search. A fine-tuned annotator model (Gemma 4 E4B-it with a LoRA adapter) reads the text and marks positions where a lookup would help predict what follows (insertion probability at least 0.05, at least 40 characters apart), then writes a query of at most 24 tokens for each position.
  2. What comes back. BM25 retrieval over the public Sphere web corpus, shortened by extractive cleaning.
  3. Filter. An insertion is kept only if its passage overlaps the text that follows it (ROUGE-1 F1 of at least 0.1 against the next 260 characters).
  4. Packing. Articles are tokenized and packed into 4,096-token blocks; an article longer than one block is truncated. 54,582 page ids, drawn at random, were set aside before packing.

Known limits

  • 15.7% of the tokens of the annotated articles were dropped by truncation.
  • The snapshot date of the Wikipedia dump is not recorded in this repo.
  • Evaluate on the held-out page ids, not on text sampled from these blocks.

License and attribution

Released under CC BY-NC-SA 4.0.

  • Article text: Wikipedia contributors, CC BY-SA 4.0.
  • Retrieved passages: from Sphere (released under CC BY-NC 4.0), which redistributes text from public web pages.
  • Queries: generated by the annotator model.

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
59

Collection including Kausp11/querylm-wiki-pretraining-data

Paper for Kausp11/querylm-wiki-pretraining-data