HuggingFaceFW/fineweb

Dataset

3,307

stars

1

commits

12

linked in READMEs

Jul 11, 2025

updated

Browse cluster: LLM Pretraining Datasets & Corpora

README

🍷 FineWeb

FineWeb: The finest collection of data the web has to offer

15 trillion tokens of the finest data the 🌐 web has to offer

Table of Contents

What is it?

The 🍷 FineWeb dataset consists of more than 18.5T tokens (originally 15T tokens) of cleaned and deduplicated english web data from CommonCrawl. The data processing pipeline is optimized for LLM performance and ran on the 🏭 datatrove library, our large scale data processing library.

🍷 FineWeb was originally meant to be a fully open replication of 🦅 RefinedWeb, with a release of the full dataset under the ODC-By 1.0 license. However, by carefully adding additional filtering steps, we managed to push the performance of 🍷 FineWeb well above that of the original 🦅 RefinedWeb, and models trained on our dataset also outperform models trained on other commonly used high quality web datasets (like C4, Dolma-v1.6, The Pile, SlimPajama, RedPajam2) on our aggregate group of benchmark tasks.

That said, we think there is still room for additional filtering and improvement and intend to continue exploring how to improve the dataset quality in coming versions of 🍷 FineWeb.

What is being released?

Along with the dataset, which includes all CommonCrawl dumps since 2013, we also share all the code needed to fully reproduce our processing setup using the 🏭 datatrove library here. To enable full replication of our results, we have also published the small ablation models we have trained using nanotron to validate the dataset and compare it with other reference datasets. You will find them here, with checkpoints every 1000 steps. We have also published our evaluation results here. Our evaluation setup is available here.

You will find details on the different processing decisions we took and some interesting explorations of deduplication methods on our blogpost.

Changelog

Previous versions remain available in the branch version name.

  • v1.4.0 (11-07-2025): Added 6 new snapshots: CC-MAIN-2025-05, CC-MAIN-2025-08, CC-MAIN-2025-13, CC-MAIN-2025-18, CC-MAIN-2025-21, and CC-MAIN-2025-26 (January to June 2025)
  • v1.3.0 (31-01-2025): Fixed an issue with some dumps where some documents hadn't been processed: CC-MAIN-2024-10, CC-MAIN-2024-18, CC-MAIN-2024-22, CC-MAIN-2024-26, CC-MAIN-2024-30, CC-MAIN-2024-33, CC-MAIN-2024-38, CC-MAIN-2024-42, CC-MAIN-2024-46 -- they now contain more data (~400B additional tokens). We also removed specific domains in response to a C&D notice.
  • v1.2.0 (03-01-2025): Added 8 new snapshots: CC-MAIN-2024-22, CC-MAIN-2024-26, CC-MAIN-2024-30, CC-MAIN-2024-33, CC-MAIN-2024-38, CC-MAIN-2024-42, CC-MAIN-2024-46, CC-MAIN-2024-51, covering May to December 2024.
  • v1.1.0 (31-05-2024): We reprocessed and reuploaded 11 dumps, CC-MAIN-2021-49 to CC-MAIN-2023-40, as we found a bug on their deduplication. We also added the most recent dump: CC-MAIN-2024-18, crawled over April 2024. Expect a small perf improvement
  • v1.0.0 (21-04-2024): Initial version

How to download and use 🍷 FineWeb

You can load the full dataset or a specific crawl/dump (see table below). Dumps have the format CC-MAIN-(year)-(week number).

(Smaller) sample versions

Along with config default (all the data), and the configs for each individual dump, you can also download the following configs:

  • sample-350BT: a subset randomly sampled from the whole dataset of around 350B gpt2 tokens (388GB)
  • sample-100BT: a subset randomly sampled from the whole dataset of around 100B gpt2 tokens (277.4GB)
  • sample-10BT: a subset randomly sampled from the whole dataset of around 10B gpt2 tokens (27.6GB)

sample-10B was sampled from sample-100B which in turn was sampled from sample-350BT.

Using 🏭 datatrove

from datatrove.pipeline.readers import ParquetReader

# limit determines how many documents will be streamed (remove for all)
# to fetch a specific dump: hf://datasets/HuggingFaceFW/fineweb/data/CC-MAIN-2024-10
# replace "data" with "sample/100BT" to use the 100BT sample
data_reader = ParquetReader("hf://datasets/HuggingFaceFW/fineweb/data", limit=1000) 
for document in data_reader():
    # do something with document
    print(document)

###############################    
# OR for a processing pipeline:
###############################

from datatrove.executor import LocalPipelineExecutor
from datatrove.pipeline.readers import ParquetReader
from datatrove.pipeline.filters import LambdaFilter
from datatrove.pipeline.writers import JsonlWriter

pipeline_exec = LocalPipelineExecutor(
    pipeline=[
        # replace "data/CC-MAIN-2024-10" with "sample/100BT" to use the 100BT sample
        ParquetReader("hf://datasets/HuggingFaceFW/fineweb/data/CC-MAIN-2024-10", limit=1000),
        LambdaFilter(lambda doc: "hugging" in doc.text),
        JsonlWriter("some-output-path")
    ],
    tasks=10
)
pipeline_exec.run()

Using huggingface_hub

from huggingface_hub import snapshot_download
folder = snapshot_download(
                "HuggingFaceFW/fineweb", 
                repo_type="dataset",
                local_dir="./fineweb/",
                # replace "data/CC-MAIN-2023-50/*" with "sample/100BT/*" to use the 100BT sample
                allow_patterns="data/CC-MAIN-2023-50/*")

