--- pretty_name: docs1 language: - en license: cc-by-nc-nd-4.0 task_categories: - text-generation size_categories: - 1M Per-bucket counts | Bucket (tokens) | Docs | Tokens | Largest sources | |---|---:|---:|---| | 1,024–2,047 | 181,521 | 267.2M | finepdfs-edu 11%, youtube 7%, pes2o 7% | | 2,048–3,071 | 175,166 | 440.3M | finepdfs-edu 11%, youtube 7%, pes2o 7% | | 3,072–4,095 | 168,259 | 596.8M | finepdfs-edu 11%, youtube 7%, pes2o 7% | | 4,096–5,119 | 163,511 | 748.4M | finepdfs-edu 12%, youtube 7%, pes2o 7% | | 5,120–6,143 | 155,657 | 871.9M | finepdfs-edu 12%, youtube 8%, pes2o 8% | | 6,144–7,167 | 150,080 | 994.8M | finepdfs-edu 13%, pes2o 8%, finewiki 8% | | 7,168–8,191 | 144,972 | 1.11B | finepdfs-edu 13%, pes2o 8%, finewiki 8% | | 8,192–9,215 | 138,440 | 1.20B | finepdfs-edu 14%, pes2o 9%, finewiki 9% | | 9,216–10,239 | 132,471 | 1.29B | finepdfs-edu 15%, pes2o 9%, finewiki 9% | | 10,240–11,263 | 128,087 | 1.37B | finepdfs-edu 15%, pes2o 9%, finewiki 9% | | 11,264–12,287 | 122,528 | 1.44B | finepdfs-edu 16%, pes2o 10%, caselaw 9% | | 12,288–13,311 | 115,851 | 1.48B | finepdfs-edu 17%, pes2o 10%, caselaw 10% | | 13,312–14,335 | 108,186 | 1.49B | finepdfs-edu 18%, pes2o 11%, caselaw 11% | | 14,336–15,359 | 100,785 | 1.49B | finepdfs-edu 19%, pes2o 12%, caselaw 11% | | 15,360–16,383 | 94,119 | 1.49B | finepdfs-edu 21%, pes2o 13%, caselaw 11% | | 16,384–17,407 | 86,953 | 1.47B | finepdfs-edu 22%, pes2o 11%, fineweb-edu 11% | | 17,408–18,431 | 80,582 | 1.44B | finepdfs-edu 24%, fineweb-edu 11%, caselaw 11% | | 18,432–19,455 | 74,208 | 1.40B | finepdfs-edu 25%, fineweb-edu 12%, caselaw 10% | | 19,456–20,479 | 68,718 | 1.37B | finepdfs-edu 26%, fineweb-edu 12%, caselaw 9% | | 20,480–21,503 | 63,270 | 1.33B | finepdfs-edu 27%, fineweb-edu 13%, gutenberg 9% | | 21,504–22,527 | 57,848 | 1.27B | finepdfs-edu 27%, fineweb-edu 13%, gutenberg 10% | | 22,528–23,551 | 52,651 | 1.21B | finepdfs-edu 27%, fineweb-edu 14%, gutenberg 12% | | 23,552–24,575 | 47,671 | 1.15B | finepdfs-edu 27%, fineweb-edu 14%, gutenberg 12% | | 24,576–25,599 | 43,812 | 1.10B | finepdfs-edu 27%, fineweb-edu 14%, gutenberg 13% | | 25,600–26,623 | 40,642 | 1.06B | finepdfs-edu 27%, fineweb-edu 14%, gutenberg 14% | | 26,624–27,647 | 37,858 | 1.03B | finepdfs-edu 27%, gutenberg 15%, fineweb-edu 14% | | 27,648–28,671 | 35,840 | 1.01B | finepdfs-edu 27%, gutenberg 16%, fineweb-edu 14% | | 28,672–29,695 | 33,405 | 974.7M | finepdfs-edu 27%, gutenberg 17%, fineweb-edu 14% | | 29,696–30,719 | 31,342 | 946.7M | finepdfs-edu 26%, gutenberg 18%, fineweb-edu 14% | | 30,720–31,743 | 29,652 | 925.9M | finepdfs-edu 27%, gutenberg 18%, fineweb-edu 14% | | 31,744–32,768 | 25,560 | 823.7M | finepdfs-edu 28%, gutenberg 19%, fineweb-edu 14% | ## Construction 1. **Sources.** Datasets that are already curated and trusted: FineWeb-Edu, FinePDFs-Edu, FineWiki, ar5iv, the openly licensed [Common Pile v0.1](https://huggingface.co/common-pile) subsets (papers, books, textbooks, Q&A, government, law, transcripts, educational code), and agent instruction files (`Andwwy/rules`, SkillMD). 2. **Filters.** Source-level quality filters only: FinePDFs-Edu not truncated and without near-duplicates (`minhash_cluster_size == 1`); Stack-Edu code with edu score ≥ 3; agent files mostly Latin script and with no credential patterns. 3. **Length.** Every document is tokenized with the MiniCPM5-2B tokenizer. Documents of 1,024–32,768 tokens are kept whole. Longer documents (mostly books, theses and long reports) are cut into at most 6 consecutive segments at paragraph breaks. Each segment is sized for a random length bucket that still needs documents. 4. **Balance.** Each source collects up to a fixed number of documents per bucket (6,000; FinePDFs-Edu 12,000), so no single source can dominate a bucket. The merge removes exact duplicates and keeps every remaining document; buckets are not truncated, so balancing by length happens at load time. 5. **Determinism.** Sources, files and rows are chosen with fixed seeds. Building again from the same Hub revisions gives the same IDs and nearly the same selection. ## Cleaning (v1.1) Conservative, rule-based, chosen by reading flagged documents from a 3% stratified sample; rules with real false positives were narrowed to the sources where they only caught junk. | Step | Documents | |---|---:| | dropped: `repeated` | 2,864 | | dropped: `table_dump` | 2,843 | | dropped: `symbol_soup` | 2,254 | | dropped: `non_english` | 1,187 | | dropped: `nav_menu` | 82 | | dropped: `out_of_range_after_fix` | 35 | | repaired: `nul` | 13,553 | | repaired: `mojibake` | 2,236 | | moved to another bucket after repair | 601 | `non_english`: mostly non-Latin text; `symbol_soup`: under 60% letters, digits and spaces (prose sources); `repeated`: over half the text in repeated lines (PDFs and US government sources); `table_dump`: number tables of one or two words per line; `nav_menu`: scraped site navigation. `nul`: NUL bytes removed; `mojibake`: wrong-encoding text such as `’` repaired with ftfy. Repaired documents keep their `id` and list the repairs in `metadata.cleaned`. Earlier versions stay available in the repository history. ## Limitations - **Long buckets are less diverse.** Natural documents over ~16K tokens are rare outside PDFs, papers and books, so those categories dominate the long end. Later stages add synthetic long documents. - **Not decontaminated** against any benchmark. Check overlap before using docs1 near an evaluation set. - **Novelty varies.** Wikipedia and famous texts are likely known to the base model; papers, PDFs and agent files much less so. - **Mixed licenses.** The repository is marked CC BY-NC-ND 4.0, but each document also keeps its source license (see `metadata.license` where present; e.g. Wikipedia is CC BY-SA). Check the source license before reuse. - **English only**, by source selection (no language filter on Common Pile subsets beyond their own). ## Roadmap - **Stage 2, original documents:** newly scraped material (recent docs, repositories, papers) and model-written documents aimed at specific length buckets (`source_type = "original"`). - **Stage 3, augmented documents:** model-made variants of docs1 documents, from small factual edits to style changes. Each records `metadata.parent_id`. ## Reproduce ```bash # Stage 1: one CPU job per source group (8 in parallel) uv run gpu --provider aws --region us-east-1 sagemaker submit datasets/docs1/collect.sh --instance ml.c6i.32xlarge --name aq-docs1- # Stage 2: merge, card, publish uv run gpu --provider aws --region us-east-1 sagemaker submit datasets/docs1/merge.sh --instance ml.r6i.16xlarge --name aq-docs1-merge ``` Code: `datasets/docs1/` in the AlphaQualia repository.