Add dataset card documenting the 2021 cleaning pipeline

#1
Files changed (1) hide show
  1. README.md +103 -0
README.md ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: odc-by
5
+ task_categories:
6
+ - text-generation
7
+ tags:
8
+ - fineweb-edu
9
+ - common-crawl
10
+ - parquet
11
+ pretty_name: FineWeb-Edu 2021 — Cleaned and Shuffled
12
+ ---
13
+
14
+ # FineWeb-Edu 2021 — Cleaned and Shuffled
15
+
16
+ This dataset is a year-specific, cleaned, shuffled, and sharded release derived from [HuggingFaceFW/fineweb-edu](https://huggingface.co/datasets/HuggingFaceFW/fineweb-edu). It contains English educational web text collected in Common Crawl snapshots whose `dump` identifier belongs to 2021.
17
+
18
+ **This is not a news-only dataset.** The year refers to the Common Crawl capture year, not necessarily the page's publication year.
19
+
20
+ ## Dataset summary
21
+
22
+ | Item | Value |
23
+ |---|---:|
24
+ | Year | 2021 |
25
+ | Rows | 139,636,993 |
26
+ | Tokens | 146,046,006,446 |
27
+ | Parquet shards | 191 |
28
+ | Compressed Parquet size | 285.58 GB |
29
+ | Target shard size | approximately 1.5 GB |
30
+ | Upstream source shards processed | 180 |
31
+ | Shuffle seed | 2063 |
32
+
33
+ The repository also contains `manifest.json`, which records the byte size, row count, and token total for every output shard.
34
+
35
+ ## Schema
36
+
37
+ Each Parquet file has exactly four columns in this order:
38
+
39
+ | Column | Type | Description |
40
+ |---|---|---|
41
+ | `source` | string | Original page URL from the upstream FineWeb-Edu `url` field. This is the provenance recorded for the text. |
42
+ | `date` | int16 | Common Crawl capture year (`2021`). This is not a verified publication date. |
43
+ | `text` | string | Original text from FineWeb-Edu, preserved without rewriting or truncation. |
44
+ | `token_count` | int64 | Token count supplied by the upstream FineWeb-Edu row; it was preserved rather than recomputed. |
45
+
46
+ ## Cleaning and preparation
47
+
48
+ The release was produced from the upstream dataset at the fixed revision:
49
+
50
+ ```text
51
+ 87f09149ef4734204d70ed1d046ddc9ca3f2b8f9
52
+ ```
53
+
54
+ The processing pipeline performed the following steps:
55
+
56
+ 1. Selected the complete list of upstream Parquet shards assigned to 2021 and shuffled their processing order using a fixed seed.
57
+ 2. Streamed the columns `url`, `dump`, `text`, and `token_count` from each source shard.
58
+ 3. Rejected a row only when:
59
+ - `text` was missing, was not a string, or contained only whitespace;
60
+ - `dump` did not begin with `CC-MAIN-2021-`; or
61
+ - `token_count` was not a positive integer.
62
+ 4. Renamed `url` to `source`, set `date` to `2021`, and retained `text` and `token_count` unchanged.
63
+ 5. Shuffled rows within processing batches with deterministic seeds.
64
+ 6. Assigned every cleaned row to a deterministic random bucket using a hash of `source`, `date`, `text`, `token_count`, and the annual seed `2063`.
65
+ 7. Wrote the buckets as Zstandard-compressed Parquet files targeting approximately 1.5 GB per shard.
66
+
67
+ No additional deduplication, news classification, text normalization, language filtering, or quality threshold was added beyond the upstream FineWeb-Edu processing and the validation rules above. No token cap or sampling limit was applied.
68
+
69
+ ## Verification
70
+
71
+ Before publication, the pipeline:
72
+
73
+ - checked the four-column Arrow schema of every output shard;
74
+ - reopened every completed shard and verified its row count;
75
+ - recomputed the sum of `token_count` for each shard;
76
+ - verified that final row and token totals matched the cleaned intermediate data; and
77
+ - published the final folder only after all shards passed validation.
78
+
79
+ The deterministic bucket assignment makes the partitioning reproducible for the same cleaned input, software behavior, and seed. Row order inside a bucket should not be treated as a stable identifier.
80
+
81
+ ## Loading the data
82
+
83
+ Because the dataset is large, streaming is recommended:
84
+
85
+ ```python
86
+ from datasets import load_dataset
87
+
88
+ dataset = load_dataset(
89
+ "DataHound26/FineWeb-2021",
90
+ split="train",
91
+ streaming=True,
92
+ )
93
+
94
+ first_row = next(iter(dataset))
95
+ print(first_row.keys())
96
+ # dict_keys(['source', 'date', 'text', 'token_count'])
97
+ ```
98
+
99
+ ## Source, license, and content notice
100
+
101
+ The text originates from web pages collected by Common Crawl and included in [FineWeb-Edu](https://huggingface.co/datasets/HuggingFaceFW/fineweb-edu). The `source` column provides the original URL recorded by FineWeb-Edu. This release follows the upstream `odc-by` dataset license. Underlying web content may remain subject to rights held by its original authors or publishers. Users are responsible for evaluating content, privacy, copyright, and suitability for their intended use.
102
+
103
+ For details about the upstream dataset's construction and educational-quality filtering, consult the [FineWeb-Edu dataset card](https://huggingface.co/datasets/HuggingFaceFW/fineweb-edu).