# SmolLM-Corpus

- **ID:** 1163
- **Kind:** dataset
- **URL:** https://huggingface.co/datasets/HuggingFaceTB/smollm-corpus
- **Authors:** HuggingFaceTB
- **Published:** 2024
- **Source:** huggingface
- **Language:** en
- **Access:** Free
- **License:** ODC-By (HF card YAML odc-by). FineWeb-Edu-dedup also subject to Common Crawl Terms of Use. python-edu inherits Stack-v2 / SWH / GitHub licenses (card: refer to the-stack-v2). Mixtral-8x7B-Instruct-v0.1 terms may still apply to Cosmopedia v2 if used to train a distributed model.
- **License family:** Permissive (auto-classified)
- **Topics:** SLM pre-training; synthetic textbooks; educational web; educational Python
- **Added:** 2026-08-14
- **Verified:** 2026-08-14
- **Page:** https://papers.projxon.ai/entries/1163

## Summary

Train small LMs (SmolLM 135M/360M/1.7B) on a curated educational+synthetic mix

## From the source (fetched 2026-10-03)

- **Repository:** HuggingFaceTB/smollm-corpus (Hugging Face)
- **Created:** Jul 15, 2024 (Hugging Face)
- **Last updated:** Sep 6, 2024 (Hugging Face)
- **Downloads (last month):** 51,249 (Hugging Face)
- **Likes:** 492 (Hugging Face)
- **Size:** 100M to 1B rows (Hugging Face)
- **Modalities:** text (Hugging Face)
- **Formats:** parquet (Hugging Face)

## Dataset profile

- **Scale:** Hub 237.0M rows across 3 configs. cosmopedia-v2 train 39,134,000 / 6 columns / 104 parquet / 122.4 GB download / YAML dataset_size 212,503,640,747 bytes (~212.5 GB) / blog 28B tokens. fineweb-edu-dedup train 190,168,005 / 3 columns / 234 parquet / 550.1 GB download / YAML dataset_size 957,570,164,451 bytes (~957.6 GB) / blog 220B tokens. python-edu train 7,678,448 / 6 columns / 2 parquet / 643.9 MB — metadata only (blob_id/repo_name/path/score; no file text on Hub); blog 4B tokens after SWH S3 download. size_categories 100M<n<1B. Mix ~248B public text tokens (28B+220B) plus 4B Python if SWH fetch succeeds. usedStorage Unknown (do not sum overlapping FineWeb-Edu standalone). Hub overview 662.2K downloads / 480 likes at check. gated=false.
- **Format:** parquet in three Hub configs (cosmopedia-v2, fineweb-edu-dedup, python-edu). cosmopedia-v2 columns: prompt, text, token_length, audience, format, seed_data. fineweb-edu-dedup: text, id, metadata. python-edu: blob_id, repo_name, path, length_bytes, score, int_score.
- **Type:** Pretraining mix / synthetic textbooks + educational web + Python-edu metadata
- **License:** ODC-By (HF card YAML odc-by). FineWeb-Edu-dedup also subject to Common Crawl Terms of Use. python-edu inherits Stack-v2 / SWH / GitHub licenses (card: refer to the-stack-v2). Mixtral-8x7B-Instruct-v0.1 terms may still apply to Cosmopedia v2 if used to train a distributed model.
- **Cost:** Free
- **Languages:** English 100% (card language:en). FineWeb-Edu-dedup preview language=en / language_score 0.928. Cosmopedia v2 Mixtral English textbooks. python-edu is Python source if fetched. No LID percent table. Per-language percents N/A.
- **Modality:** Text-only (English web/textbooks + Python source if downloaded). No images.
- **Domain:** SLM pre-training; synthetic textbooks; educational web; educational Python
- **Time period:** Blog 2024-07-16. HF createdAt 2024-07-15; lastModified 2024-09-06 (Hub Updated 6 Sep 2024). Cosmopedia v2 Mixtral generation; FineWeb-Edu from FineWeb CC; python-edu from Stack-v2-train-full-ids. One-shot mix, not a live crawl.
- **Purpose:** Train small LMs (SmolLM 135M/360M/1.7B) on a curated educational+synthetic mix
- **Used for:** SmolLM 135M/360M (600B tokens from this mix) and SmolLM 1.7B (1T tokens). Hub overview 662.2K downloads / 480 likes at check. Distinct from already-cataloged Cosmopedia (v1) and FineWeb-Edu (full 1.3T).
- **Authors:** Ben Allal, Lozhkov, Penedo, Wolf, von Werra (Hugging Face TB; blog 2024-07-16). Cosmopedia v2 generated by Mixtral-8x7B-Instruct-v0.1. FineWeb-Edu web authors from Common Crawl. python-edu from GitHub via Stack-v2 / Software Heritage.
- **Bias:** Educational-web + Mixtral synthetic textbooks (BISAC 34k topics; blog 40% middle-school / 30% college / 30% mix+stories) + high-score Python. FineWeb-Edu-dedup is a 220B-token subset of already-cataloged FineWeb-Edu — not extra FineWeb-Edu n. Cosmopedia v2 is the Mixtral successor of already-cataloged Cosmopedia v1 — do not concat v1 as extra n. python-edu needs gated Stack v2 / SWH (same caveat as skipped HuggingFaceTB/python-edu and stack-edu).
- **Text quality:** cosmopedia-v2 preview rows 0–1 are fluent college-audience textbooks (Ruangguru distance-learning / induction pan-searing) seeded from FineWeb, token_length 805 and 793. fineweb-edu-dedup preview is an AACAP 2011 parent-help fact sheet (edu score 3.375 / 755 tok / CC-MAIN-2013-20). python-edu preview is metadata only (blob_id, Fib_circle.py, score 3.84 → int_score 4). Residual: Mixtral synthetic; CC boilerplate; python-edu text not on Hub.
- **Sample size:** Three Hub configs, not one concat: cosmopedia-v2 39,134,000; fineweb-edu-dedup 190,168,005; python-edu 7,678,448 metadata. No val/test. Do not add HuggingFaceTB/python-edu standalone (annotations-only) or HuggingFaceTB/cosmopedia v1 as extra n.
- **Long context:** Mixed (Cosmopedia v2 textbooks; FineWeb-Edu pages, preview 755 tok). Exact token histogram Unknown; blog 28B/220B/4B.
- **Intermediate steps:** Yes (BISAC topics + FineWeb retrieval → Mixtral Cosmopedia v2; FineWeb-Edu classifier + dedup 220B; Llama3-annotated Python-edu scorer ≥4 on Stack-v2-train). Blog huggingface.co/blog/smollm.
- **Idea quality:** High
- **Novelty:** High (public SmolLM mix; Cosmopedia v2 39M is not already-cataloged Cosmopedia v1)
- **Text conversion:** Ready parquet for cosmopedia-v2 and fineweb-edu-dedup; streaming required (~672 GB download those two). python-edu requires boto3 S3 fetch from softwareheritage (card: ~6h on 16-core us-east-1); do not treat 7.7M metadata rows as text tokens. load_dataset('HuggingFaceTB/smollm-corpus', 'cosmopedia-v2', split='train'). Do not concat with already-cataloged Cosmopedia / FineWeb-Edu as extra n.
- **Collection method:** Download
- **Static:** Unknown (HF lastModified 2024-09-06; one-shot).
- **Processed:** Unknown

