FineWeb2: One Pipeline to Scale Them All - Adapting Pre-Training Data Processing to Every Language

Guilherme Penedo, Hynek Kydlícek, Vinko Sabolcec, Bettina Messmer, Negar Foroutan, Amir Hossein Kargaran, Colin Raffel, Martin Jaggi, Leandro von Werra, Thomas Wolf

Introduction

The FineWeb2 project addresses the critical gap in high-quality pre-training data for multilingual Large Language Models (LLMs). While English-centric models benefit from curated datasets like the original FineWeb, multilingual data processing has historically relied on rigid, "one-size-fits-all" heuristics. These often fail to account for linguistic diversity, leading to the accidental removal of high-quality text in non-English languages. FineWeb2 introduces an adaptive pipeline that scales across 1,868 language-script pairs, resulting in a 20-terabyte dataset of 5 billion documents.

The FineWeb2 Adaptive Pipeline

The core innovation of FineWeb2 is its ability to adapt filtering and deduplication strategies to the unique statistical properties of each language. Key technical components include:

  • GlotLID for Language Identification: Supporting 1,880 languages, this tool explicitly handles different scripts for the same language (e.g., Arabic in both Arabic and Latin scripts).
  • Adaptive Filtering: Rather than using static thresholds, the pipeline employs language-specific distributions. Methods like 10Tail (removing the bottom 10% of a metric) and Quantile matching ensure that quality filters are linguistically fair.
  • MinHash Deduplication: Global fuzzy deduplication is applied per language to enhance training efficiency.

Data Rehydration and the U-Shaped Quality Curve

A key discovery in the FineWeb2 project is the "U-shaped" relationship between document uniqueness and quality. Analysis revealed that documents at the extremes—those that are entirely unique or excessively duplicated—often represent low-quality content like high-entropy noise or boilerplate text.

Figure 2: Removal rates by cluster size, illustrating the U-shaped quality curve used for data rehydration.

To capitalize on this, the authors introduced "Data Rehydration," a novel upsampling strategy. By using filtering rates as a proxy for quality, the pipeline selectively upsamples documents within the "sweet spot" of moderate duplication, maximizing the density of high-quality content.

Experimental Results

The effectiveness of the FineWeb2 pipeline was validated using a suite of 84 "early-signal" benchmarks across diverse "canary" languages. The results demonstrate that each stage of the pipeline—from Language ID to Rehydration—contributes to a measurable increase in model performance.

Figure 1: Aggregate performance scores across different pipeline stages for six representative languages.

Models trained on FineWeb2 outperformed those using established multilingual datasets (such as mC4, CC-100, CulturaX, and HPLT) in 11 out of 14 tested languages. Furthermore, the adaptive logic proved robust, generalizing well to languages not included in the initial "canary" set, such as German, Italian, and Japanese.

Conclusion and Limitations

FineWeb2 provides a high-quality foundation for more equitable global LLMs. However, challenges remain. For many low-resource languages, data remains dominated by narrow domains like the Bible or Wikipedia, limiting model diversity. Additionally, while the pipeline excels at linguistic tasks, future work is needed to address cultural alignment and the long-term scaling effects of these data properties. FineWeb2 represents a major step toward an inclusive AI ecosystem, ensuring that scaling up doesn't leave the world's linguistic diversity behind.

Summary updated

BibTeX
@inproceedings{penedo2025fineweb,
  author = {Guilherme Penedo and Hynek Kydlícek and Vinko Sabolcec and Bettina Messmer and Negar Foroutan and Amir Hossein Kargaran and Colin Raffel and Martin Jaggi and Leandro von Werra and Thomas Wolf},
  title = {{FineWeb2: One Pipeline to Scale Them All - Adapting Pre-Training Data Processing to Every Language}},
  booktitle = {COLM},
  year = {2025},
  url = {https://openreview.net/forum?id=jnRBe6zatP},
}
Figure