Datasets:

Modalities:
Tabular
Text
Formats:
parquet
Languages:
English
ArXiv:
Libraries:
Datasets
Dask
License:
josh-sematic's picture
Update README.md
fa09fb4 verified
|
raw
history blame
18 kB
metadata
language:
  - en
license: odc-by
dataset_info:
  - config_name: CC-MAIN-2013-20
    features:
      - name: text
        dtype: string
      - name: id
        dtype: string
      - name: dump
        dtype: string
      - name: url
        dtype: string
      - name: file_path
        dtype: string
      - name: language
        dtype: string
      - name: language_score
        dtype: float64
      - name: token_count
        dtype: int64
      - name: score
        dtype: float64
      - name: int_score
        dtype: int64
      - name: embedding
        sequence: float32
      - name: count
        dtype: int64
    splits:
      - name: train
        num_bytes: 71683996286
        num_examples: 10800000
    download_size: 55571546426
    dataset_size: 71683996286
  - config_name: CC-MAIN-2013-48
    features:
      - name: text
        dtype: string
      - name: id
        dtype: string
      - name: dump
        dtype: string
      - name: url
        dtype: string
      - name: file_path
        dtype: string
      - name: language
        dtype: string
      - name: language_score
        dtype: float64
      - name: token_count
        dtype: int64
      - name: score
        dtype: float64
      - name: int_score
        dtype: int64
      - name: embedding
        sequence: float32
      - name: count
        dtype: int64
    splits:
      - name: train
        num_bytes: 38878994623
        num_examples: 5800000
    download_size: 30087644388
    dataset_size: 38878994623
  - config_name: CC-MAIN-2014-10
    features:
      - name: text
        dtype: string
      - name: id
        dtype: string
      - name: dump
        dtype: string
      - name: url
        dtype: string
      - name: file_path
        dtype: string
      - name: language
        dtype: string
      - name: language_score
        dtype: float64
      - name: token_count
        dtype: int64
      - name: score
        dtype: float64
      - name: int_score
        dtype: int64
      - name: embedding
        sequence: float32
      - name: count
        dtype: int64
    splits:
      - name: train
        num_bytes: 24971658588
        num_examples: 3550000
    download_size: 19058832929
    dataset_size: 24971658588
  - config_name: CC-MAIN-2014-15
    features:
      - name: text
        dtype: string
      - name: id
        dtype: string
      - name: dump
        dtype: string
      - name: url
        dtype: string
      - name: file_path
        dtype: string
      - name: language
        dtype: string
      - name: language_score
        dtype: float64
      - name: token_count
        dtype: int64
      - name: score
        dtype: float64
      - name: int_score
        dtype: int64
      - name: embedding
        sequence: float32
      - name: count
        dtype: int64
    splits:
      - name: train
        num_bytes: 13615746365
        num_examples: 1850000
    download_size: 10299687552
    dataset_size: 13615746365
  - config_name: CC-MAIN-2014-23
    features:
      - name: text
        dtype: string
      - name: id
        dtype: string
      - name: dump
        dtype: string
      - name: url
        dtype: string
      - name: file_path
        dtype: string
      - name: language
        dtype: string
      - name: language_score
        dtype: float64
      - name: token_count
        dtype: int64
      - name: score
        dtype: float64
      - name: int_score
        dtype: int64
      - name: embedding
        sequence: float32
      - name: count
        dtype: int64
    splits:
      - name: train
        num_bytes: 21798450754
        num_examples: 3100000
    download_size: 16663899441
    dataset_size: 21798450754
  - config_name: CC-MAIN-2014-35
    features:
      - name: text
        dtype: string
      - name: id
        dtype: string
      - name: dump
        dtype: string
      - name: url
        dtype: string
      - name: file_path
        dtype: string
      - name: language
        dtype: string
      - name: language_score
        dtype: float64
      - name: token_count
        dtype: int64
      - name: score
        dtype: float64
      - name: int_score
        dtype: int64
      - name: embedding
        sequence: float32
      - name: count
        dtype: int64
    splits:
      - name: train
        num_bytes: 10954201796
        num_examples: 1500000
    download_size: 8309419357
    dataset_size: 10954201796
  - config_name: CC-MAIN-2014-41
    features:
      - name: text
        dtype: string
      - name: id
        dtype: string
      - name: dump
        dtype: string
      - name: url
        dtype: string
      - name: file_path
        dtype: string
      - name: language
        dtype: string
      - name: language_score
        dtype: float64
      - name: token_count
        dtype: int64
      - name: score
        dtype: float64
      - name: int_score
        dtype: int64
      - name: embedding
        sequence: float32
      - name: count
        dtype: int64
    splits:
      - name: train
        num_bytes: 11392615401
        num_examples: 1600000
    download_size: 8694382261
    dataset_size: 11392615401
  - config_name: CC-MAIN-2014-42
    features:
      - name: text
        dtype: string
      - name: id
        dtype: string
      - name: dump
        dtype: string
      - name: url
        dtype: string
      - name: file_path
        dtype: string
      - name: language
        dtype: string
      - name: language_score
        dtype: float64
      - name: token_count
        dtype: int64
      - name: score
        dtype: float64
      - name: int_score
        dtype: int64
      - name: embedding
        sequence: float32
      - name: count
        dtype: int64
    splits:
      - name: train
        num_bytes: 8491740156
        num_examples: 1150000
    download_size: 6430841610
    dataset_size: 8491740156
  - config_name: CC-MAIN-2014-49
    features:
      - name: text
        dtype: string
      - name: id
        dtype: string
      - name: dump
        dtype: string
      - name: url
        dtype: string
      - name: file_path
        dtype: string
      - name: language
        dtype: string
      - name: language_score
        dtype: float64
      - name: token_count
        dtype: int64
      - name: score
        dtype: float64
      - name: int_score
        dtype: int64
      - name: embedding
        sequence: float32
      - name: count
        dtype: int64
    splits:
      - name: train
        num_bytes: 7754099049
        num_examples: 1050000
    download_size: 5866979308
    dataset_size: 7754099049
  - config_name: CC-MAIN-2014-52
    features:
      - name: text
        dtype: string
      - name: id
        dtype: string
      - name: dump
        dtype: string
      - name: url
        dtype: string
      - name: file_path
        dtype: string
      - name: language
        dtype: string
      - name: language_score
        dtype: float64
      - name: token_count
        dtype: int64
      - name: score
        dtype: float64
      - name: int_score
        dtype: int64
      - name: embedding
        sequence: float32
      - name: count
        dtype: int64
    splits:
      - name: train
        num_bytes: 9953666568
        num_examples: 1350000
    download_size: 7521103037
    dataset_size: 9953666568
  - config_name: CC-MAIN-2015-06
    features:
      - name: text
        dtype: string
      - name: id
        dtype: string
      - name: dump
        dtype: string
      - name: url
        dtype: string
      - name: file_path
        dtype: string
      - name: language
        dtype: string
      - name: language_score
        dtype: float64
      - name: token_count
        dtype: int64
      - name: score
        dtype: float64
      - name: int_score
        dtype: int64
      - name: embedding
        sequence: float32
      - name: count
        dtype: int64
    splits:
      - name: train
        num_bytes: 8988649992
        num_examples: 1200000
    download_size: 6771650647
    dataset_size: 8988649992