## Links

- Dataset: https://huggingface.co/datasets/HuggingFaceTB/smollm-corpus
- Related: https://huggingface.co/datasets/HuggingFaceTB/smollm-corpus
- Related: https://huggingface.co/blog/smollm
- Related: https://huggingface.co/datasets/HuggingFaceTB/cosmopedia
- Related: https://huggingface.co/datasets/HuggingFaceFW/fineweb-edu
- Related: https://huggingface.co/HuggingFaceTB/python-edu-scorer
- Related: https://huggingface.co/collections/HuggingFaceTB/smollm-models-6695016cad7167254ce15966

## Research notes

- Dump-adjacent public corpus (not in data-source-dump.jsonl). gated=false; public; CuratorBote listed README plus 104+234+2 parquet. Catalog Hub 237.0M rows / blog 28B+220B (+4B Python off-Hub). Cite Ben Allal et al. 2024 SmolLM-Corpus. Not in papers_local.csv. Not on the Aug 13 live Datasets sheet export. Substituted ahead of Hub-gated nvidia/Nemotron-CC-v2 / HuggingFaceTB/stack-edu / bigcode/the-stack-v2; skipped HuggingFaceTB/python-edu (annotations-only; this mix’s python-edu config is the same metadata), GAIR/MathPile (gated), and OpenDataArena/FineReason (multimodal MMFineReason). FineWeb-Edu and Cosmopedia v1 remain separately cataloged — do not sum as extra n.

## Related entries

- Related: [cosmopedia](https://papers.projxon.ai/entries/313) (dataset, #313)
- Related: [FineWeb-Edu](https://papers.projxon.ai/entries/1088) (dataset, #1088)

## Similar entries

- [Generalization Dynamics of LM Pre-training ("Discovering Mode-Hopping")](https://papers.projxon.ai/entries/820) (paper, #820)
- [Synthetic Pre-pretraining Survives Scale, but Not as a Grammatical Prior](https://papers.projxon.ai/entries/848) (paper, #848)
- [No Second Run: Does RSI Stop at Frontier Pre-training?](https://papers.projxon.ai/entries/1584) (paper, #1584)
- [K2 Horizon data release — DATA_NAVIGATOR index and the post-training data-generation pipelines](https://papers.projxon.ai/entries/1443) (tool, #1443)
- [Scaling Pre-Training in Practice: A Hierarchical Approach](https://papers.projxon.ai/entries/836) (post, #836)
- [OpenStax (open educational textbooks)](https://papers.projxon.ai/entries/1000) (other, #1000)
