victormiller commited on
Commit
cd41583
·
verified ·
1 Parent(s): c8db332

Update curated.py

Browse files
Files changed (1) hide show
  1. curated.py +104 -5
curated.py CHANGED
@@ -17,7 +17,109 @@ dedup_text1 = P("Our deduplication process began with 61.8 TB of high-quality, f
17
  dedup_text2 = P("After the global near-deduplication of all 87 CommonCrawl dumps and other curated data, we removed around 85% of the total documents. This leaves us with approximately 4.24 trillion deduplicated tokens, which aligns with what FineWeb has reported for their iterative global deduplication. Along with the list of duplicated documents to delete, our deduplication code also saves some metadata about the duplicate clusters that we find. We save statistics about every duplicate cluster we find, with the document ID of the document we retain from the cluster as the key and with a value capturing the distribution of the duplicates within the cluster over the CommonCrawl dumps (identified by the first 2 digits of every document ID). This way, we always have information about the duplicates we have deleted, allowing us to upsample any data distribution we want for training.")
18
  dedup_text3 = P("During deduplication, it is not feasible to store all the duplicate clusters we form, but we do save some samples at every size. Here are some observations we made by examining these sample duplicate clusters:")
19
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
 
 
 
21
 
22
  data_descriptions = pd.DataFrame(
23
  {
@@ -333,11 +435,8 @@ def curated(request):
333
  H3("Data Filtering"),
334
  data_preprocessing_div,
335
  plotly2fasthtml(get_chart_28168342()),
336
- H2("Curated Sources: Deduplication"),
337
- dedup_text,
338
- dedup_text1,
339
- dedup_text2,
340
- dedup_text3,
341
  id="inner-text",
342
  )
343
  )
 
17
  dedup_text2 = P("After the global near-deduplication of all 87 CommonCrawl dumps and other curated data, we removed around 85% of the total documents. This leaves us with approximately 4.24 trillion deduplicated tokens, which aligns with what FineWeb has reported for their iterative global deduplication. Along with the list of duplicated documents to delete, our deduplication code also saves some metadata about the duplicate clusters that we find. We save statistics about every duplicate cluster we find, with the document ID of the document we retain from the cluster as the key and with a value capturing the distribution of the duplicates within the cluster over the CommonCrawl dumps (identified by the first 2 digits of every document ID). This way, we always have information about the duplicates we have deleted, allowing us to upsample any data distribution we want for training.")
18
  dedup_text3 = P("During deduplication, it is not feasible to store all the duplicate clusters we form, but we do save some samples at every size. Here are some observations we made by examining these sample duplicate clusters:")
19
 
20
+ data_pipeline_table = pd.DataFrame(
21
+ {
22
+ "Data Source": [
23
+ "Papers",
24
+ "Wikipedia",
25
+ "StackExchange",
26
+ "Europarl",
27
+ "Ubuntu IRC",
28
+ "HackerNews",
29
+ "PG-19",
30
+ "USPTO",
31
+ "Freelaw",
32
+ "DM Math",
33
+ ],
34
+ "Percent Filtered": [
35
+ "15%",
36
+ "21%",
37
+ "<0.1%",
38
+ "1%",
39
+ "0.4%",
40
+ "60%",
41
+ "0.8%",
42
+ "22.5%",
43
+ "94%",
44
+ "0",
45
+ ],
46
+ "Unique Document Percentage": [
47
+ "75.99%",
48
+ "91.91%",
49
+ "98.02%",
50
+ "98.87%",
51
+ "100%",
52
+ "99.91%",
53
+ "31.81%",
54
+ "99.94%",
55
+ "91.01%",
56
+ "0",
57
+ ],
58
+ "2 - 5 Duplicates": [
59
+ "19.4%",
60
+ "4.7%",
61
+ "1.27%",
62
+ "0.94%",
63
+ "0",
64
+ "0.05%",
65
+ "20.03%",
66
+ "0.05%",
67
+ "6,87%",
68
+ "0",
69
+ ],
70
+ "6 - 10 Duplicates": [
71
+ "2.89%",
72
+ "1.58%",
73
+ "0.35%",
74
+ "0.09%",
75
+ "0",
76
+ "0.02%",
77
+ "24.27%",
78
+ "0.01%",
79
+ "1.07%",
80
+ "0",
81
+ ],
82
+ "11 - 100 Duplicates": [
83
+ "1.17%",
84
+ "1.76%",
85
+ "0.35%",
86
+ "0.1",
87
+ "0",
88
+ "0.02%",
89
+ "22.26%",
90
+ "0.01%",
91
+ "1.05%",
92
+ "0",
93
+ ],
94
+ "101 - 1000 Duplicates": [
95
+ "0.01%",
96
+ "0.05%",
97
+ "0.01%",
98
+ "0",
99
+ "0",
100
+ "<0.01%",
101
+ "1.58%",
102
+ "<0.01%",
103
+ "0.01%",
104
+ "0",
105
+ ],
106
+ "1001+ Duplicates": [
107
+ "<0.01%",
108
+ "<0.01%",
109
+ "<0.01%",
110
+ "0",
111
+ "0",
112
+ "<0.01%",
113
+ "0.06%",
114
+ "0",
115
+ "0",
116
+ "0",
117
+ ],
118
+ }
119
+ )
120
 
121
+ table_html_data_pipe = data_pipeline_table.to_html(index=False, border=0)
122
+ table_div_data_pipe = Div(NotStr(table_html_data_pipe), style="margin: 40px;")
123
 
124
  data_descriptions = pd.DataFrame(
125
  {
 
435
  H3("Data Filtering"),
436
  data_preprocessing_div,
437
  plotly2fasthtml(get_chart_28168342()),
438
+ H2("Local Deduplication"),
439
+ table_div_data_pipe,
 
 
 
440
  id="inner-text",
441
  )
442
  )