For faster downloads, make sure to install pip install huggingface_hub[hf_transfer] and set the environment variable HF_HUB_ENABLE_HF_TRANSFER=1.

Using datasets

from datasets import load_dataset
# use name="sample-10BT" to use the 10BT sample
fw = load_dataset("HuggingFaceFW/fineweb", name="CC-MAIN-2024-10", split="train", streaming=True)

Breakdown by dump/crawl

DumpTime periodDisk size (GB)gpt2 tokens (billions)
CC-MAIN-2025-26June 2025419.6152.4
CC-MAIN-2025-21May 2025462.8168.1
CC-MAIN-2025-18April 2025506.8184.2
CC-MAIN-2025-13March 2025491.1178.5
CC-MAIN-2025-08February 2025472.0171.6
CC-MAIN-2025-05January 2025558.8203.5
CC-MAIN-2024-51December 2024362.6131.2
CC-MAIN-2024-46November 2024474.6172.9
CC-MAIN-2024-42October 2024434.0158.1
CC-MAIN-2024-38September 2024506.2184.6
CC-MAIN-2024-33August 2024400.6145.9
CC-MAIN-2024-30July 2024451.3164.6
CC-MAIN-2024-26June 2024496.5181.2
CC-MAIN-2024-22May 2024499.7182.5
CC-MAIN-2024-18April 2024520.6190.3
CC-MAIN-2024-10February/March 2024581.3212.6
CC-MAIN-2023-50November/December 2023650.0239.7
CC-MAIN-2023-40September/October 2023668.7252.0
CC-MAIN-2023-23May/June 2023654.4249.2
CC-MAIN-2023-14March/April 2023621.3236.5
CC-MAIN-2023-06January/February 2023621.9233.9
CC-MAIN-2022-49November/December 2022631.2237.5
CC-MAIN-2022-40September/October 2022606.4228.7
CC-MAIN-2022-33August 2022434.6163.5
CC-MAIN-2022-27June/July 2022574.9216.1
CC-MAIN-2022-21May 2022646.4242.7
CC-MAIN-2022-05January 2022520.1195.4
CC-MAIN-2021-49November/December 2021413.7155.5
CC-MAIN-2021-43October 2021601.5221.0
CC-MAIN-2021-43October 2021601.5221.0
CC-MAIN-2021-39September 2021518.9190.6
CC-MAIN-2021-31July/August 2021593.9217.7
CC-MAIN-2021-25June 2021424.4155.7
CC-MAIN-2021-21May 2021455.9167.4
CC-MAIN-2021-17April 2021556.0204.1
CC-MAIN-2021-10February/March 2021463.2169.6
CC-MAIN-2021-04January 2021562.4205.4
CC-MAIN-2020-50November/December 2020422.8154.3
CC-MAIN-2020-45October 2020426.9155.8
CC-MAIN-2020-40September 2020555.5202.4
CC-MAIN-2020-34August 2020379.6138.7
CC-MAIN-2020-29July 2020489.6178.7
CC-MAIN-2020-24May/June 2020398.7145.1
CC-MAIN-2020-16March/April 2020454.0165.6
CC-MAIN-2020-10February 2020369.6134.7
CC-MAIN-2020-05January 2020483.3176.4
CC-MAIN-2019-51December 2019359.3130.9
CC-MAIN-2019-47November 2019395.4144.0
CC-MAIN-2019-43October 2019422.3153.9
CC-MAIN-2019-39September 2019394.4143.7
CC-MAIN-2019-35August 2019454.2165.4
CC-MAIN-2019-30July 2019416.6151.5
CC-MAIN-2019-26June 2019412.9150.1
CC-MAIN-2019-22May 2019432.8157.4
CC-MAIN-2019-18April 2019426.7155.3
CC-MAIN-2019-13March 2019417.8152.1
CC-MAIN-2019-09February 2019467.2169.9
CC-MAIN-2019-04January 2019438.1158.7
CC-MAIN-2018-51December 2018498.6180.8
CC-MAIN-2018-47November 2018437.7158.9
CC-MAIN-2018-43October 2018468.8169.9
CC-MAIN-2018-39September 2018429.2155.2
CC-MAIN-2018-34August 2018408.2148.0
CC-MAIN-2018-30July 2018501.5181.4
CC-MAIN-2018-26June 2018467.5170.0
CC-MAIN-2018-22May 2018398.6144.2
CC-MAIN-2018-17April 2018435.1158.1
CC-MAIN-2018-13March 2018471.5171.5
CC-MAIN-2018-09February 2018490.2178.0
CC-MAIN-2018-05January 2018493.5180.7
CC-MAIN-2017-51December 2017442.6161.5
CC-MAIN-2017-47November 2017457.9167.1
CC-MAIN-2017-43October 2017535.6194.9
CC-MAIN-2017-39September 2017444.5162.3
CC-MAIN-2017-34August 2017503.2183.4
CC-MAIN-2017-30July 2017439.2161.2
CC-MAIN-2017-26June 2017491.5179.8
CC-MAIN-2017-22May 2017441.0161.5
CC-MAIN-2017-17April 2017596.8218.6
CC-MAIN-2017-13March 2017579.8212.1
CC-MAIN-2017-09February 2017492.2180.2
CC-MAIN-2017-04January 2017474.3174.4
CC-MAIN-2016-50December 2016448.9165.4
CC-MAIN-2016-44October 2016467.8172.0
CC-MAIN-2016-40September 2016386.1142.8
CC-MAIN-2016-36August 2016339.6126.3
CC-MAIN-2016-30July 2016346.0128.4
CC-MAIN-2016-26June 2016256.595.5
CC-MAIN-2016-22May 2016310.9115.4
CC-MAIN-2016-18April 2016298.1110.8
CC-MAIN-2016-07February 2016342.7127.2
CC-MAIN-2015-48November 2015353.9131.3
CC-MAIN-2015-40September 2015284.0105.5
CC-MAIN-2015-35August 2015359.4133.2
CC-MAIN-2015-32July 2015352.4130.1
CC-MAIN-2015-27June 2015335.5124.0
CC-MAIN-2015-22May 2015380.2140.4
CC-MAIN-2015-18April 2015389.0143.8
CC-MAIN-2015-14March 2015337.5124.5
CC-MAIN-2015-11February 2015361.4133.3
CC-MAIN-2015-06January 2015356.1131.3
CC-MAIN-2014-52December 2014388.5143.3
CC-MAIN-2014-49November 2014319.9117.7
CC-MAIN-2014-42October 2014371.1136.4
CC-MAIN-2014-41September 2014408.1150.2
CC-MAIN-2014-35August 2014395.7145.6
CC-MAIN-2014-23July 2014425.0156.5
CC-MAIN-2014-15April 2014369.1135.7
CC-MAIN-2014-10March 2014396.2146.2
CC-MAIN-2013-48Winter 2013396.8145.9
CC-MAIN-2013-20Summer 2013393.9144.5
Total50,446.918,527.0

