Dive into Deep Learning · §20
Data for Language Models
extraction · quality filters · deduplication · mixtures · synthetic data · tokenizers
The problem
A quarter of one Common Crawl archive file, through the first three sections:
| stage | documents left | section |
|---|---|---|
| HTML responses with extracted text | 9,286 | Document Extraction |
| English, language score at least 0.65 | 3,288 | Document Extraction |
| after the heuristic rules | 1,032 | Quality Filtering |
| after exact and near-duplicate removal | 1,014 | Deduplication |
Every row is a decision made before the first batch. A manifest records each one, and the section that makes it measures what it removes.
Goals
Running example: 256 MiB of one Common Crawl file beside FineWeb’s text for the same records; then FineWeb-Edu as released.
Idea: record every decision in a manifest and measure its effect: on the documents for extraction, filters and deduplication; on small trained models for mixtures and rewritten text.
Chapter map
| step | section | question |
|---|---|---|
| choose documents | Document Extraction from Web Crawls | what does extraction lose, and on which pages? |
| Quality Filtering | what does a filter remove, and whose pages? | |
| Deduplication and Decontamination | how are near-copies found without comparing every pair? | |
| weigh them | Data Mixtures | can small runs choose the domain weights of a large one? |
| Synthetic and Rephrased Data | when does text written by a model help? | |
| cut into tokens | Tokenizers at Scale | what does one vocabulary cost each language? |