Datasets:

Modalities:
Tabular
Text
Formats:
parquet
Languages:
English
ArXiv:
Libraries:
Datasets
Dask
License:
josh-sematic commited on
Commit
dba40b0
1 Parent(s): a45cc05

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +143 -3
README.md CHANGED
@@ -1,3 +1,143 @@
1
- ---
2
- license: odc-by
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: odc-by
3
+ ---
4
+
5
+ # Fineweb-Edu-Fortified !WORK IN PROGRESS!
6
+
7
+ ## What is it?
8
+
9
+ Fineweb-Edu-Fortified is a dataset derived from
10
+ [Fineweb-Edu](https://huggingface.co/datasets/HuggingFaceFW/fineweb-edu) by applying exact-match
11
+ deduplication across the whole dataset and producing an embedding for each row. The number of times
12
+ the text from each row appears is also included as a `count` column. The embeddings were produced
13
+ using [TaylorAI/bge-micro](https://huggingface.co/TaylorAI/bge-micro)
14
+
15
+ Fineweb and Fineweb-Edu were obtained by processing data from 95 crawls of
16
+ [Common Crawl](https://commoncrawl.org/), covering a time period from 2013 to 2024.
17
+ More information about the original datasets can be found by consulting:
18
+
19
+ - [Fineweb-edu dataset card](https://huggingface.co/datasets/HuggingFaceFW/fineweb-edu)
20
+ - [Fineweb dataset card](https://huggingface.co/datasets/HuggingFaceFW/fineweb)
21
+ - [Fineweb release blog post](https://huggingface.co/spaces/HuggingFaceFW/blogpost-fineweb-v1)
22
+ - [Fineweb paper](https://arxiv.org/abs/2406.17557)
23
+
24
+ #### TODO: link to subsample in Airtrain, show screenshots of some charts
25
+
26
+ ## Deduplication
27
+
28
+ ### Deduplication in original Fineweb and Fineweb-Edu
29
+
30
+ During creation of the original Fineweb dataset, a variety of deduplication strategies were
31
+ explored. The evaluation criteria used to assess deduplication strategies was to train ablation models
32
+ on randomly selected subsets of the data, using a subset of up to ~350 billion tokens.
33
+
34
+ Using this mechanism, the Fineweb authors selected a MinHash algorithm, using parameters
35
+ considering documents with approximately 75% similarity or higher to be duplicates. This deduplication was
36
+ performed *within* each Common Crawl crawl. For example, it would have removed all approximate duplicates
37
+ from the 20th crawl from 2013, but would have retained an identical record that showed up
38
+ in both the 2013-20 crawl and the 2013-48 crawl. The authors note that applying the
39
+ deduplication *across crawls* reduced the evaluation performance of the ablation models used
40
+ for assessment. The proposed reason for this performance degredation is that data
41
+ duplicated across crawls is more likely to be high-quality compared to data that is not,
42
+ so leaving in the duplicates effectively upsamples the higer-quality data.
43
+
44
+ Following deduplication in Fineweb, Fineweb-Edu was extracted using a model-based quality classifier
45
+ targeting educational content. It thus inherited the same inter-crawl deduplication strategy of Fineweb.
46
+
47
+ ### Deduplication in this dataset
48
+
49
+ #### Motivation
50
+
51
+ Given the findings that cross-crawl deduplication reduced ablation model performance, one might ask
52
+ what the motivation is for producing a dataset that uses it. Our motivation was threefold:
53
+
54
+ - Reduce the number of rows that needed to be embedded by avoiding embedding of exact-match content
55
+ - Enable easier filtering of the dataset for subsets-of-interest
56
+ - Provide a version of the dataset for users whose training goals include avoiding training on non-unique
57
+ tokens.
58
+
59
+ For use cases that would benefit from "re-hydrating" or filtering the rows based on how frequently
60
+ the text appeared in the original dataset, the new `count` column retains the number of appearances
61
+ of the associated text.
62
+
63
+ #### Procedure
64
+
65
+ The overall procedure was to remove exact matches that appeared in multiple crawls (also referred to
66
+ as "dumps"). This was achieved by performing an md5 hash on the text column and removing rows with
67
+ duplicate hashes. To make this tractable at scale, we first grouped all rows by the first two hex
68
+ digits of their hashes, then looked for exact hash matches within each of the resulting 256
69
+ buckets of data. Note that unlike the intra-crawl deduplication, we only eliminated exact matches
70
+ across crawls. For duplicated rows, a strong preference was given to keep the metadata
71
+ (ex: dump, url) from the oldest crawl where the text appeared. Following deduplication and
72
+ embedding, the data were grouped by the "dump" column, mirroring the organization of the original
73
+ Fineweb-Edu dataset.
74
+
75
+ ### Deduplication stats
76
+
77
+ Deduplication removed approximately 74.7% of rows from the original dataset
78
+ (from 1.279 billion in Fineweb-Edu to 0.324 billion rows in Fineweb-Edu-Fortified).
79
+ This indicates that a substantial amount of data in Fineweb-Edu is present across multiple crawls.
80
+
81
+ The total token count in the deduplicated dataset is approximately 375 billion, compared to the
82
+ 1,320 billion tokens in Fineweb-Edu.
83
+
84
+ ## Embeddings
85
+
86
+ To support use cases with Fineweb-Edu such as classification, clustering, semantic search, etc.,
87
+ we have produced an embedding vector for each row in the dataset. The embedding model
88
+ [TaylorAI/bge-micro](https://huggingface.co/TaylorAI/bge-micro)
89
+ was selected for its tradeoff of strong performance on [MTEB](https://huggingface.co/spaces/mteb/leaderboard)
90
+ benchmarks relative to its size (17 million parameters). The model's embedding space
91
+ has 384 dimensions. The context-window of the model is 512 tokens (roughly several paragraphs of text);
92
+ each row is embedded by using the first 512 tokens in its text field. Producing the embeddings took approximately
93
+ 412 GPU-hours on Nvidia T4 GPUs.
94
+
95
+ ## Using via `datasets`
96
+
97
+ ```python
98
+ from datasets import load_dataset
99
+ fw = load_dataset("airtrain-ai/fineweb-edu-fortified", name="CC-MAIN-2024-10", split="train", streaming=True)
100
+ ```
101
+
102
+ ## Considerations for Using the Data
103
+
104
+ This "Considerations" section is copied from the parent dataset:
105
+ [FineWeb-edu](https://huggingface.co/datasets/HuggingFaceFW/fineweb-edu).
106
+
107
+ ### Social Impact of Dataset
108
+
109
+ With the release of this dataset we aim to make model training more accessible to the machine learning community at large.
110
+
111
+ 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.
112
+
113
+ ### Discussion of Biases
114
+
115
+ 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.
116
+
117
+ 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](https://aclanthology.org/D16-1120/) and [overclassify as toxic text related to specific social identities](https://arxiv.org/pdf/2109.07445.pdf), respectively.
118
+
119
+ ### Other Known Limitations
120
+
121
+ 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](https://huggingface.co/datasets/bigcode/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).
122
+
123
+ ## Additional Information
124
+
125
+ ### Acknowledgements
126
+
127
+ Airtrain would like to thank the Fineweb/Fineweb-Edu team at Hugging Face for producing the original datasets,
128
+ as well as for their support during work on Fineweb-Edu-Fortified.
129
+
130
+ We'd also like to thank [@underspirit](https://huggingface.co/underspirit) for
131
+ [pointing out](https://huggingface.co/datasets/HuggingFaceFW/fineweb-edu/discussions/7)
132
+ the amount of reduction in dataset size that could be achieved via deduplication.
133
+
134
+ We owe gratitude to [TaylorAI](https://huggingface.co/TaylorAI) for the `bge-micro` embedding model.
135
+
136
+ Finally, thank you to the Hugging Face community for fostering a thriving ecosystem of models, datasets, and tools
137
+ to support open-source AI.
138
+
139
+ ### Licensing Information
140
+
141
+ The dataset is released under the **Open Data Commons Attribution License (ODC-By) v1.0** [license](https://opendatacommons.org/licenses/by/1-0/). The use of this dataset is also subject to [CommonCrawl's Terms of Use](https://commoncrawl.org/terms-of-use).
142
+
143
+