← All questions
Training & Fine-tuningMedium· Data Pipelines· Pre-training Data· Deduplication· Tokenization

Where does the training data for a large language model...

A comprehensive understanding of pre-training data pipelines requires moving beyond generic answers like ‘Wikipedia and web scrapes.’ Training data construction proceeds in structured stages: crawling raw web content, extracting main text content, filtering out noise and deduplicating at scale, and finally tokenizing the cleaned corpus into sequence formats.

Quantitatively, raw data drops drastically during processing—for instance, shrinking from a 20 TB raw snapshot down to approximately 750 GB of refined text. Understanding the specific composition of open datasets like C4 reveals that major technical and specialized domains (e.g., patents.google.com) frequently represent significant portions of the final pre-training mix.

Code playground (Python)