# FineMath

- **ID:** 1151
- **Kind:** dataset
- **URL:** https://huggingface.co/datasets/HuggingFaceTB/finemath
- **Authors:** HuggingFaceTB
- **Published:** 2024
- **Source:** huggingface
- **Access:** Free
- **License:** ODC-By 1.0 (card). Also subject to Common Crawl Terms of Use. InfiWebMath configs inherit Infi-MM/InfiMM-WebMath-40B source terms.
- **License family:** Permissive (auto-classified)
- **Topics:** mathematical educational web; Common Crawl HTML filtered for middle-/high-school reasoning; LaTeX/Markdown math pretraining
- **Added:** 2026-08-14
- **Verified:** 2026-08-14
- **Page:** https://papers.projxon.ai/entries/1151

## Summary

Public math pretraining corpus of educational web pages with step-by-step solutions, built because OpenWebMath (12B) and InfiMM-WebMath (40B text) were too small and too paper-heavy for SmolLM2

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

- **Repository:** HuggingFaceTB/finemath (Hugging Face)
- **Created:** Nov 25, 2024 (Hugging Face)
- **Last updated:** Feb 6, 2025 (Hugging Face)
- **Downloads (last month):** 41,257 (Hugging Face)
- **Likes:** 384 (Hugging Face)
- **Size:** 10M to 100M rows (Hugging Face)
- **Modalities:** text (Hugging Face)
- **Formats:** parquet (Hugging Face)

## Dataset profile

