// Stage 4 · Transformers & LLMs
Pretraining, Data & Scaling Laws
Pre-training data pipelines, scaling laws, Chinchilla, μP, MTP and training stability.
about 10 hours6 algorithms4 paperslesson text in progress
01Goals
- Understand the power laws linking loss to parameters, data and compute
- Estimate training FLOPs (≈ 6ND)
- Know the basics of data cleaning, deduplication and mixing
Do these first: Transformers & Attention
02Algorithms to master
Each card has the original paper, prerequisites and resources.
03Must-read papers
- Scaling Laws for Neural Language Models ↗2020 ✓ verified in Essentials
- Training Compute-Optimal Large Language Models ↗2022 ✓ verified in Essentials
- Emergent Abilities of Large Language Models ↗2022 ✓ verified
- Better & Faster Large Language Models via Multi-token Prediction ↗2024 ✓ verified
04Courses & videos
- cs336.stanford.edu ↗CoursesEN
- Hugging Face:Smol Training Playbook ↗BooksEN
- Google DeepMind ↗ExplainersEN
05Hands-on: project, code & exercises
Free, official or author-published pages. Most run in the browser or on a free Colab GPU.
PROJECT
Train small GPTs of different sizes (1M–20M parameters) to convergence and fit your own scaling curve.
- 1github.com ↗Reference code
Run the full tokenise → pretrain → fine-tune → chat UI pipeline (needs a rented GPU).
- 2karpathy/llm.c ↗Reference code
Read the C/CUDA GPT-2 training code to see every step of an iteration.
- 3github.com ↗Reference code
Understand data, tensor, pipeline and context parallelism from minimal code.
06Self-test
Answer in your head, then open to check.
Chinchilla’s rule-of-thumb ratio?
About 20 training tokens per parameter.
Rough formula for training FLOPs?
About 6 × parameters × tokens.
Why are many models “over-trained” beyond the Chinchilla ratio?
Extra training buys a smaller, cheaper model to serve.
On these routes: Algorithm Researchers · Product Managers & Leaders