# FinePDFs

- **ID:** 65
- **Kind:** dataset
- **URL:** https://huggingface.co/datasets/HuggingFaceFW/finepdfs
- **Authors:** HuggingFace FineData team
- **Venue:** HuggingFace (HuggingFaceFW / FineData)
- **Published:** 2025
- **Source:** huggingface
- **Language:** 1733 languages (including English, Arabic, French, German, Spanish, Chinese, and many low-resource languages)
- **Access:** free
- **License:** ODC-BY (Open Data Commons Attribution License)
- **License family:** Permissive (auto-classified)
- **Topics:** NLP / Pretraining Data
- **Added:** 2026-07-17
- **Verified:** 2026-07-17
- **Research status:** done
- **Page:** https://papers.projxon.ai/entries/65

## Summary

FinePDFs is the largest publicly available LLM pretraining corpus sourced exclusively from PDF documents, containing approximately 3 trillion tokens across 475 million documents in 1733 languages. The data was sourced from 105 CommonCrawl snapshots spanning summer 2013 to February 2025, refetched from the internet, and processed using the datatrove library with careful deduplication, OCR, and filtering. The dataset (3.65 TB) includes a companion FinePDFs-EDU variant with educational content filtering. When mixed with FW-Edu+DCLM, FinePDFs outperforms even Nemotron-CC v2 in pretraining ablations. The processing pipeline and code are available on GitHub at huggingface/finepdfs.

## Attributes

- **Purpose:** Providing the largest publicly available LLM pretraining corpus sourced exclusively from PDFs, for use in pretraining and fine-tuning large language models.
- **Scale:** 475M documents, ~3T tokens, 3.65 TB
- **Used for:** LLM pretraining (comparable to datasets used for SmolLM3; outperforms Nemotron-CC v2 when mixed with FW-Edu+DCLM)
- **Time period:** PDFs crawled from CommonCrawl, summer 2013 to February 2025
- **Author type:** human

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

- **Repository:** HuggingFaceFW/finepdfs (Hugging Face)
- **Created:** Sep 5, 2025 (Hugging Face)
- **Last updated:** Apr 3, 2026 (Hugging Face)
- **Downloads (last month):** 55,652 (Hugging Face)
- **Likes:** 946 (Hugging Face)
- **Size:** 100M to 1B rows (Hugging Face)
- **Modalities:** tabular, text (Hugging Face)
- **Tasks:** text-generation (Hugging Face)
- **Formats:** parquet (Hugging Face)

## Dataset profile