Dataset performance evaluation and ablations

We conducted our dataset performance ablations and evaluations by training a series of 1.8B parameters models on 27 billion tokens. To compare 🍷 FineWeb with other datasets, we also trained one of these 1.8B models per target dataset, on 350 billion tokens sampled from it (or the entire dataset when its size was < 350 billion tokens).

Hyper-parameters for ablation models

The detailed configurations for training the 1.8B parameters ablation model can be found here (link will be added soon).

Ablation evaluation benchmarks

To conduct the ablations for each of our dataset filtering choices, we selected a set of benchmarks which we identified as “high-signal” benchmarks. These benchmarks were selected according to the following criteria:

  • small variance between runs trained on different samplings of the same dataset
  • performance increasing monotically during training (or close)
  • separation between runs on datasets of known quality (C4, The Pile, RedPajama) higher than the variance between runs with various modeling/data seeds

We used the following list of benchmark for our ablation runs:

  • commonsense_qa (acc/acc_norm)
  • hellaswag (acc/acc_norm)
  • openbookqa (acc/acc_norm)
  • piqa (acc/acc_norm)
  • siqa (acc/acc_norm)
  • winogrande (acc/acc_norm)
  • arc (acc/acc_norm)
  • mmlu (acc/acc_norm)

To compare runs we consider an aggregate score, the average of the scores for these tasks.

The prompts for all these benchmarks are formatted in order to compute and compare the log-likelihood of the full answers for each multiple choice question. All the implementation details for the benchmarks are available in lighteval here.

Comparison with other datasets

We compared 🍷 FineWeb with the following datasets:

You will find these models on this collection. We have uploaded checkpoints at every 1000 training steps. You will also find our full evaluation results here.

ablations

Note: The plot is smoothed by averaging 5k steps in a rolling window.

Dataset card for 🍷 FineWeb

Dataset Description

Dataset Summary

This dataset was created by processing 96 CommonCrawl dumps comprising web data crawled from the summer of 2013 to April of 2024. 🍷 FineWeb includes a variety of domains and topics in English and is primarily intended to be used as a research artifact on public data in the context of pretraining dataset for large language models. The CommonCrawl data was carefully processed, filtered and deduplicated with the 🏭 datatrove library, resulting in the largest publicly available clean LLM pretraining dataset, counting around 15 trillion tokens (gpt2 tokenizer).

Dataset Structure

Data Instances

The following is an example sample from the dataset. It is part of the CC-MAIN-2021-43 and was crawled on 2021-10-15T21:20:12Z.

{
   "text": "This is basically a peanut flavoured cream thickened with egg yolks and then set into a ramekin on top of some jam. Tony, one of the Wedgwood chefs, suggested sprinkling on some toasted crushed peanuts at the end to create extra crunch, which I thought was a great idea. The result is excellent.",
   "id": "<urn:uuid:e5a3e79a-13d4-4147-a26e-167536fcac5d>",
   "dump": "CC-MAIN-2021-43",
   "url": "<http://allrecipes.co.uk/recipe/24758/peanut-butter-and-jam-creme-brulee.aspx?o_is=SimilarRecipes&o_ln=SimRecipes_Photo_7>",
   "date": "2021-10-15T21:20:12Z",
   "file_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-43/segments/1634323583083.92/warc/CC-MAIN-20211015192439-20211015222439-00600.warc.gz",
   "language": "en",
   "language_score": 0.948729,
   "token_count": 69
}

Data Fields

  • text (string): the main text content
  • id (string): original unique identifier for this sample from CommonCrawl
  • dump (string): the CommonCrawl dump this sample was a part of
  • url (string): url to the original page where text was present
  • date (string): crawl date (from CommonCrawl)
  • file_path (string): s3 path for the individual CommonCrawl warc file containing this sample
  • language (string): en for all the samples in this dataset
  • language_score (float): language prediction score (0.01.0) as reported by the fastText language classifier
  • token_count (int): number of tokens when applying the gpt2 tokenizer to this sample

Data Splits

