victormiller commited on
Commit
3d1994e
1 Parent(s): e5180e3

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +17 -87
main.py CHANGED
@@ -81,7 +81,7 @@ def main():
81
  return Div(
82
  D_title(
83
  H1(
84
- "TxT360: the most comprehensive, highest quality, and production ready pretraining dataset",
85
  cls="l-body",
86
  style="text-align: center;",
87
  ),
@@ -130,14 +130,6 @@ def main():
130
  hx_target="#inner-text",
131
  )
132
  ),
133
- Li(
134
- A(
135
- "Introducing Global Deduplication",
136
- href="/intro#section4",
137
- hx_get="/intro#section4",
138
- hx_target="#inner-text",
139
- )
140
- ),
141
  ),
142
  ),
143
  Div(
@@ -464,16 +456,16 @@ def intro():
464
  Section(
465
  H2("About TxT360"),
466
  P(
467
- "We introduce Trillion eXtracted Text (TxT360): the highest quality, most comprehensive, and production ready pretraining dataset released to date, an open source pre training textual dataset with the widest coverage to date, including all 99 Common Crawl snapshots released to date and 14 widely used curated sources such as Wikipedia, StackExchange, and ArXiv."
468
  ),
469
  P(
470
- "Building on top of the prior study on pre-training data, (cite C4, chinchilla, fineweb, refinedweb, 2305.16264, ) TxT360 carefully implements data processing steps such as extraction, filtering, deduplication, PII removal and so on. Notably, we design a schema to provide users with full control on the weights of each data point, instead of relying on unknown distribution from the raw dataset. Specifically, we strive to make each data point appear only once, via global deduplication across the whole corpus. Importantly, we store enough metadata to recover the raw distribution, and additionally allow one to have fine-grained control to create data distributions and corpus of desired size. As an example, we present one simple upsampling scheme that takes into account the duplication counts, resulting in a 15~16 trillion token corpus, outperforming FineWeb and our non-upsampling baselines, on diverse evaluations. Unlike DCLM and RedPajama V2, we present the final deduplicated dataset that is ready to go."
471
  ),
472
  P(
473
- "We have carefully implemented a large set of filters by carefully reviewing the input, output from data samples and tailored design for each data source. We learned from and compared our implementation with prior data pipelines, such as Chinchilla, C4, DataTrove, Dolma, and RedPajama Data V2 to make carefully considered decisions."
474
  ),
475
  P(
476
- "In light of the 360 open source spirit, we will open source the code and document all the implementation details in this blog post, along with the examples and why each decision is made, hoping to shed some light on this important but tedious step."
477
  ),
478
  id="section1",
479
  ),
@@ -482,26 +474,13 @@ def intro():
482
  H3(
483
  "TxT360 is the first dataset to combine both web and curated data sources commonly used in pretraining."
484
  ),
485
- P(
486
- "The quality and size of a pre-training dataset play a crucial role in the performance of large language models (LLMs). Data is often referred as low quality if it has not been filtered to review unwanted text. The community has introduced a variety of filtered datasets including purely web-based datasets."
487
- ),
488
- P(
489
- "In pretraining, it is common to combine web data and curated sources (cite). Web data is included to provide a vast quantity of long tail and diverse data, while curated datasets are often information rich and provide the 'deep-dive' domain information. Both datasets play critical for effective LLM pre-training."
490
- ),
491
- H4("The Gap TxT360 Fills"),
492
- P(
493
- "Despite advancements in filtering and source material for both data types, each type of dataset has its limitations. RefinedWeb is known for its high quality content but and only about 10% of the entire dataset has been disclosed and the processing scripts have not been released. For datasets that have combined curated sources with web data, the web component is relatively small (NEED TO UPDATE - citation needed)."
494
- ),
495
- P(
496
- "By integrating the extensive reach of web data with the exceptional quality of curated sources, TxT360 meets and surpasess the rigorous standards required for state-of-the-art LLM pre-training as demostated in the Results section."
497
- ),
498
- P(
499
- "Table 1: The following table shows TxT360 and other well-known datasets on the coverage and size of data sources."
500
- ),
501
  table_div_1,
502
  table_div_2,
503
- P("Table 2: Basic TxT360 Statistics."),
504
- table_div_data,
 
 
 
505
  id="section2",
506
  ),
507
  Section(
@@ -510,69 +489,20 @@ def intro():
510
  "To produce TxT360, a comprehensive and transparent data processing pipeline was designed to account for the nuances of both web and curated datasets. The pipeline presents a unified framework for processing both data types, making it convenient and easily adaptive for users to revise and fine-tune the pipeline for their own use cases."
511
  ),
512
  P(
513
- "Web datasets are inherently noisy and varied. Thus, the pipeline includes sophisticated filtering and deduplication techniques to clean the data and remove redundancies or irrelevant information."
514
- ),
515
- P(
516
- "Curated datasets are typically already structured and consistently formatted. TxT360 filters these sources with selective steps to maintain their integrity while providing seamless integration into the larger dataset."
517
  ),
518
  P(
519
- "We will open-source the scripts for the whole pipeline, allowing the community to review, replicate, and build upon our processes."
520
  ),
521
- Img(src="images/pipeline.png", height="300", width="600"),
522
  P(
523
- "Figure 1: Data processing pipeline. All the steps are adopted for processing web data while the yellow blocks are adopted for processing curated sources."
524
  ),
 
 
 
 
