Documentation hub — YouTube

LLM Mastery

LLM Mastery: Beginner to Master (50 Articles)

A Karpathy-style path from tokens to transformers, alignment, RAG, and training your own tiny LLM.

LLM Mastery — 50 articles, first principles

Each article has a mental model, runnable code, a named failure mode, and a checkable exercise. Read in order. Type the code. Capstone (50) is how you know it stuck.

How to use this course

  1. Go in order — later articles assume earlier scars.
  2. Type code yourself. Reading is not training.
  3. Keep a notes file of tensor shapes and failure modes you hit.
  4. Do article 50. If you skip it, you only rented the knowledge.

Curriculum map

Phase Articles Focus
Foundations 01–10 Tokens, loss, bigrams, MLP mindset
Neural guts 11–20 Autograd, optimization, attention dawn
Transformers 21–35 GPT internals, systems, scaling
Post-training 36–50 SFT, LoRA, RLHF/DPO, RAG, agents, capstone

All articles

# Article Level
01 What is a Language Model, Really? Beginner
02 Tokens Are Not Words Beginner
03 Next-Token Prediction Is the Game Beginner
04 Your First LM: Bigrams Beginner
05 Loss: Cross-Entropy Without the Fear Beginner
06 Embeddings: Meaning as Geometry Beginner
07 Neural Nets for Language: The MLP Beginner
08 The Training Loop, End to End Beginner
09 Overfitting, Underfitting, and Data Beginner
10 The MakeMore Mindset: Build Tiny, Understand Deeply Beginner
11 Backpropagation as Local Blame Intermediate
12 Micrograd Energy: Autograd From Scratch Intermediate
13 Tensor Shapes: The Hidden Curriculum Intermediate
14 Softmax and Temperature, Carefully Intermediate
15 SGD, Adam, and Why Adam Won LLMs Intermediate
16 Initialization Is Not Optional Intermediate
17 Dropout, Weight Decay, and Noise as Teachers Intermediate
18 RNNs: The Old Kings and Their Pain Intermediate
19 Seq2Seq and the Dawn of Attention Intermediate
20 Reading ‘Attention Is All You Need’ Like an Engineer Intermediate
21 Self-Attention Mechanics Intermediate
22 Multi-Head Attention Intermediate
23 Positional Information: Absolute, Relative, RoPE Intermediate
24 Residuals and LayerNorm: The Stabilizers Intermediate
25 The Transformer MLP: Where Facts Often Live Intermediate
26 GPT Architecture: Decoder-Only Transformers Intermediate
27 Implement a Tiny GPT (Conceptual Walkthrough) Advanced
28 KV Cache: Why Chat Is Fast After the First Token Advanced
29 Batching, Throughput, and the Economics of Tokens Advanced
30 Scaling Laws: The Bitter Lesson, Quantified Advanced
31 Tokenization Deep Dive: BPE Under the Hood Advanced
32 Pretraining Data: The Real Model Advanced
33 Training Parallelism: DDP, FSDP, Pipeline Advanced
34 Mixed Precision Training Advanced
35 Evaluation: Beyond Vibes Advanced
36 Supervised Fine-Tuning (SFT) Advanced
37 LoRA and Parameter-Efficient Fine-Tuning Advanced
38 Preferences: RLHF and DPO Advanced
39 Prompting as Programming Intermediate
40 RAG: Retrieval-Augmented Generation Advanced
41 Agents and Tool Use Advanced
42 Hallucinations: Why They Happen Advanced
43 Interpretability: Looking Inside Advanced
44 Quantization and Local Serving Advanced
45 Multimodal LLMs: Vision Enters the Context Advanced
46 Diffusion vs Autoregressive: Two Generative Religions Advanced
47 Safety, Security, and Prompt Injection Advanced
48 Build Eval-Driven: A Practical Workflow Advanced
49 Research Taste: How to Read Papers Master
50 Capstone: Train Your Own Tiny LLM Master

Start

01. What is a Language Model, Really?