You need to agree to share your Hugging Face information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

KYS-1.5B-Pretraining-Corpora

The six 10B-token pretraining mixtures from Know Your Sources: Data Selection Matters when Rewriting for Data-Constrained Pretraining, stored without duplication.

The key idea: one anchor, six remainders

Every setting trains on the same 10B-token recipe:

10B mixture  =  5B shared anchor  +  5B strategy-specific tokens
                (identical in all      (this is the ONLY thing
                 six settings,          that differs between
                 never rewritten)       the six settings)

Storing six full mixtures would ship the anchor six times over — ~44 GB of pure duplication. So this repo holds anchor/ once at the top level, and each strategy directory holds only that strategy's 5B-token remainder. To reconstruct any setting's training corpus, concatenate anchor/ with one strategy directory.

Layout

Directory Files Documents Tokens Rewritten?
anchor/ 200 4,120,164 5,000,002,332 no
quality_base/ 200 3,133,023 5,000,000,805 no — raw text, verbatim
quality_first/ 400 10,311,309 5,000,000,308 yes
diversity_oriented/ 400 8,336,411 4,889,635,504 yes
disagreement_aware/ 400 8,442,273 5,000,000,003 yes
wrap_inspired/ 400 13,022,091 5,000,000,087 yes
rewire_inspired/ 400 12,290,444 5,000,000,351 yes

anchor/_manifest.json records how the anchor was selected: fasttext-v2 DESC over (all minus val), seed 42.

diversity_oriented is 110,364,496 tokens short of 5B. Its per-topic quotas could not be filled in Adult, History, Literature and Religion without cross-topic backfill, which the policy forbids. Its mixture is therefore 9.89B tokens rather than 10B, which is why that setting trains 14,147 steps instead of 14,305 — the "1.1% fewer training tokens" noted in the paper.

⚠️ The six schemas are NOT the same

These directories were produced by different pipeline stages, so you cannot blindly concatenate them. Columns present in each:

Column anchor quality_base quality_first diversity_oriented disagreement_aware wrap_inspired rewire_inspired
doc_id, orig_doc_id, text, url, metadata, topic, tokens-llama2 ✅ ✅ ✅ ✅ ✅ ✅ ✅
fasttext, fineweb-edu, modernbert (raw scores) ✅ ✅ · · · · ·
fasttext-ranking-v2 ✅ ✅ ✅ ✅ ✅ ✅ ✅
fineweb-edu-ranking-v2, modernbert-ranking-v2 ✅ ✅ ✅ · ✅ · ·
rewritten_tokens · · ✅ ✅ ✅ ✅ ✅
status · · ✅ ✅ ✅ ✅ ·
source_prompt · · ✅ ✅ ✅ ✅ ✅
u_score · · · · ✅ · ·
rewritten_fasttext_score, rewritten_fasttext_ranking_v2 · · · · · · ✅

Common columns: doc_id / orig_doc_id join back to KYS-DCLM-Refinedweb-100M-Scored; text is the rewritten text in the five rewritten directories and the original text in anchor/ and quality_base/; tokens-llama2 is the Llama-2 token count of text; source_prompt names which template produced it; status is the generation status flag (0 = skipped because the templated input exceeded the 30,720-token cap).

disagreement_aware.u_score is the selection utility u = q + 0.5·√v. rewire_inspired.rewritten_fasttext_* are the post-rewrite fastText score and percentile — that setting selects on quality attained after rewriting, so those are its selection keys.

Reconstructing a training corpus

import glob, pyarrow.parquet as pq, pyarrow as pa
from huggingface_hub import snapshot_download

d = snapshot_download("blab-jhu/KYS-1.5B-Pretraining-Corpora", repo_type="dataset",
                      allow_patterns=["anchor/*", "diversity_oriented/*"])
files = sorted(glob.glob(f"{d}/anchor/*.parquet")) + sorted(glob.glob(f"{d}/diversity_oriented/*.parquet"))
# select the common columns before concatenating -- the schemas differ
cols = ["doc_id", "orig_doc_id", "text", "url", "topic", "tokens-llama2"]
tbl = pa.concat_tables([pq.read_table(f, columns=cols) for f in files])

The models were trained on a seed-42 document-level shuffle of that concatenation, tokenized to 2048-token windows with the Llama-2 tokenizer and an EOS separator, so sequences cross document boundaries. The shuffled and tokenized intermediates are derivable and are not shipped.

How the six strategies select

All operate on the candidate pool = the 100M-document table minus a 50,000-document validation set minus the anchor.

Setting Rule
QUALITY-BASE The next 5B tokens down the DCLM fastText ranking, used verbatim. The non-rewritten control.
QUALITY-FIRST Top_Bs(D, r_fastText) — rank the whole pool by fastText percentile, rewrite the top.
DIVERSITY-ORIENTED Give each of the 24 WebOrganizer topics a quota equal to its share of pool tokens; rank by fastText within topic.
DISAGREEMENT-AWARE Over the union of the three scorers' top-10% sets, with a quality floor (Q30 = 0.6957) and variance cap (V90 = 0.1036), rank by u = q + 0.5·√v.
WRAP-INSPIRED Uniform random sample; each document rewritten under one of four style prompts.
REWIRE-INSPIRED Uniform random sample oversampled 2×, rewrite everything, keep the best outputs by fastText.

Rewriting

Qwen2.5-7B-Instruct (revision a09a35458c702b33eeacc393d103063234e8bc28) via the offline vLLM LLM API (v0.22.0), greedy decoding (temperature=0, top_p=1.0), max_model_len=32768, max_tokens=4096.

Four of the five rewritten settings use two Nemotron-CC-style prompts, wikipedia_style_rephrasing (grounded variant) and distill. wrap_inspired instead uses four style prompts — easy / hard / wiki / qa — assigned deterministically by np.random.default_rng([42, shard_index]).integers(0, 4, n_rows). All templates are in KYS-Configs/prompts/.

No sampling seed was set in SamplingParams; reproducibility rests on greedy decoding, and bitwise reproducibility is not claimed.

The rest of the release

Repo What it holds
KYS-1.5B-Quality-Base QUALITY-BASE — non-rewritten baseline
KYS-1.5B-Quality-First QUALITY-FIRST
KYS-1.5B-Diversity-Oriented DIVERSITY-ORIENTED
KYS-1.5B-Disagreement-Aware DISAGREEMENT-AWARE (λ = 0.5)
KYS-1.5B-Wrap-Inspired WRAP-INSPIRED
KYS-1.5B-Rewire-Inspired REWIRE-INSPIRED
KYS-Modernbert-Quality-Scorer the distilled ModernBERT ridge quality scorer
KYS-DCLM-Refinedweb-100M-Scored the candidate pool with all scores
KYS-Claude-Haiku-50K-Labeled the Claude Haiku annotations behind the scorer
KYS-Configs prompts, vLLM, Nanotron and eval configs + shared init weights

Citation

@misc{kys2026,
  title  = {Know Your Sources: Data Selection Matters when Rewriting for Data-Constrained Pretraining},
  author = {TODO},
  year   = {2026},
  note   = {TODO: fill in venue / arXiv id / URL}
}
Downloads last month
57