CoolFace
Datasetpublic

oklenAI/UDM_cleaned_docs

UDM cleaned docs 6,029,052 web pages reduced to just their mathematical content, extracted verbatim by oklenAI/udm_doc_extract_qwen3.5_2B — a 2B model distilled from GPT-5.6. Every row is model output, not human-curated text. The extract field is what the model returned for that page; the source page text is not included. Read Two repetition flags below before filtering — the obvious flag is not the one you want. How it was built step pages… See the full description on the dataset page: https://huggingface.co/datasets/oklenAI/UDM_cleaned_docs.

sourceHugging Faceupdated 22d agoView on Hugging Face
0likes562downloads
Dataset Card

UDM cleaned docs

6,029,052 web pages reduced to just their mathematical content, extracted verbatim by oklenAI/udm_doc_extract_qwen3.5_2B — a 2B model distilled from GPT-5.6.

Every row is model output, not human-curated text. The extract field is what the model returned for that page; the source page text is not included. Read Two repetition flags below before filtering — the obvious flag is not the one you want.

How it was built

steppages
TeraflopAI/udml2-labeled, keeping score >= 213,514,716the 0–7 scale lives in score (__label__N), not in quality_label, which only ever takes {4, 5}
after exact-content dedup6,029,05255.39% of the filtered pool is duplicated across shards; within any single shard only ~2% is, because the source is globally shuffled before sharding

Extraction ran greedy (no sampling, no repetition penalty) under vLLM 0.28.0 with a per-page token budget of min(24576, 1.25 x input_tokens + 256, 40960 - input_tokens). Sizing the budget to the page rather than to a constant matters: extraction length scales with input, so a flat cap silently truncates exactly the long pages. Input-side truncation hit 1 page out of 6,029,052.

Schema

columntypemeaning
content_idstringp_ + sha256(source page utf-8)[:24]. Joins back to the source dataset — recompute it there, no normalisation, no NFKC.
scoreint8quality band 2–7 carried over from the source dataset
ncharint32characters in the source page
in_tok / out_tokint32tokens in / out
truncboolsource page was truncated on the input side
extractstringthe payload — mathematical content, verbatim
rep20float3220-gram repeat rate over the whole extract
degenerateboolrep20 > 0.30over-inclusive, see below
rep_tailfloat3220-gram repeat rate over the last 300 words (0.0 where degenerate is false)
loopboolrep_tail >= 0.70this is the defect flag

Two repetition flags, and why the obvious one is wrong

A high whole-document repeat rate has two completely different causes, and they need opposite treatment:

  • the model looped — greedy decoding locks onto a short n-gram and repeats it until the token budget runs out. Broken output.
  • the page repeats itself — a forum thread quoting the same code block, a worksheet built from a template, a page that prints its theory section twice. The model transcribed it faithfully. Good output.

rep20 > 0.30 cannot tell these apart. rep_tail can, because a genuine loop is still looping when the budget runs out while a repetitive page is still producing new text at the end. The split is bimodal, not a continuum — sampled non-loop pages score exactly 0.000 — so the threshold is not delicate.

pagesof corpusof flagged
flagged degenerate (rep20 > 0.30)66,1981.098%100%
`loop`, the model actually broke38,7640.643%58.6%
— page was repetitive, extraction is fine — keep these27,4340.455%41.4%

So filter on `loop`, not on `degenerate` — about a third of degenerate is good extraction of repetitive source pages, and worksheets and problem sets are exactly the pages this corpus is for. Nothing was deleted; both flags ship so you can choose.

Looping is strongly length-dependent:

source page lengthpages`degenerate``loop`
<5k chars2,980,9590.329%0.156%
5-20k chars2,201,6741.233%0.717%
>=20k chars846,4193.454%2.164%

Corpus statistics

pages6,029,052
parquet files (zstd)117, 13.14 GB
source page lengthmedian 5,084, mean 9,319, p90 24,702, max 49,998 chars
pages over 20,000 chars13.93%
input tokens18,588,607,640
output tokens12,542,804,450 (0.675 x input)
empty extractions34 (0.001%)

score distribution: 2 10.7%, 3 35.5%, 4 10.7%, 5 27.9%, 6 8.7%, 7 6.5%

Usage

python
from datasets import load_dataset

ds = load_dataset("oklenAI/UDM_cleaned_docs", split="corpus", streaming=True)
clean = (r for r in ds if not r["loop"])          # drop the ~0.6% the model broke on

The split is called corpus, not train — this is extracted document text, not anyone's training split.

How faithful is it?

Faithfulness here means agreement with the teacher, GPT-5.6-Sol, called exactly as it was called to build the model's training data. It does not measure whether the teacher was right.

449 pages were drawn from this corpus itself — not from the model's evaluation set — in three length bands, and re-extracted by the teacher:

short (n=150)medium (n=150)long (n=149)
charF1 vs teacher0.96930.92860.8811
contiguous-span coverage0.98910.98310.9767
strict order preservation99.28%93.79%92.14%
boilerplate residue0.67%4.00%3.36%
share with 20-gram repeat > 0.30.00%0.67%2.01%
empty-output rate0.00%0.00%0.00%

Two things worth reading off this table. Long-page charF1 on production pages is 0.8811, slightly above the 0.8668 the model card reports on its held-out long ruler — the corpus is not harder than the ruler said it would be. And the repetition tail shows up independently: 2.01% of these 149 long pages exceed a 0.3 repeat rate, against 3.454% measured over all 846,419 long pages in the corpus. Those two are consistent rather than equal — at n=149 the sample simply cannot resolve a rate this small — but the check was run by different code on a different sample and still lands in the same place.

Limits

  • Student, not oracle. Every fidelity number is agreement with GPT-5.6. Nothing here was audited against the source pages by a human.
  • Long pages are measurably harder. charF1 0.8811 on long pages vs 0.9693 on short ones, and the loop rate is 13.9x higher in the >=20k band than in the <5k band.
  • Formula-token excess. The teacher check shows 21.48% excess notation tokens on long pages. The prompt mandates notation repair, so this is not that share of hallucination — but measure repetition directly rather than trusting token counts as a proxy.
  • Nothing beyond ~50,000 characters. The source pool tops out at 49,998 chars.
  • English only, and only pages the source dataset already labelled as mathematical.
  • Empty output is a valid answer where a page carries no substantive math; the observed empty rate is 0.001%.

Provenance and licensing

Page text originates from TeraflopAI/udml2-labeled, which declares no license. This derived corpus adds only the extraction; check the upstream dataset before redistributing or training on it.

Extraction model: oklenAI/udm_doc_extract_qwen3.5_2B. The prompt used is shipped with the model as extract_prompt.txt.