FineWeb

On this page 7

FineWeb is an open pretraining corpus of English web text, released by Hugging Face in 2024, that contains roughly 15 trillion tokens extracted and cleaned from 96 Common Crawl snapshots collected between 2013 and 2024. In the field of training data for artificial intelligence, it serves as a large, fully documented foundation for training language models, and it is valued because every processing step was tested with ablation models rather than chosen by intuition.

The dataset belongs to the same family as C4, RefinedWeb, RedPajama and Dolma, but it stands out for its scale, permissive license and published recipe. Its best-known derivative, FineWeb-Edu, keeps only pages that a classifier judges to have educational value, and it has become a common baseline for teams that study data quality filtering.

How FineWeb turns raw crawl data into training text

FineWeb is produced by a multi-stage processing pipeline that converts raw WARC files from Common Crawl into clean, deduplicated documents. The pipeline was implemented with datatrove, an open-source library for large-scale data processing, so that others can reproduce or modify each stage.

The team chose to extract text from raw WARC records with trafilatura instead of relying on the preprocessed WET files that Common Crawl also publishes. Their ablations showed that WET text keeps too much boilerplate, such as menus and footers, which measurably weakens downstream models. The stages are summarized below.

StageWhat it doesWhy it matters
URL filteringRemoves domains on adult and malicious blocklistsReduces harmful and low-value content
Text extractionUses trafilatura on WARC filesKeeps main content, drops navigation
Language identificationfastText classifier, English score of at least 0.65Keeps the corpus monolingual
Quality filtersGopher, selected C4 and custom heuristicsRemoves lists, spam and broken text
DeduplicationMinHash within each snapshotRemoves near-identical pages
PII anonymizationMasks email and public IP addressesLimits exposure of personal data
Main stages of the FineWeb pipeline

The custom heuristics were derived by comparing high-quality and low-quality subsets. Examples include thresholds on the share of lines ending in punctuation, the fraction of characters in duplicated lines and the proportion of very short lines, each validated by training small models on filtered and unfiltered variants.

Deduplication choices and the ablation method

A central finding of the FineWeb work is that per-snapshot deduplication outperformed global deduplication across all 96 crawls. Global MinHash removed about 90 percent of the data in older snapshots, and the surviving documents were, on average, of lower quality than those that were removed, so aggressive cross-crawl deduplication actually hurt benchmark scores.

Every design decision was tested with ablation models: transformer models of about 1.8 billion parameters trained on roughly 28 billion tokens, with longer runs of about 350 billion tokens for final comparisons. Scores on benchmarks such as HellaSwag, ARC, PIQA, MMLU and WinoGrande served as early-signal metrics that indicate whether a filter helps or harms.

This approach has a known limitation. Small-model ablations do not always predict behavior at frontier scale, and benchmark suites capture only part of what a model learns. The method is nonetheless far more transparent than undocumented heuristics used in many proprietary corpora.

FineWeb exists in several released variants that trade volume for quality. The table compares the main versions and their intended use.

VariantApproximate sizeSelection ruleTypical use
FineWebAbout 15 trillion tokensFull pipeline outputGeneral pretraining at scale
FineWeb-EduAbout 1.3 trillion tokensEducational score of 3 or higherKnowledge and reasoning benchmarks
FineWeb-Edu-score-2About 5.4 trillion tokensEducational score of 2 or higherLarger budgets with moderate filtering
FineWeb 2Multilingual, over 1,000 languagesLanguage-specific pipeline settingsNon-English pretraining
FineWeb family at a glance

FineWeb-Edu relies on an educational quality classifier. Its labels came from Llama 3 70B Instruct, which rated several hundred thousand pages on a 0 to 5 scale; a small regression model trained on those annotations then scored the whole corpus. Models trained on FineWeb-Edu show large gains on MMLU and ARC, at the cost of weaker coverage of conversational and informal language.

Comparing FineWeb with other open web corpora clarifies its position in the training data landscape.

DatasetSourceApproximate scaleDistinguishing feature
C4One Common Crawl snapshotAbout 156 billion tokensEarly rule-based cleaning
RefinedWebCommon CrawlAbout 600 billion tokens publicStrict deduplication, partial release
RedPajama-V284 Common Crawl snapshotsAbout 30 trillion tokensQuality signals shipped, not applied
DolmaWeb plus code, papers and booksAbout 3 trillion tokensMixed sources with documentation
FineWeb96 Common Crawl snapshotsAbout 15 trillion tokensAblation-tested filtering recipe
FineWeb compared with other open web corpora

Using FineWeb in a pretraining data mix

FineWeb is distributed through the Hugging Face Hub in Parquet format, split by snapshot, with sample subsets of 10, 100 and 350 billion tokens for smaller experiments. Teams usually stream the data rather than download it in full, because the complete corpus occupies tens of terabytes.

The choice of variant depends on compute budget and target capabilities. The following decision table reflects common practice in open model development.

SituationRecommended choiceReason
Small model, limited tokensFineWeb-EduHighest benchmark gain per token
Large model, many epochs avoidedFull FineWebEnough unique tokens for long runs
Balanced general assistantMix of both variantsCombines knowledge with stylistic breadth
Filter research or ablations10B or 100B samplesFast iteration at low cost
Choosing a FineWeb variant

FineWeb is rarely used alone. Practitioners combine it with code corpora such as The Stack, mathematics data, books and an instruction dataset for later fine-tuning. The proportion of web text is a tunable hyperparameter, and data mixture ablations are the standard way to set it.

Licensing, limitations and common misconceptions

FineWeb is released under the ODC-By 1.0 license and is also subject to the Common Crawl terms of use. The license covers the compilation, not the copyright of individual pages, so legal questions about training on web content still apply under each jurisdiction, and Hugging Face provides an opt-out process for site owners.

  • Clean does not mean unbiased: heuristic filters can remove dialects, minority topics and informal registers disproportionately.
  • English only applies to the original release; multilingual coverage requires FineWeb 2.
  • Benchmark contamination remains possible, because test questions published on the web can survive filtering.
  • PII masking is partial: names, phone numbers and other identifiers are not systematically removed.

Another misconception holds that more filtering is always better. The FineWeb experiments show the opposite in specific cases: over-aggressive deduplication and some quality heuristics removed useful data and lowered model scores, which is why every filter in the recipe carries ablation evidence.

Stripped to the essentials

FineWeb is a huge collection of English web pages. It is prepared for teaching AI language models. The pages come from a public archive of the internet. A team removed spam, menus, copies and private details. What remains is clean, readable text.

Think of it as a library built from millions of websites. Most junk has been thrown away. Every cleaning rule was tested on small models first. A special edition, FineWeb-Edu, keeps only pages that teach something. Anyone can download and use it under an open license.

Where it is applied

A university research group wants to train a 1.5 billion parameter language model on a budget of about 100 billion tokens. Its compute is limited to a few weeks on a modest GPU cluster, so every training token must count. The group streams the FineWeb-Edu sample from the Hugging Face Hub and mixes it with a smaller share of the full FineWeb corpus for stylistic variety.

Before the main run, the researchers train two small models of about 400 million parameters: one on full FineWeb and one on the mix. The mixed model scores clearly higher on ARC and MMLU at the same token count, so they adopt it. The final model reaches stronger reasoning benchmarks than an earlier model trained on unfiltered crawl data, and because FineWeb is openly documented, the group can publish its complete data recipe alongside the model.