- **Scale:** Card table: 475,019,140 documents; 2,918.79B tokens (~2.92T; marketing copy ~3T); 3.65 TB on disk. size_categories n>1T (tokens; Hub tag also 100M<n<1B for docs). eng_Latn 206.9M docs / 1.19T tokens. HF gated=false. Tokenizer on the card is inconsistent (Data Fields: gpt2; Annotations: Llama-3.2) — table counts are card-reported, not independently retokenized.
- **Format:** parquet per language-script (text, id, dump, url, date, file_path, offset, language, per_page_languages, page_average_lid[_score], full_doc_lid[_score], is_truncated, processor, page_ends, token_count). v1.5.0 adds DCLM/EDU/EDU-V2/OCR-QUALITY labels.
- **Type:** Pretraining corpus / cleaned multilingual PDF crawl
- **License:** ODC-By 1.0 (card). Also subject to Common Crawl Terms of Use. Pipeline code AGPL-3.0 (PyMuPDF).
- **Cost:** Free
- **Languages:** 1,733 language-script pairs (GlotLID, page-averaged). 978 with >1M tokens; 66 with >1B. Card table (2,918.79B tokens): eng_Latn 40.8% (1,190.65B / 206.9M docs / 1.71 TB); spa_Latn 7.4% (217.1B); deu_Latn 6.1% (177.6B); fra_Latn 5.7% (165.3B); rus_Cyrl 5.0% (146.7B); jpn_Jpan 4.0% (116.3B); remaining ~30.9% including unknown 47.72B (1.6%). Default config eng_Latn. Code-switching inside documents is common (legal dual-language, academic abstracts).
- **Modality:** Text extracted from PDFs (tables included where parsed). Original PDFs not shipped; images used only in the OCR path.
- **Domain:** PDF web crawl; legal/educational/scientific/technical documents; multilingual pretraining
- **Time period:** Common Crawl PDFs summer 2013–February 2025 (card: CC-MAIN-2013-20 to CC-MAIN-2025-08; intro 105 snapshots / Dataset Summary 106 dumps). Per-doc crawl date in `date`. HF createdAt 2025-09-05; v1.0.0 2025-09-07; v1.5.0 2025-11-11 (classifier labels). lastModified 2026-04-03. Discord posted 2025-09-08.
- **Purpose:** Largest public PDF-only LLM pretraining corpus; complement HTML FineWeb-family dumps (recommended <25% of a mix)
- **Used for:** HuggingFace 1.67B ablation models (~36B Llama-3.2 tokens). Card: nearly on par with SmolLM3-Web; mix with HTML yields a large gain. FinePDFs-Edu is a separate 350B+ educational filter. Hub 45,342 downloads / 913 likes at check. 0 gated.
- **Authors:** Public-web PDF publishers (governments, universities, courts, firms). Hugging Face FineWeb team (Kydlíček / Penedo / von Werra) curated. Residual LLM-OCR (RolmOCR) can imprint model style on scanned pages.
- **Bias:** English ~41% of tokens; high-resource European langs next. Legal/educational PDFs over-index vs HTML FineWeb. No NSFW classifier (authors judged PDFs rarely carry that content). No Wikipedia-likeness or toxicity ML filters (same dialect/identity rationale as FineWeb). Truncated-CC PDFs were refetched; remaining truncated docs always went through RolmOCR. unknown LID 17.1M docs.
- **Text quality:** Dual extractors: Docling (digital-born, CPU, quantized Layout Heron) vs RolmOCR (scanned/truncated, GPU). Exact + per-language MinHash dedup; English-only model filter for ads/spam before MinHash; email/IP PII rewrite. Longer than HTML dumps (blog: median ~5.3k chars, ~2× other corpora; 95th ~68k; many >100k chars). Residual: broken PDF reading order, missing image-text, table misalignment (Docling); OCR hallucination/misspellings especially in low-resource langs (RolmOCR); missing pages when extractors failed.
- **Sample size:** One train (+ small test on most langs) config per language-script; default eng_Latn. Do not train on test splits. No global sample config. FinePDFs-Edu is a separate repo, not a config here.
- **Long context:** Yes (PDFs much longer than HTML pages; card flags value for long-context training; 95th ~68k chars, tail >100k).
- **Intermediate steps:** Yes (datatrove: PDF+truncation ID, refetch truncated PDFs, XGBoost OCR-router on 1,350 annotated PDFs, Docling vs RolmOCR, boilerplate/FTFY, GlotLID per page, exact dedup, eng_Latn model filter, per-language MinHash, PII). Code: github.com/huggingface/finepdfs.
- **Idea quality:** High
- **Novelty:** High (first public ~3T PDF-only pretrain dump; complementary to FineWeb HTML)
- **Text conversion:** Ready parquet; load_dataset by language-script (e.g. eng_Latn) with streaming. datatrove ParquetReader recommended. No official 10BT-style sample. Full dump is multi-TB.
- **Collection method:** Download
- **Static:** Unknown (HF lastModified 2026-04-03; v1.5.0 2025-11-11 added labels; crawl window still ends Feb 2025)
- **Processed:** Unknown

## Links

- Dataset: https://huggingface.co/datasets/HuggingFaceFW/finepdfs
- Related: https://huggingface.co/datasets/HuggingFaceFW/finepdfs
- Related: https://github.com/huggingface/finepdfs
- Related: https://huggingface.co/spaces/HuggingFaceFW/FinePDFsBlog
- Related: https://huggingface.co/datasets/HuggingFaceFW/finepdfs-edu
- Related: https://github.com/huggingface/datatrove

## Research notes

- Associated with arXiv papers 2506.18421 and 2109.07445. Includes PII filtering and copyright opt-out mechanisms. The English subset alone has 207M rows. A companion FinePDFs-EDU dataset applies additional educational quality filtering, removing ~96% of the initial data.
- Discord posted the HF pointer (message 1414628386843918337). Gated=false; public. Cite kydlicek2025finepdfs. Companion FinePDFs-Edu (~350B educational tokens) and mix repos (finepdfs_50BT-dclm_30BT-fineweb_edu_20BT) are separate. Keep PDF share <25% of a pretrain mix per the card. PII/copyright opt-out form on the card. Not in papers_local.csv. Not on the Aug 13 live Datasets sheet export.

## Similar entries

- [Synthetic Pre-pretraining Survives Scale, but Not as a Grammatical Prior](https://papers.projxon.ai/entries/848) (paper, #848)
- [K2 Horizon data release — DATA_NAVIGATOR index and the post-training data-generation pipelines](https://papers.projxon.ai/entries/1443) (tool, #1443)
- [daVinci-LLM: Towards the Science of Pretraining](https://papers.projxon.ai/entries/1127) (paper, #1127)
- [Self-Play Pretraining with Zero Data](https://papers.projxon.ai/entries/1055) (paper, #1055)
- [ReScraper: Unified Scraping and Cleaning of Web Data for Effective LLM Pretraining](https://papers.projxon.ai/entries/785) (paper, #785)
- [Invent a Dataset: Measuring Dataset Generation Abilities With Zero Seed Data](https://papers.projxon.ai/entries/834) (paper, #834)
