Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

The Roadmap: 10 Phases, 32 Projects

The full curriculum, from a character-level GPT to a deployed LLM application. Chapters written so far are linked; the rest follow the same pattern as the repository grows.

Phase 1 — Foundation (Part I of this book)

ProjectTopicStatus
1Character-Level GPT✅ Chapter 1
2BPE Tokenizer✅ Chapter 2
3Contextual Embeddings (BERT-style)✅ Chapter 3
3BSimCSE (Sentence Embeddings)✅ Chapter 4
4Pre-train 125M Model✅ Chapter 5

Focus: multi-head attention, transformer blocks, training loops, text generation, masked language modeling, contrastive learning.

Phase 2 — Fine-Tuning

ProjectTopicStatus
5Supervised Fine-Tuning (SFT)✅ Chapter 6
6LoRA Fine-Tuning✅ Chapter 7
7DPO (Direct Preference Optimization)

Focus: instruction formatting, memory-efficient training, preference alignment.

Phase 3 — Core Inference Optimizations

ProjectTopicSpeedup
8Mixed Precision Training & Inference2–4×
9KV-Cache10–30×
10Flash Attention2–4×

Papers: Micikevicius 2018 · Transformer-XL · Flash Attention 1 & 2

Phase 4 — Advanced Inference Optimizations

ProjectTopicSpeedup
11Prompt Caching5–50×
12Speculative Decoding2–3×
13Dynamic Batching3–10×
14Paged AttentionNear-zero memory waste

Papers: SemCache · vLLM · Orca · Speculative Sampling

Phase 5 — Quantization

ProjectTopicBenefit
15Post-Training Quantization (PTQ)2–4× smaller
16KV-Cache Quantization50% cache reduction
17Quantization-Aware Training (QAT)Better accuracy

Papers: GPTQ · LLM.int8() · QAT (Jacob 2018)

Phase 6 — Model Compression

ProjectTopicReduction
18Pruning (Structured & Unstructured)30–60%
19Knowledge DistillationSmaller models
20Weight Sharing10–30%

Papers: Wanda · Distilling Knowledge · ALBERT

Phase 7 — Advanced Architectures

ProjectTopicComplexity
21Sparse AttentionO(n√n)
22Mixture-of-Experts (MoE)Same compute, more params
23Memory-Efficient Attention2–4× less memory

Papers: Longformer · BigBird · Switch Transformers · Mixtral

Phase 8 — Parallelism & Scaling

ProjectTopicOutcome
24Tensor ParallelismMulti-GPU training
25Pipeline ParallelismBetter GPU utilization

Papers: Megatron-LM · GPipe · PipeDream

Phase 9 — Compiler Optimizations

ProjectTopicSpeedup
26Operator Fusion20–40%
27Graph Optimization1.5–3×
28Early Exit30–50%

Papers: Triton · XLA · TVM · PABEE

Phase 10 — Production Deployment

ProjectTopicOutcome
29Model Serving OptimizationProduction API
30Docker DeploymentOne-command deploy
31Interactive UI (Gradio)User-friendly

The learning pathway

PhasesTheme
1–2Build and fine-tune LLMs
3–4Speed up generation
5–6Shrink models
7–8Train larger models
9–10Ship to production

Projects are cumulative: the tokenizer of Phase 1 feeds the pre-training of Project 4, the model of Project 4 is what gets fine-tuned in Phase 2, and the same model is the one optimized in Phases 3–9. Skipping foundations catches up with you by Phase 3.