525
  id="section3",
526
  ),
527
- Section(
528
- H2("Introducing Global Deduplication"),
529
- P(
530
- "Deduplication is crucial in language model pre-training for several reasons (NEEDS CITATION). Main hypothesis on why deduplicaiton is necessary and help include:"
531
- ),
532
- Ul(
533
- Li(
534
- "reducing data volume reduces training time (and cost)",
535
- style="margin-bottom: 5px",
536
- ),
537
- Li(
538
- "removing duplicataive data can lead to better accuracy",
539
- style="margin-bottom: 5px",
540
- ),
541
- Li("prevent train-test overlap", style="margin-bottom: 5px"),
542
- Li(
543
- "minimizes the risk of memorization leading to test loss",
544
- style="margin-bottom: 5px",
545
- ),
546
- ),
547
- P(
548
- "Furthermore, by controlling the pretraining data distribution through deduplication and selective upsampling avoida relying on the often inconsistent distribution of internet-sourced data."
549
- ),
550
- H3("Highlights of the TxT360 Deduplication Process"),
551
- P(
552
- "Our deduplication process began with 61.8 TB of 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."
553
- ),
554
- P(
555
- "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."
556
- ),
557
- P(
558
- "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:"
559
- ),
560
- Ul(
561
- Li(
562
- "Smaller components tend to have more overlap in their MinHash bands. The smallest components, which are essentially pairs, consist of exact duplicate documents that local exact deduplication missed."
563
- ),
564
- Li(
565
- "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."
566
- ),
567
- Li(
568
- "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."
569
- ),
570
- ),
571
- P(
572
- "All Deduplication details can be found in the Global Data Processing Steps section."
573
- ),
574
- id="section4",
575
- ),
576
  id="inner-text",
577
  )
578
 
 
81
  return Div(
82
  D_title(
83
  H1(
84
+ "TxT360: a globally deduplicated dataset for LLM pretraining",
85
  cls="l-body",
86
  style="text-align: center;",
87
  ),
 
130
  hx_target="#inner-text",
131
  )
132
  ),
 
 
 
 
 
 
 
 
133
  ),
134
  ),
135
  Div(
 
456
  Section(
457
  H2("About TxT360"),
458
  P(
459
+ "We introduce TxT360 (Trillion eXtracted Text) the first dataset to globally deduplicate 99 CommonCrawl snapshots and 14 commonly used non-web data sources (e.g. FreeLaw, PG-19, etc.) providing pretraining teams with a recipe to easily adjust data weighting and train the most performant models."
460
  ),
461
  P(
462
+ "Building on top of the prior studies on pre-training data, TxT360 carefully implements data processing steps including extraction, filtering, deduplication, personally identifiable information removal, and other steps."
463
  ),
464
  P(
465
+ "Metadata is stored to recover the raw distribution for each dataset, enabling fine-grained control to create data distributions and corpus of desired size. As an example, we present one simple upsampling scheme that takes into account the duplication counts, resulting in a 15~16 trillion token corpus, outperforming FineWeb and our non-upsampling baselines, on diverse evaluations. Unlike DCLM and RedPajama V2, we present the final deduplicated dataset that is ready to go."
466
  ),
467
  P(
468
+ "We documented all implementation details in this blog post and are open sourcing the code. Examples of each filter and rationale supporting each decision are included."
469
  ),
470
  id="section1",
471
  ),
 
474
  H3(
475
  "TxT360 is the first dataset to combine both web and curated data sources commonly used in pretraining."
476
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
477
  table_div_1,
478
  table_div_2,
479
+ P(
480
+ "In pretraining, it is common to combine web data and curated sources (cite). Web data is included to provide a vast quantity of long tail and diverse data, while curated datasets are often information rich and provide the 'deep-dive' domain information. Combining both datasets plays a critical role for effective LLM pre-training. By integrating the reach of web data with the quality of curated sources, TxT360 meets and surpasses the rigorous standards required for state-of-the-art LLM pre-training. See Results section below."
481
+ ),
482
+ #P("Table 2: Basic TxT360 Statistics."),
483
+ #table_div_data,
484
  id="section2",
485
  ),
486
  Section(
 
489
  "To produce TxT360, a comprehensive and transparent data processing pipeline was designed to account for the nuances of both web and curated datasets. The pipeline presents a unified framework for processing both data types, making it convenient and easily adaptive for users to revise and fine-tune the pipeline for their own use cases."
490
  ),
491
  P(
492
+ "Web datasets are inherently noisy and varied. The TxT360 pipeline implements sophisticated filtering and deduplication techniques to clean and remove redundancies while preserving data integrity."
 
 
 
493
  ),
494
  P(
495
+ "Curated datasets are typically structured and consistently formatted. TxT360 filters these sources with selective steps to maintain their integrity while providing seamless integration into the larger dataset. Both data source types are globally deduplicated together resulting in 5.7T tokens of high-quality data."
496
  ),
 
497
  P(
498
+ "We provide details and context for the choices behind TxT360 in the respective Web Data Processing and Curated Source Processing section. A deep dive in the deduplication [here]. "
499
  ),
500
+ #Img(src="images/pipeline.png", height="300", width="600"),
501
+ #P(
502
+ # "Figure 1: Data processing pipeline. All the steps are adopted for processing web data while the yellow blocks are adopted for processing curated sources."
503
+ #),
504
  id="section3",
505
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
506
  id="inner-text",
507
  )
508