The default subset includes the entire dataset. If you would like to only use the data from a particular CommonCrawl dump, you can use the dump name as a subset. You will find the full list of available dumps on the table above. From experiments we have run, not all dumps give the same performance. For relatively small trainings (<550 billion tokens) we recommend using the recent CC-MAIN-2023-50, CC-MAIN-2024-10 and CC-MAIN-2024-18.

Dataset Creation

Curation Rationale

While multiple open-weights models have regularly been released in recent months, these releases often do not include the model's training data. With 🍷 FineWeb we aim to provide the open source community with a very large clean pretraining dataset that can be used to push the envelope on truly open source models (open source models where data is also released).

Source Data

The source data consists of webpages crawled by the CommonCrawl foundation over the 2013-2024 time period.

We then extracted the main page text from the html of each webpage, carefully filtered each sample and deduplicated each individual CommonCrawl dump/crawl.

While we originally intended to deduplicate the dataset as a whole, our ablations showed that training on a sampling of individually deduplicated dumps/crawls outperformed training on a sampling of all the dumps/crawls deduplicated together. You will find more details on our blogpost.

Data processing steps

We used the 🏭 datatrove library to process the data. You can find a working script that launches the entire processing pipeline here.

The data processing pipeline consists of:

  1. Url Filtering, removing documents originating from Malicious and NSFW websites, using both block-list as well as subwords detection
  2. Trafilatura text extraction on the raw HTML from CommonCrawl’s warc files
  3. FastText LanguageFilter, removing any document with en language score lower than 0.65
  4. Quality filtering
    1. Gopher Repetition / Quality
    2. C4 Quality filters except terminal_punct rule
    3. FineWeb custom filters, consisting of heuristics for removing list-like documents, documents with repeated lines and documents with likely wrong line formatting.
  5. MinHash deduplication with each crawl deduplicated individually (5-grams, 14x8 hash functions)
  6. PII Formatting to anonymize email and public IP addresses

Annotations

We augment the original samples with the language, language_score and token_count annotations. The language related annotations are automatically generated by our language filter. token_count is generated by applying the gpt2 tokenizer to the text column.

Personal and Sensitive Information

We anonymize email addresses and public IP addresses.

For emails, we apply a regex pattern and replace any occurrence of an email address with either email@example.com or firstname.lastname@example.org. For IP addresses, we also employ a regex pattern and then further filter to only anonymize IP addresses allocated for public networks. Matched IP addresses are then replaced with one of the following randomly generated IP addresses, which at the time of dataset creation were not responding to ping requests: 22.214.171.124, 126.96.36.199, 188.8.131.52, 184.108.40.206, 220.127.116.11, and 18.104.22.168. We decided against applying regex patterns for phone numbers due to the high false positive rate.

Despite our efforts, given that 🍷 FineWeb is sourced from the internet at large, it is very likely that some personable identifiable information (PII) will be present. If you find your own PII in 🍷 FineWeb and would like it removed, please fill out our PII removal form.

Considerations for Using the Data

Social Impact of Dataset

With the release of this dataset we aim to make model training more accessible to the machine learning community at large.

While multiple open-weights models with strong performance have been publicly released in the past, more often than not these releases are not accompanied by the corresponding training dataset. This is unfortunate as the dataset specificities and characteristics have been demonstrated to have a very large impact and role in the performances of the models. As the creation of a high quality training dataset is a fundamental requirement to training an LLM capable of excelling at downstream tasks, with 🍷 FineWeb we (a) not only make the dataset creation process more transparent, by sharing our entire processing setup including the codebase used, we also (b) help alleviate the costs of dataset curation, both in time and in compute, for model creators by publicly releasing our dataset with the community.

Discussion of Biases

Efforts were made to minimize the amount of NSFW and toxic content present in the dataset by employing filtering on the URL level. However, there are still a significant number of documents present in the final dataset that could be considered toxic or contain harmful content. As 🍷 FineWeb was sourced from the web as a whole, any harmful biases typically present in it may be reproduced on our dataset.

We deliberately avoided using machine learning filtering methods that define text quality based on the similarity to a “gold” source such as wikipedia or toxicity classifiers as these methods have been known to disproportionately remove content in specific dialects and overclassify as toxic text related to specific social identities, respectively.

Other Known Limitations

As a consequence of some of the filtering steps applied, it is likely that code content is not prevalent in our dataset. If you are training a model that should also perform code tasks, we recommend you use 🍷 FineWeb with a code dataset, such as The Stack v2. You should also probably consider complementing 🍷 FineWeb with specialized curated sources (such as Wikipedia, for example) as they will likely have better formatting than the wikipedia content included in 🍷 FineWeb (we did not tailor the processing to individual websites).

Additional Information

Licensing Information

The dataset is released under the Open Data Commons Attribution License (ODC-By) v1.0 license. The use of this dataset is also subject to CommonCrawl's Terms of Use.

Future work

We plan to not only continue but also expand our efforts to create open-source high quality training datasets and to improve 🍷 FineWeb itself in future iterations.

Citation Information

Paper on arXiv