configs:
  - config_name: CC-MAIN-2013-20
    data_files:
      - split: train
        path: data/CC-MAIN-2013-20/train-*
  - config_name: CC-MAIN-2013-48
    data_files:
      - split: train
        path: data/CC-MAIN-2013-48/train-*
  - config_name: CC-MAIN-2014-10
    data_files:
      - split: train
        path: data/CC-MAIN-2014-10/train-*
  - config_name: CC-MAIN-2014-15
    data_files:
      - split: train
        path: data/CC-MAIN-2014-15/train-*
  - config_name: CC-MAIN-2014-23
    data_files:
      - split: train
        path: data/CC-MAIN-2014-23/train-*
  - config_name: CC-MAIN-2014-35
    data_files:
      - split: train
        path: data/CC-MAIN-2014-35/train-*
  - config_name: CC-MAIN-2014-41
    data_files:
      - split: train
        path: data/CC-MAIN-2014-41/train-*
  - config_name: CC-MAIN-2014-42
    data_files:
      - split: train
        path: data/CC-MAIN-2014-42/train-*
  - config_name: CC-MAIN-2014-49
    data_files:
      - split: train
        path: data/CC-MAIN-2014-49/train-*
  - config_name: CC-MAIN-2014-52
    data_files:
      - split: train
        path: data/CC-MAIN-2014-52/train-*
  - config_name: CC-MAIN-2015-06
    data_files:
      - split: train
        path: data/CC-MAIN-2015-06/train-*

Fineweb-Edu-Fortified !WORK IN PROGRESS!

The composition of fineweb-edu-fortified, produced by automatically clustering a 500k row sample in Airtrain

What is it?

