Home › Tracks › Applied ML & Model Engineering › Pre-Training Data, Synthetic Mid-Training & Scaling Laws
Week 4 concept
Pre-Training Data, Synthetic Mid-Training & Scaling Laws
Curate high-quality web-scale corpora, design synthetic data generation pipelines, and execute mid-training capability injection for tool reasoning and structured outputs.
Bridges to Databases — data cleaning, deduplication, and ETL pipelinesBuilds on: Transformers, Attention & Pretraining
Study notes
Master this concept.
Pre-Training Data, Synthetic Mid-Training & Scaling Laws
What it is
This concept focuses on the lifecycle of a model's knowledge. It begins with pre-training on massive, diverse datasets to build general intelligence. It then moves to "mid-training," where targeted synthetic data is used to inject specific capabilities, like logical reasoning or precise formatting, that the model didn't fully acquire from the raw web. Scaling laws provide the mathematical framework to predict how much data and compute are needed to reach a specific performance level.
Why it matters
Raw web data is noisy and often lacks the step-by-step reasoning required for complex tasks. If you rely solely on pre-training, the model may be broad but shallow. By using synthetic mid-training, engineers can "teach" the model how to use tools or output structured JSON without needing millions of human-written examples. Scaling laws prevent wasted resources by helping teams decide whether to increase the model size or the dataset size to solve a performance bottleneck.
Core concepts to master
- Data Curation: The process of filtering, deduplicating, and weighting web-scale corpora to maximize signal and minimize noise.
- Synthetic Data Pipelines: Using a stronger "teacher" model to generate high-quality, diverse examples to train a "student" model.
- Capability Injection: The strategic use of mid-training to shift a model from general text prediction to specific functional skills (e.g., tool-use).
- Compute-Optimal Scaling: Understanding the relationship between parameter count, dataset size, and training FLOPs to optimize efficiency.
Common mistakes
- Over-reliance on raw volume: Assuming that more data always equals better performance, regardless of data quality.
- Synthetic Collapse: Training a model on too much of its own generated data without filtering, which can lead to degraded intelligence and repetitive patterns.
- Ignoring Scaling Laws: Attempting to scale model parameters without proportionally increasing the training tokens, leading to under-trained models.
Connection to the track
This stage serves as the foundation for the entire pipeline. High-quality pre-training and mid-training reduce the burden on the subsequent RLHF (Reinforcement Learning from Human Feedback) stage. If the model has already mastered structured reasoning through synthetic mid-training, the final alignment process becomes a matter of refinement rather than basic skill acquisition.
Go to the source
Read, watch, and practice.
Free, world-class material chosen for this concept.
- Article Scaling Laws, Carefully Lilian Weng — Lil'Log Free (opens in a new tab)
- Article The FineWeb Datasets: decanting the web for the finest text data Hugging Face Free (opens in a new tab)
- Guide Hugging Face — Datasets documentation and processing Hugging Face Free (opens in a new tab)
- Paper Scaling LLM Test-Time Compute Optimally Can Be More Effective than Scaling Model Parameters arXiv (Snell et al.) Free (opens in a new tab)