victormiller commited on
Commit
34d8cdd
·
verified ·
1 Parent(s): b8ffacf

Update curated.py

Browse files
Files changed (1) hide show
  1. curated.py +19 -0
curated.py CHANGED
@@ -309,6 +309,19 @@ def curated(request):
309
  table_div = Div(NotStr(table_html), style="margin: 40px;")
310
  data_preprocessing_div = Div(H3("Data Preprocessing"), text, table_div)
311
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312
  return Div(
313
  Section(
314
  H2("Curated Sources"),
@@ -318,6 +331,12 @@ def curated(request):
318
  plotly2fasthtml(get_chart_28168342()),
319
  data_preparation_div,
320
  data_preprocessing_div,
 
 
 
 
 
 
321
  id="inner-text",
322
  )
323
  )
 
309
  table_div = Div(NotStr(table_html), style="margin: 40px;")
310
  data_preprocessing_div = Div(H3("Data Preprocessing"), text, table_div)
311
 
312
+ dedup_text = P("Deduplication is crucial in language model (LM) pre-training for several reasons. It reduces the volume of training data, leading to shorter training times and potentially better accuracy. It also prevents train-test overlap, improves evaluation metrics, and minimizes the risk of memorization, which can cause test loss to increase during training. By controlling the pretraining data distribution through deduplication and selective upsampling, we avoid relying on the often inconsistent distribution of internet-sourced data.")
313
+ dedup_text1 = P("Our deduplication process began with 61.8 TB of high-quality, filtered, and compressed documents, totaling approximately 48.83 billion documents. We first performed exact deduplication using a Bloom filter, reducing the dataset by 17% to 40.21 billion documents. For global near-deduplication, we scaled methodologies from prior works like SlimPajama to handle the entire dataset, including 87 Common Crawl dumps and other curated data. This involved generating document signatures, matching them to identify near-duplicates, and clustering these to retain only one document per cluster. We prioritized retaining documents from curated sources and more recent CommonCrawl dumps. Throughout the deduplication stages, we extensively used Dask for distributed data processing.")
314
+ 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.")
315
+ 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:")
316
+ dedup_text4 = OL(
317
+ Li("Smaller components tend to have more overlap in their MinHash bands."),
318
+ Li("The smallest components, which are essentially pairs, consist of exact duplicate documents that local exact deduplication missed."),
319
+ Li("When clusters contain three or more documents, incremental changes in the text become apparent. For example, there may be a growing list of personnel over the years."),
320
+ Li("In sizable clusters comprising 1,000 or more documents, we observe a trend towards templatization. This involves the recurrent use of standardized language to convey general topics such as terms and conditions, warnings, and disclaimers. Such language is prevalent on commercial websites, offering a consistent and efficient way to communicate commonly encountered information."),
321
+ )
322
+
323
+
324
+
325
  return Div(
326
  Section(
327
  H2("Curated Sources"),
 
331
  plotly2fasthtml(get_chart_28168342()),
332
  data_preparation_div,
333
  data_preprocessing_div,
334
+ H2("Deduplication")
335
+ dedup_text,
336
+ dedup_text1,
337
+ dedup_text2,
338
+ dedup_text3,
339
+ dedup_text4,
340
  id="inner-text",
341
  )
342
  )