- **Scale:** Card: FineMath-3+ 34B Llama tokens / 21,405,610 docs (YAML dataset_size 137.8 GB / download 65.0 GB / 128 parquet). FineMath-4+ subset 9.6B tokens (paper ~10B) / 6,699,493 docs (39.1 GB / 18.4 GB / 64 files). InfiMM-WebMath-3+ 20.5B / 13,882,669 (96.5 GB / 46.8 GB / 64). InfiMM-WebMath-4+ 8.5B / 6,296,212 (40.0 GB / 19.2 GB / 32). Combined FineMath-3+ with InfiMM-WebMath-3+ advertised 54B tokens. All four configs 48,283,984 rows; YAML download_size sum 149,447,371,427 bytes (~149.4 GB); dataset_size sum ~313.4 GB; 288 parquet shards. size_categories 10M<n<100M. Paper: 7.1B pages / 6.5T tokens before the 5-point keep. Hub 343.8k downloads / 377 likes at check.
- **Format:** parquet. FineMath configs: url, fetch_time, content_mime_type, warc_filename, warc_record_offset, warc_record_length, text, token_count (Llama), char_count, metadata (OWM math-markup JSON), score, int_score, crawl, snapshot_type, language, language_score. InfiWebMath configs: url, metadata, score, int_score, token_count, char_count, text.
- **Type:** Pretraining corpus / educational-quality-filtered English math web crawl
- **License:** ODC-By 1.0 (card). Also subject to Common Crawl Terms of Use. InfiWebMath configs inherit Infi-MM/InfiMM-WebMath-40B source terms.
- **Cost:** Free
- **Languages:** English 100% (FineWeb language-ID pipeline applied after scoring; non-English dropped). Card: language + language_score on FineMath configs; InfiWebMath configs keep text/url/score/token_count only.
- **Modality:** Text-only (Markdown + LaTeX). Source HTML; image-based math not preserved.
- **Domain:** mathematical educational web; Common Crawl HTML filtered for middle-/high-school reasoning; LaTeX/Markdown math pretraining
- **Time period:** Re-extracted from Common Crawl WARCs on FineWeb unique URLs (paper: 5.8B unique FineWeb URLs out of CC’s 75B) plus OpenWebMath and InfiMM-WebMath domains. Paper retrieved 7.7B domain-matched URLs then OWM-pipeline re-extract to 7.1B pages / 6.5T tokens before scoring. Viewer samples CC-MAIN-2024-18 and CC-MAIN-2024-22 (`crawl`, `snapshot_type` latest/largest). HF createdAt 2024-11-25; lastModified 2025-02-06. Paper arXiv 2502.02737 (2025-02-04).
- **Purpose:** Public math pretraining corpus of educational web pages with step-by-step solutions, built because OpenWebMath (12B) and InfiMM-WebMath (40B text) were too small and too paper-heavy for SmolLM2
- **Used for:** SmolLM2 1.7B (~11T-token multi-stage mix; FineMath introduced when existing math dumps underperformed). Card annealing: FineMath-4+ beats FineMath-3+ and InfiWebMath-4+ on GSM8k/MATH; 50/50 FineMath-3+ + InfiWebMath-3+ ≈ 50–54B tokens matching FineMath-3+. HuggingFaceTB/finemath-classifier released. Hub 343.8k downloads / 377 likes at check. DOI 10.57967/hf/3847.
- **Authors:** Public-web authors from Common Crawl math/education sites, plus OpenWebMath and InfiMM-WebMath URL lists. Hugging Face Smol Models Research (HuggingFaceTB) curated. Llama-3.1-70B-Instruct silver labels; multilingual-e5-small then a second classifier. Residual AI-generated web text possible; not quantified.
- **Bias:** English-only educational math web. 5-point prompt targets reasoning and middle-/high-school content rather than arXiv-style research (card: advanced academic papers underweighted). Popular educational sites and FineWeb/OWM/InfiMM domains overweighted. FineMath-4+ is a high-score subset of FineMath-3+. Combining FineMath with InfiWebMath without extra cross-dedup is recommended (card: extra dedup of the overlap reduced ablation performance). 13-gram decontam vs GSM8k/MATH/MMLU/ARC.
- **Text quality:** Resiliparse then OpenWebMath extraction to preserve LaTeX. Llama-3.1-70B 5-point scores distilled into HuggingFaceTB/finemath-classifier; keep int_score >= 3 (FineMath-3+) or >= 4 (4+). Paper annealing: FineMath-4+ ~2× GSM8k and ~6× MATH vs raw InfiMM-WebMath. Viewer still includes exam-dump pages and course syllabi at score ~3. Image-only notation dropped. Residual CC boilerplate/toxicity possible.
- **Sample size:** Four train configs, no default: finemath-3plus 21,405,610; finemath-4plus 6,699,493 (subset of 3+); infiwebmath-3plus 13,882,669; infiwebmath-4plus 6,296,212 (subset of 3+). FineMath-4+ is not a random sample. No official 10BT-style subsample.
- **Long context:** Mixed (full web documents; exam pages short, textbooks/syllabi longer. SmolLM2 trained as a small LM, not a long-context recipe).
- **Intermediate steps:** Yes (FineWeb URL set + Resiliparse probe; Llama-3.1-70B 3-point then domain recall including OWM/InfiMM and FineWeb ‘{’ C4-reject logs; OWM-pipeline re-extract; 5-point Llama-3.1-70B classifier; MinHash-LSH; English LID; 13-gram decontam). Classifier: HuggingFaceTB/finemath-classifier. Decontam logs: HuggingFaceTB/finemath_contamination_report.
- **Idea quality:** High
- **Novelty:** High
- **Text conversion:** Ready parquet; load_dataset("HuggingFaceTB/finemath", "finemath-4plus"|"finemath-3plus"|"infiwebmath-3plus"|"infiwebmath-4plus", split="train"). Full dump ~149 GB download.
- **Collection method:** Download
- **Static:** Unknown (HF lastModified 2025-02-06; one-shot CC extraction, not a live crawl refresh)
- **Processed:** Unknown

## Links

- Dataset: https://huggingface.co/datasets/HuggingFaceTB/finemath
- Related: https://arxiv.org/abs/2502.02737
- Related: https://huggingface.co/datasets/HuggingFaceTB/finemath
- Related: https://huggingface.co/HuggingFaceTB/finemath-classifier
- Related: https://huggingface.co/datasets/HuggingFaceTB/finemath_contamination_report
- Related: https://github.com/huggingface/smollm
- Related: https://huggingface.co/datasets/Infi-MM/InfiMM-WebMath-40B
- Related: https://huggingface.co/datasets/open-web-math/open-web-math
- Related: https://huggingface.co/datasets/HuggingFaceFW/fineweb

## Research notes

- Not posted as a dump HF link; public repo HuggingFaceTB/finemath located and used. OpenWebMath is a real public repo at open-web-math/open-web-math (6.3M docs / 14.7B tokens) but is the weaker baseline this corpus replaces, so not cataloged here. Substituted for dump OpenDataArena/FineReason, which has been renamed to MMFineReason (image+text; skip). XenArcAI/MathX-5M dump URL now redirects/renames to Modotte/MathX-5M (viewer 404 on the old id; synthetic NVIDIA/OpenR1 mix) and was not used. Stack-Edu from the same SmolLM2 paper is gated via Stack v2 — skipped. token_count is Llama tokens. Cite Allal et al. 2025 arXiv 2502.02737. Not in papers_local.csv.

## Related entries

- Related: [FineWeb](https://papers.projxon.ai/entries/23) (dataset, #23)
- Related: [Natural Reasoning](https://papers.projxon.ai/entries/93) (dataset, #93)
- Related: [swallowmath2](https://papers.projxon.ai/entries/153) (dataset, #153)

## Similar entries

- [FineWeb-Edu](https://papers.projxon.ai/entries/1088) (dataset, #1088)
- [Open Markdown](https://papers.projxon.ai/entries/263) (dataset, #263)
- [ReScraper: Unified Scraping and Cleaning of Web Data for Effective LLM Pretraining](https://papers.projxon.ai/entries/785) (paper, #785)
- [Common Pile v0.1](https://papers.projxon.ai/entries/874) (dataset, #874)
- [Host-Aware Web Crawling for LLM Pretraining Data](https://papers.projxon.ai/entries/1348) (paper, #1348)
- [MegaMath](https://papers.projxon.ai/entries/1157) (dataset, #1157)