Fineweb-Edu-Fortified is a dataset derived from Fineweb-Edu by applying exact-match deduplication across the whole dataset and producing an embedding for each row. The number of times the text from each row appears is also included as a count column. The embeddings were produced using TaylorAI/bge-micro

Fineweb and Fineweb-Edu were obtained by processing data from 95 crawls of Common Crawl, covering a time period from 2013 to 2024. More information about the original datasets can be found by consulting:

The contents of a randomly selected 500k rows from this dataset can be interactively explored in this Airtrain dashboard.

Deduplication

Deduplication in original Fineweb and Fineweb-Edu

During creation of the original Fineweb dataset, a variety of deduplication strategies were explored. The evaluation criteria used to assess deduplication strategies was to train ablation models on randomly selected subsets of the data, using a subset of up to ~350 billion tokens.

Using this mechanism, the Fineweb authors selected a MinHash algorithm, using parameters considering documents with approximately 75% similarity or higher to be duplicates. This deduplication was performed within each Common Crawl crawl. For example, it would have removed all approximate duplicates from the 20th crawl from 2013, but would have retained an identical record that showed up in both the 2013-20 crawl and the 2013-48 crawl. The authors note that applying the deduplication across crawls reduced the evaluation performance of the ablation models used for assessment. The proposed reason for this performance degredation is that data duplicated across crawls is more likely to be high-quality compared to data that is not, so leaving in the duplicates effectively upsamples the higer-quality data.

Following deduplication in Fineweb, Fineweb-Edu was extracted using a model-based quality classifier targeting educational content. It thus inherited the same inter-crawl deduplication strategy of Fineweb.

Deduplication in this dataset

Motivation

Given the findings that cross-crawl deduplication reduced ablation model performance, one might ask what the motivation is for producing a dataset that uses it. Our motivation was threefold:

  • Reduce the number of rows that needed to be embedded by avoiding embedding of exact-match content
  • Enable easier filtering of the dataset for subsets-of-interest
  • Provide a version of the dataset for users whose training goals include avoiding training on non-unique tokens.

For use cases that would benefit from "re-hydrating" or filtering the rows based on how frequently the text appeared in the original dataset, the new count column retains the number of appearances of the associated text.

Procedure

The overall procedure was to remove exact matches that appeared in multiple crawls (also referred to as "dumps"). This was achieved by performing an md5 hash on the text column and removing rows with duplicate hashes. To make this tractable at scale, we first grouped all rows by the first two hex digits of their hashes, then looked for exact hash matches within each of the resulting 256 buckets of data. Note that unlike the intra-crawl deduplication, we only eliminated exact matches across crawls. For duplicated rows, a strong preference was given to keep the metadata (ex: dump, url) from the oldest crawl where the text appeared. Following deduplication and embedding, the data were grouped by the "dump" column, mirroring the organization of the original Fineweb-Edu dataset.

Deduplication stats

Deduplication removed approximately 74.7% of rows from the original dataset (from 1.279 billion in Fineweb-Edu to 0.324 billion rows in Fineweb-Edu-Fortified). This indicates that a substantial amount of data in Fineweb-Edu is present across multiple crawls.

The total token count in the deduplicated dataset is approximately 375 billion, compared to the 1,320 billion tokens in Fineweb-Edu.

A histogram of the `count` column. Histogram was generated using a 500k row sample after performing global per-row text duplication counting.

Embeddings

To support use cases with Fineweb-Edu such as classification, clustering, semantic search, etc., we have produced an embedding vector for each row in the dataset. The embedding model TaylorAI/bge-micro was selected for its tradeoff of strong performance on MTEB benchmarks relative to its size (17 million parameters). The model's embedding space has 384 dimensions. The context-window of the model is 512 tokens (roughly several paragraphs of text); each row is embedded by using the first 512 tokens in its text field. Producing the embeddings took approximately 412 GPU-hours on Nvidia T4 GPUs.

Using via datasets

from datasets import load_dataset
fw = load_dataset("airtrain-ai/fineweb-edu-fortified", name="CC-MAIN-2024-10", split="train", streaming=True)

Considerations for Using the Data

This "Considerations" section is copied from the parent dataset: FineWeb-edu.

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

Acknowledgements

Airtrain would like to thank the Fineweb/Fineweb-Edu team at Hugging Face for producing the original datasets, as well as for their support during work on Fineweb-Edu-Fortified.

We'd also like to thank @underspirit for pointing out the amount of reduction in dataset size that could be achieved via deduplication.

We owe gratitude to TaylorAI for the bge-micro embedding model.

Finally, thank you to the Hugging Face community for fostering a thriving ecosystem of models, datasets, and tools to support open-source AI.

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.