@inproceedings{
  penedo2024the,
  title={The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scale},
  author={Guilherme Penedo and Hynek Kydl{\'\i}{\v{c}}ek and Loubna Ben allal and Anton Lozhkov and Margaret Mitchell and Colin Raffel and Leandro Von Werra and Thomas Wolf},
  booktitle={The Thirty-eight Conference on Neural Information Processing Systems Datasets and Benchmarks Track},
  year={2024},
  url={https://openreview.net/forum?id=n6SCkn2QaG}
}

Contributors

guipenedo

1 commits

HuggingFaceFW/fineweb

Dataset

3,307

stars

1

commits

12

linked in READMEs

Jul 11, 2025

updated

Browse cluster: LLM Pretraining Datasets & Corpora

README

🍷 FineWeb

FineWeb: The finest collection of data the web has to offer

15 trillion tokens of the finest data the 🌐 web has to offer

Table of Contents

What is it?

The 🍷 FineWeb dataset consists of more than 18.5T tokens (originally 15T tokens) of cleaned and deduplicated english web data from CommonCrawl. The data processing pipeline is optimized for LLM performance and ran on the 🏭 datatrove library, our large scale data processing library.

🍷 FineWeb was originally meant to be a fully open replication of 🦅 RefinedWeb, with a release of the full dataset under the ODC-By 1.0 license. However, by carefully adding additional filtering steps, we managed to push the performance of 🍷 FineWeb well above that of the original 🦅 RefinedWeb, and models trained on our dataset also outperform models trained on other commonly used high quality web datasets (like C4, Dolma-v1.6, The Pile, SlimPajama, RedPajam2) on our aggregate group of benchmark tasks.

That said, we think there is still room for additional filtering and improvement and intend to continue exploring how to improve the dataset quality in coming versions of 🍷 FineWeb.

What is being released?

Along with the dataset, which includes all CommonCrawl dumps since 2013, we also share all the code needed to fully reproduce our processing setup using the 🏭 datatrove library here. To enable full replication of our results, we have also published the small ablation models we have trained using nanotron to validate the dataset and compare it with other reference datasets. You will find them here, with checkpoints every 1000 steps. We have also published our evaluation results here. Our evaluation setup is available here.

You will find details on the different processing decisions we took and some interesting explorations of deduplication methods on our blogpost.

Changelog

Previous versions remain available in the branch version name.

  • v1.4.0 (11-07-2025): Added 6 new snapshots: CC-MAIN-2025-05, CC-MAIN-2025-08, CC-MAIN-2025-13, CC-MAIN-2025-18, CC-MAIN-2025-21, and CC-MAIN-2025-26 (January to June 2025)
  • v1.3.0 (31-01-2025): Fixed an issue with some dumps where some documents hadn't been processed: CC-MAIN-2024-10, CC-MAIN-2024-18, CC-MAIN-2024-22, CC-MAIN-2024-26, CC-MAIN-2024-30, CC-MAIN-2024-33, CC-MAIN-2024-38, CC-MAIN-2024-42, CC-MAIN-2024-46 -- they now contain more data (~400B additional tokens). We also removed specific domains in response to a C&D notice.
  • v1.2.0 (03-01-2025): Added 8 new snapshots: CC-MAIN-2024-22, CC-MAIN-2024-26, CC-MAIN-2024-30, CC-MAIN-2024-33, CC-MAIN-2024-38, CC-MAIN-2024-42, CC-MAIN-2024-46, CC-MAIN-2024-51, covering May to December 2024.
  • v1.1.0 (31-05-2024): We reprocessed and reuploaded 11 dumps, CC-MAIN-2021-49 to CC-MAIN-2023-40, as we found a bug on their deduplication. We also added the most recent dump: CC-MAIN-2024-18, crawled over April 2024. Expect a small perf improvement
  • v1.0.0 (21-04-2024): Initial version

How to download and use 🍷 FineWeb

You can load the full dataset or a specific crawl/dump (see table below). Dumps have the format CC-MAIN-(year)-(week number).

(Smaller) sample versions

Along with config default (all the data), and the configs for each individual dump, you can also download the following configs:

  • sample-350BT: a subset randomly sampled from the whole dataset of around 350B gpt2 tokens (388GB)
  • sample-100BT: a subset randomly sampled from the whole dataset of around 100B gpt2 tokens (277.4GB)
  • sample-10BT: a subset randomly sampled from the whole dataset of around 10B gpt2 tokens (27.6GB)

sample-10B was sampled from sample-100B which in turn was sampled from sample-350BT.

Using 🏭 datatrove

from datatrove.pipeline.readers import ParquetReader

# limit determines how many documents will be streamed (remove for all)
# to fetch a specific dump: hf://datasets/HuggingFaceFW/fineweb/data/CC-MAIN-2024-10
# replace "data" with "sample/100BT" to use the 100BT sample
data_reader = ParquetReader("hf://datasets/HuggingFaceFW/fineweb/data", limit=1000) 
for document in data_reader():
    # do something with document
    print(document)

###############################    
# OR for a processing pipeline:
###############################

from datatrove.executor import LocalPipelineExecutor
from datatrove.pipeline.readers import ParquetReader
from datatrove.pipeline.filters import LambdaFilter
from datatrove.pipeline.writers import JsonlWriter

pipeline_exec = LocalPipelineExecutor(
    pipeline=[
        # replace "data/CC-MAIN-2024-10" with "sample/100BT" to use the 100BT sample
        ParquetReader("hf://datasets/HuggingFaceFW/fineweb/data/CC-MAIN-2024-10", limit=1000),
        LambdaFilter(lambda doc: "hugging" in doc.text),
        JsonlWriter("some-output-path")
    ],
    tasks=10
)
pipeline_exec.run()

Using huggingface_hub

from huggingface_hub import snapshot_download
folder = snapshot_download(
                "HuggingFaceFW/fineweb", 
                repo_type="dataset",
                local_dir="./fineweb/",
                # replace "data/CC-MAIN-2023-50/*" with "sample/100BT/*" to use the 100BT sample
                allow_patterns="data/CC-MAIN-2023-50/*")

For faster downloads, make sure to install pip install huggingface_hub[hf_transfer] and set the environment variable HF_HUB_ENABLE_HF_TRANSFER=1.

Using datasets

from datasets import load_dataset
# use name="sample-10BT" to use the 10BT sample
fw = load_dataset("HuggingFaceFW/fineweb", name="CC-MAIN-2024-10", split="train", streaming=True)

Breakdown by dump/crawl

DumpTime periodDisk size (GB)gpt2 tokens (billions)
CC-MAIN-2025-26June 2025419.6152.4
CC-MAIN-2025-21May 2025462.8168.1
CC-MAIN-2025-18April 2025506.8184.2
CC-MAIN-2025-13March 2025491.1178.5
CC-MAIN-2025-08February 2025472.0171.6
CC-MAIN-2025-05January 2025558.8203.5
CC-MAIN-2024-51December 2024362.6131.2
CC-MAIN-2024-46November 2024474.6172.9
CC-MAIN-2024-42October 2024434.0158.1
CC-MAIN-2024-38September 2024506.2184.6
CC-MAIN-2024-33August 2024400.6145.9
CC-MAIN-2024-30July 2024451.3164.6
CC-MAIN-2024-26June 2024496.5181.2
CC-MAIN-2024-22May 2024499.7182.5
CC-MAIN-2024-18April 2024520.6190.3
CC-MAIN-2024-10February/March 2024581.3212.6
CC-MAIN-2023-50November/December 2023650.0239.7
CC-MAIN-2023-40September/October 2023668.7252.0
CC-MAIN-2023-23May/June 2023654.4249.2
CC-MAIN-2023-14March/April 2023621.3236.5
CC-MAIN-2023-06January/February 2023621.9233.9
CC-MAIN-2022-49November/December 2022631.2237.5
CC-MAIN-2022-40September/October 2022606.4228.7
CC-MAIN-2022-33August 2022434.6163.5
CC-MAIN-2022-27June/July 2022574.9216.1
CC-MAIN-2022-21May 2022646.4242.7
CC-MAIN-2022-05January 2022520.1195.4
CC-MAIN-2021-49November/December 2021413.7155.5
CC-MAIN-2021-43October 2021601.5221.0
CC-MAIN-2021-43October 2021601.5221.0
CC-MAIN-2021-39September 2021518.9190.6
CC-MAIN-2021-31July/August 2021593.9217.7
CC-MAIN-2021-25June 2021424.4155.7
CC-MAIN-2021-21May 2021455.9167.4
CC-MAIN-2021-17April 2021556.0204.1
CC-MAIN-2021-10February/March 2021463.2169.6
CC-MAIN-2021-04January 2021562.4205.4
CC-MAIN-2020-50November/December 2020422.8154.3
CC-MAIN-2020-45October 2020426.9155.8
CC-MAIN-2020-40September 2020555.5202.4
CC-MAIN-2020-34August 2020379.6138.7
CC-MAIN-2020-29July 2020489.6178.7
CC-MAIN-2020-24May/June 2020398.7145.1
CC-MAIN-2020-16March/April 2020454.0165.6
CC-MAIN-2020-10February 2020369.6134.7
CC-MAIN-2020-05January 2020483.3176.4
CC-MAIN-2019-51December 2019359.3130.9
CC-MAIN-2019-47November 2019395.4144.0
CC-MAIN-2019-43October 2019422.3153.9
CC-MAIN-2019-39September 2019394.4143.7
CC-MAIN-2019-35August 2019454.2165.4
CC-MAIN-2019-30July 2019416.6151.5
CC-MAIN-2019-26June 2019412.9150.1
CC-MAIN-2019-22May 2019432.8157.4
CC-MAIN-2019-18April 2019426.7155.3
CC-MAIN-2019-13March 2019417.8152.1
CC-MAIN-2019-09February 2019467.2169.9
CC-MAIN-2019-04January 2019438.1158.7
CC-MAIN-2018-51December 2018498.6180.8
CC-MAIN-2018-47November 2018437.7158.9
CC-MAIN-2018-43October 2018468.8169.9
CC-MAIN-2018-39September 2018429.2155.2
CC-MAIN-2018-34August 2018408.2148.0
CC-MAIN-2018-30July 2018501.5181.4
CC-MAIN-2018-26June 2018467.5170.0
CC-MAIN-2018-22May 2018398.6144.2
CC-MAIN-2018-17April 2018435.1158.1
CC-MAIN-2018-13March 2018471.5171.5
CC-MAIN-2018-09February 2018490.2178.0
CC-MAIN-2018-05January 2018493.5180.7
CC-MAIN-2017-51December 2017442.6161.5
CC-MAIN-2017-47November 2017457.9167.1
CC-MAIN-2017-43October 2017535.6194.9
CC-MAIN-2017-39September 2017444.5162.3
CC-MAIN-2017-34August 2017503.2183.4
CC-MAIN-2017-30July 2017439.2161.2
CC-MAIN-2017-26June 2017491.5179.8
CC-MAIN-2017-22May 2017441.0161.5
CC-MAIN-2017-17April 2017596.8218.6
CC-MAIN-2017-13March 2017579.8212.1
CC-MAIN-2017-09February 2017492.2180.2
CC-MAIN-2017-04January 2017474.3174.4
CC-MAIN-2016-50December 2016448.9165.4
CC-MAIN-2016-44October 2016467.8172.0
CC-MAIN-2016-40September 2016386.1142.8
CC-MAIN-2016-36August 2016339.6126.3
CC-MAIN-2016-30July 2016346.0128.4
CC-MAIN-2016-26June 2016256.595.5
CC-MAIN-2016-22May 2016310.9115.4
CC-MAIN-2016-18April 2016298.1110.8
CC-MAIN-2016-07February 2016342.7127.2
CC-MAIN-2015-48November 2015353.9131.3
CC-MAIN-2015-40September 2015284.0105.5
CC-MAIN-2015-35August 2015359.4133.2
CC-MAIN-2015-32July 2015352.4130.1
CC-MAIN-2015-27June 2015335.5124.0
CC-MAIN-2015-22May 2015380.2140.4
CC-MAIN-2015-18April 2015389.0143.8
CC-MAIN-2015-14March 2015337.5124.5
CC-MAIN-2015-11February 2015361.4133.3
CC-MAIN-2015-06January 2015356.1131.3
CC-MAIN-2014-52December 2014388.5143.3
CC-MAIN-2014-49November 2014319.9117.7
CC-MAIN-2014-42October 2014371.1136.4
CC-MAIN-2014-41September 2014408.1150.2
CC-MAIN-2014-35August 2014395.7145.6
CC-MAIN-2014-23July 2014425.0156.5
CC-MAIN-2014-15April 2014369.1135.7
CC-MAIN-2014-10March 2014396.2146.2
CC-MAIN-2013-48Winter 2013396.8145.9
CC-MAIN-2013-20Summer 2013393.9144.5
Total50,446.918,527.0

Dataset performance evaluation and ablations

We conducted our dataset performance ablations and evaluations by training a series of 1.8B parameters models on 27 billion tokens. To compare 🍷 FineWeb with other datasets, we also trained one of these 1.8B models per target dataset, on 350 billion tokens sampled from it (or the entire dataset when its size was < 350 billion tokens).

Hyper-parameters for ablation models

The detailed configurations for training the 1.8B parameters ablation model can be found here (link will be added soon).

Ablation evaluation benchmarks

To conduct the ablations for each of our dataset filtering choices, we selected a set of benchmarks which we identified as “high-signal” benchmarks. These benchmarks were selected according to the following criteria:

  • small variance between runs trained on different samplings of the same dataset
  • performance increasing monotically during training (or close)
  • separation between runs on datasets of known quality (C4, The Pile, RedPajama) higher than the variance between runs with various modeling/data seeds

We used the following list of benchmark for our ablation runs:

  • commonsense_qa (acc/acc_norm)
  • hellaswag (acc/acc_norm)
  • openbookqa (acc/acc_norm)
  • piqa (acc/acc_norm)
  • siqa (acc/acc_norm)
  • winogrande (acc/acc_norm)
  • arc (acc/acc_norm)
  • mmlu (acc/acc_norm)

To compare runs we consider an aggregate score, the average of the scores for these tasks.

The prompts for all these benchmarks are formatted in order to compute and compare the log-likelihood of the full answers for each multiple choice question. All the implementation details for the benchmarks are available in lighteval here.

Comparison with other datasets

We compared 🍷 FineWeb with the following datasets:

You will find these models on this collection. We have uploaded checkpoints at every 1000 training steps. You will also find our full evaluation results here.

ablations

Note: The plot is smoothed by averaging 5k steps in a rolling window.

Dataset card for 🍷 FineWeb

Dataset Description

Dataset Summary

This dataset was created by processing 96 CommonCrawl dumps comprising web data crawled from the summer of 2013 to April of 2024. 🍷 FineWeb includes a variety of domains and topics in English and is primarily intended to be used as a research artifact on public data in the context of pretraining dataset for large language models. The CommonCrawl data was carefully processed, filtered and deduplicated with the 🏭 datatrove library, resulting in the largest publicly available clean LLM pretraining dataset, counting around 15 trillion tokens (gpt2 tokenizer).

Dataset Structure

Data Instances

The following is an example sample from the dataset. It is part of the CC-MAIN-2021-43 and was crawled on 2021-10-15T21:20:12Z.

{
   "text": "This is basically a peanut flavoured cream thickened with egg yolks and then set into a ramekin on top of some jam. Tony, one of the Wedgwood chefs, suggested sprinkling on some toasted crushed peanuts at the end to create extra crunch, which I thought was a great idea. The result is excellent.",
   "id": "<urn:uuid:e5a3e79a-13d4-4147-a26e-167536fcac5d>",
   "dump": "CC-MAIN-2021-43",
   "url": "<http://allrecipes.co.uk/recipe/24758/peanut-butter-and-jam-creme-brulee.aspx?o_is=SimilarRecipes&o_ln=SimRecipes_Photo_7>",
   "date": "2021-10-15T21:20:12Z",
   "file_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-43/segments/1634323583083.92/warc/CC-MAIN-20211015192439-20211015222439-00600.warc.gz",
   "language": "en",
   "language_score": 0.948729,
   "token_count": 69
}

Data Fields

  • text (string): the main text content
  • id (string): original unique identifier for this sample from CommonCrawl
  • dump (string): the CommonCrawl dump this sample was a part of
  • url (string): url to the original page where text was present
  • date (string): crawl date (from CommonCrawl)
  • file_path (string): s3 path for the individual CommonCrawl warc file containing this sample
  • language (string): en for all the samples in this dataset
  • language_score (float): language prediction score (0.01.0) as reported by the fastText language classifier
  • token_count (int): number of tokens when applying the gpt2 tokenizer to this sample

Data Splits

The default subset includes the entire dataset. If you would like to only use the data from a particular CommonCrawl dump, you can use the dump name as a subset. You will find the full list of available dumps on the table above. From experiments we have run, not all dumps give the same performance. For relatively small trainings (<550 billion tokens) we recommend using the recent CC-MAIN-2023-50, CC-MAIN-2024-10 and CC-MAIN-2024-18.

Dataset Creation

Curation Rationale

While multiple open-weights models have regularly been released in recent months, these releases often do not include the model's training data. With 🍷 FineWeb we aim to provide the open source community with a very large clean pretraining dataset that can be used to push the envelope on truly open source models (open source models where data is also released).

Source Data

The source data consists of webpages crawled by the CommonCrawl foundation over the 2013-2024 time period.

We then extracted the main page text from the html of each webpage, carefully filtered each sample and deduplicated each individual CommonCrawl dump/crawl.

While we originally intended to deduplicate the dataset as a whole, our ablations showed that training on a sampling of individually deduplicated dumps/crawls outperformed training on a sampling of all the dumps/crawls deduplicated together. You will find more details on our blogpost.

Data processing steps

We used the 🏭 datatrove library to process the data. You can find a working script that launches the entire processing pipeline here.

The data processing pipeline consists of:

  1. Url Filtering, removing documents originating from Malicious and NSFW websites, using both block-list as well as subwords detection
  2. Trafilatura text extraction on the raw HTML from CommonCrawl’s warc files
  3. FastText LanguageFilter, removing any document with en language score lower than 0.65
  4. Quality filtering
    1. Gopher Repetition / Quality
    2. C4 Quality filters except terminal_punct rule
    3. FineWeb custom filters, consisting of heuristics for removing list-like documents, documents with repeated lines and documents with likely wrong line formatting.
  5. MinHash deduplication with each crawl deduplicated individually (5-grams, 14x8 hash functions)
  6. PII Formatting to anonymize email and public IP addresses

Annotations

We augment the original samples with the language, language_score and token_count annotations. The language related annotations are automatically generated by our language filter. token_count is generated by applying the gpt2 tokenizer to the text column.

Personal and Sensitive Information

We anonymize email addresses and public IP addresses.

For emails, we apply a regex pattern and replace any occurrence of an email address with either email@example.com or firstname.lastname@example.org. For IP addresses, we also employ a regex pattern and then further filter to only anonymize IP addresses allocated for public networks. Matched IP addresses are then replaced with one of the following randomly generated IP addresses, which at the time of dataset creation were not responding to ping requests: 22.214.171.124, 126.96.36.199, 188.8.131.52, 184.108.40.206, 220.127.116.11, and 18.104.22.168. We decided against applying regex patterns for phone numbers due to the high false positive rate.

Despite our efforts, given that 🍷 FineWeb is sourced from the internet at large, it is very likely that some personable identifiable information (PII) will be present. If you find your own PII in 🍷 FineWeb and would like it removed, please fill out our PII removal form.

Considerations for Using the Data

Social Impact of Dataset

With the release of this dataset we aim to make model training more accessible to the machine learning community at large.

While multiple open-weights models with strong performance have been publicly released in the past, more often than not these releases are not accompanied by the corresponding training dataset. This is unfortunate as the dataset specificities and characteristics have been demonstrated to have a very large impact and role in the performances of the models. As the creation of a high quality training dataset is a fundamental requirement to training an LLM capable of excelling at downstream tasks, with 🍷 FineWeb we (a) not only make the dataset creation process more transparent, by sharing our entire processing setup including the codebase used, we also (b) help alleviate the costs of dataset curation, both in time and in compute, for model creators by publicly releasing our dataset with the community.

Discussion of Biases

Efforts were made to minimize the amount of NSFW and toxic content present in the dataset by employing filtering on the URL level. However, there are still a significant number of documents present in the final dataset that could be considered toxic or contain harmful content. As 🍷 FineWeb was sourced from the web as a whole, any harmful biases typically present in it may be reproduced on our dataset.

We deliberately avoided using machine learning filtering methods that define text quality based on the similarity to a “gold” source such as wikipedia or toxicity classifiers as these methods have been known to disproportionately remove content in specific dialects and overclassify as toxic text related to specific social identities, respectively.

Other Known Limitations

As a consequence of some of the filtering steps applied, it is likely that code content is not prevalent in our dataset. If you are training a model that should also perform code tasks, we recommend you use 🍷 FineWeb with a code dataset, such as The Stack v2. You should also probably consider complementing 🍷 FineWeb with specialized curated sources (such as Wikipedia, for example) as they will likely have better formatting than the wikipedia content included in 🍷 FineWeb (we did not tailor the processing to individual websites).

Additional Information

Licensing Information

The dataset is released under the Open Data Commons Attribution License (ODC-By) v1.0 license. The use of this dataset is also subject to CommonCrawl's Terms of Use.

Future work

We plan to not only continue but also expand our efforts to create open-source high quality training datasets and to improve 🍷 FineWeb itself in future iterations.

Citation Information

Paper on arXiv

@inproceedings{
  penedo2024the,
  title={The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scale},
  author={Guilherme Penedo and Hynek Kydl{\'\i}{\v{c}}ek and Loubna Ben allal and Anton Lozhkov and Margaret Mitchell and Colin Raffel and Leandro Von Werra and Thomas Wolf},
  booktitle={The Thirty-eight Conference on Neural Information Processing Systems Datasets and Benchmarks Track},
  year={2024},
  url={https://openreview.net/forum?id=n6SCkn2QaG}
}

Contributors

guipenedo

1 commits