KYS-Configs
Everything needed to re-run Know Your Sources: Data Selection Matters when Rewriting for Data-Constrained Pretraining end to end: the rewriting prompts, the vLLM generation settings, the Nanotron training configs, the shared initial weights, and the full evaluation harness with all raw results.
Layout
prompts/ the rewriting, annotation and judging prompts
vllm/ the rewriting workers and their SLURM launchers
nanotron/ the 18 training configs + shared init weights
eval/ LightEval tasks, launchers, converter, and 276 raw result JSONs
prompts/
Production rewriting prompts — the six templates that built the released corpora:
| File | Used by |
|---|---|
wikipedia_style_rephrasing_grounded.md |
QUALITY-FIRST, DIVERSITY-ORIENTED, DISAGREEMENT-AWARE, REWIRE-INSPIRED |
distill_prompt.txt |
the same four, as the second pass |
wrap_prompts.json |
WRAP-INSPIRED — four keys: easy, hard, wiki, qa |
The wikipedia-style template is the grounded variant: the upstream text plus an explicit
instruction not to add information that is not stated in or inferable from the source. Each WRAP
style ends with "\n\nPassage:\n" and the document is concatenated, not substituted. Style
assignment is deterministic: np.random.default_rng([42, shard_index]).integers(0, 4, n_rows) over
["easy", "hard", "wiki", "qa"], recorded per row in a wrap_style column.
Supporting prompts:
haiku_annotation_prompt.txt— the five-criterion rubric Claude Haiku 4.5 applied to the 50,427 documents behind the quality scorer (Appendix A).hallucination_judge_prompt.txt— the factual-consistency judge used for the prompt comparison (Appendix C).
prompts/finephrase/ — the 14 pilot templates, reconstructed and verified. See the README
in that directory; they carry caveats the production prompts do not.
vllm/
Rewriting used the offline vllm.LLM Python API, not a server — 8 independent single-GPU
processes data-parallel over shards. There is no endpoint or port to configure.
LLM(model=..., tensor_parallel_size=1, dtype="bfloat16",
gpu_memory_utilization=<0.85 | 0.90>, max_model_len=32768)
max_new = min(4096, 32768 - n_input_tokens)
SamplingParams(temperature=0, top_p=1.0, max_tokens=max(1, max_new))
| Generator | Qwen/Qwen2.5-7B-Instruct, revision a09a35458c702b33eeacc393d103063234e8bc28 |
| vLLM | 0.22.0 |
| torch / transformers | 2.11.0+cu130 / 5.9.0 |
--input-drop |
30720 — longer templated inputs are skipped and marked status = 0 |
| Hardware | 1× H100 per worker, array of 8 |
⚠️ gpu_memory_utilization is inconsistent in the sources. README_07_rewrite.md documents
0.90; sbatch_template_rewrite.sh passes 0.85. The logs show both — 0.90 for the June 2026 runs
(quality-first, diversity-first, wrap, lambda05) and 0.85 for the July 2026 runs. Under greedy
decoding this does not affect outputs, but the README value is wrong for half the runs.
⚠️ No sampling seed was set. SamplingParams carries no seed, and the engine logs seed=0.
Reproducibility rests on temperature=0 alone; bitwise reproducibility is not claimed.
nanotron/
The 18 configs that actually produced the released checkpoints — one authored YAML per (setting, seed), not templated:
config_{quality-base, quality-first, diversity-first, wrap, rewrite,
signal-disagreement-lambda05}_10B_1.5B{, _seed43, _seed44}.yaml
The unsuffixed file is seed 42. Settings differ only by
data_stages[0].data.dataset.dataset_folder; seeds differ by general.seed, general.run,
checkpoints_path and resume_checkpoint_path. data_stages[*].data.seed is 42 throughout.
⚠️ The Nanotron working tree was dirty at training time — the commit that was checked out does
not contain these configs. Provenance by commit hash is not possible, which is why they ship as
files. A separate nanotron-kys reproduction pack exists in the project but produced no released
checkpoint; it is deliberately not included here.
launch_nvl_generic.sbatch and run_nanotron.sh are the SLURM launcher and the
torch.distributed.run --nproc_per_node 4 wrapper.
nanotron/init/ — the shared initial weights
seed42/, seed43/, seed44/: the step-0 checkpoints, converted to HF format, weights only.
This is what makes the comparison controlled. All six settings at a given seed load the same initial parameters, and since there is no dropout and the data order is fixed, the seed controls initialization alone. Row-parallel projections were scaled by 1/√(2L) with L = 28; all other weights drawn from N(0, 0.02).
from transformers import AutoModelForCausalLM
from huggingface_hub import snapshot_download
p = snapshot_download("blab-jhu/KYS-Configs", repo_type="dataset",
allow_patterns=["nanotron/init/seed42/*"])
m = AutoModelForCausalLM.from_pretrained(f"{p}/nanotron/init/seed42")
eval/
| File | What it is |
|---|---|
rewrite_tasks.py |
the custom LightEval task file — rw_hellaswag, rw_piqa, rw_arc:easy, rw_arc:challenge, rw_openbookqa, rw_commonsense_qa, rw_siqa, rw_winogrande, rw_boolq, rw_sciq, rw_lambada, rw_mmlu:<57 subsets> |
env.sh |
task strings (TASKS_CS, TASKS_MMLU), TOKENS_PER_STEP=2097152 |
run_eval.slurm, run_eval_mmlu.slurm, run_arcc.slurm, run_extra.slurm |
the launchers |
ckpt_list*.txt |
the (setting, step) work lists the arrays index into |
convert_to_hf.py |
Nanotron(tp=1, pp=1) → LlamaForCausalLM converter |
results/downstream/ |
276 raw LightEval result JSONs |
appendix_f_per_task.csv |
the 361-row table backing Appendix F |
acc_norm is LoglikelihoodAcc(logprob_normalization=LogProbTokenNorm()) — continuation-token
length normalization, so longer options are not penalized.
The converter is verified
convert_to_hf.py produced both the paper's evaluation checkpoints and the released model repos.
Re-running LightEval on a freshly converted checkpoint reproduces the stored numbers exactly:
| Task | Metric | Stored | Re-run | Delta |
|---|---|---|---|---|
rw_piqa|0 |
acc_norm | 0.710555 | 0.710555 | 0.000e+00 |
rw_hellaswag|0 |
acc_norm | 0.486158 | 0.486158 | 0.000e+00 |
⚠️ The Llama-2 tokenizer used here requires tokenizers >= 0.20; older versions fail to load it
with data did not match any variant of untagged enum ModelWrapper.
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-1.5B-Pretraining-Corpora |
the shared anchor + six strategy remainders |
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
- 10