To read in order, follow a route: each one puts a few notes in sequence, so you finish one and go on to the next. Every note is also listed by topic in the sidebar, so you can step off at any point.

For hands-on work, try the experiments alongside the notes. The reading routes can help you choose a starting point, or begin with one small model. After a stretch of reading, the self-check questions show what stuck.

Start with the foundations

Each route below lists its notes in reading order. If vectors, losses, and gradients are still unfamiliar, start at the first note of the first route, linear models to neural networks. Pair your reading with the small PyTorch experiments.

01 · How it works · 4 tracks · 31 stops

01

How a model reads

Start from vectors and one layer, then put the Transformer together piece by piece.

9 stops
  1. 01From linear to neural
  2. 02Tokens
  3. 03Embeddings
  4. 04Attention
  5. 05Residuals
  6. 06Normalization
  7. 07FFN & gates
  8. 08The full Transformer
  9. 09Decoder-only

02

How a model learns

How one training update happens, and what changes at scale.

8 stops
  1. 01The LM objective
  2. 02A training step
  3. 03Optimizers
  4. 04Initialization
  5. 05Generalization
  6. 06Precision & memory
  7. 07Distributed training
  8. 08Scaling laws

03

How a model is taught

How demonstrations, preferences and rewards shape a model; RL is explained here once.

8 stops
  1. 01RL for language models
  2. 02SFT & its ceiling
  3. 03LoRA
  4. 04Distillation
  5. 05Where preferences come from
  6. 06The RLHF loop
  7. 07After PPO
  8. 08Verifiable rewards

04

How we check it

What a score can tell you, and what it cannot.

6 stops
  1. 01The evaluation stack
  2. 02Benchmark protocols
  3. 03Ablations & slices
  4. 04Metric robustness
  5. 05LLM as a judge
  6. 06Calibration

02 · How it runs · 3 tracks · 25 stops

05

How a model runs

From one token to many requests: where prefill and decode get stuck, what batching, caching, quantization and speculative decoding save, and how many requests one GPU can take.

9 stops
  1. 01Decoding
  2. 02KV cache
  3. 03Prefill & decode
  4. 04One request
  5. 05Batching & prefix cache
  6. 06Attention kernels
  7. 07Quantization
  8. 08Speculative decoding
  9. 09Capacity

06

How the hardware computes

One request on CPUs, GPUs and memory: where the time goes, whether compute or bandwidth runs out first, and what crosses between GPUs.

8 stops
  1. 01Where the time goes
  2. 02CPUs
  3. 03GPU architecture
  4. 04CUDA
  5. 05PyTorch to kernels
  6. 06Roofline & MFU
  7. 07Tensor parallelism
  8. 08GPU generations

07

Inside the runtime

Follow generation and training through the frameworks that run them.

8 stops
  1. 01MLSys map
  2. 02Execution boundaries
  3. 03Megatron basics
  4. 04RL systems
  5. 05Async RL
  6. 06Algorithms to source
  7. 07A NeMo RL run
  8. 08Training stability

03 · Using it · 4 tracks · 24 stops

09

Agents

Prompts, tools and agent patterns, and how to recover when things go wrong.

6 stops
  1. 01Prompts & CoT
  2. 02Tools & skills
  3. 03Agent patterns
  4. 04One agent or many
  5. 05Deep research
  6. 06Failure & recovery

10

Multimodal

Start with image patches in ViT, see how CLIP matches pictures to text, then connect the image features to a language model. Read SigLIP for a different way to train on image–text pairs.

6 stops
  1. 01ViT
  2. 02CLIP
  3. 03Vision into language
  4. 04SigLIP
  5. 05BLIP & Q-Former
  6. 06LLaVA & DeepSeek-VL

11

Perception & robots

From cameras and tracking to driving and robots that learn to act.

6 stops
  1. 01Camera geometry
  2. 02Tracking
  3. 03Driving
  4. 04BEV & occupancy
  5. 05Robot learning
  6. 06VLA

04 · Building it · 3 tracks · 22 stops

12

From formulas to code

Write the maths as code a test can check: shapes, gradients, masks and numerics.

9 stops
  1. 01Names & copies
  2. 02Equations to code
  3. 03Tensors & storage
  4. 04Ops & shapes
  5. 05Cross-entropy
  6. 06Autograd
  7. 07Training loop
  8. 08Seven modules by hand
  9. 09One attention, five ways

13

An ML system in production

From data to a model to live results and what users send back; then serving, queues and failures.

8 stops
  1. 01Data to users
  2. 02Data to model
  3. 03After deployment
  4. 04Production ML
  5. 05One recommendation request
  6. 06Offline vs online
  7. 07Request to GPU
  8. 08Queues & failures

14

System design

Requirements and budgets first, then a design you can defend.

5 stops
  1. 01Several answers
  2. 02Feed
  3. 03Knowledge-base RAG
  4. 04Memory
  5. 05Reading & trade-offs

To connect mathematics with implementation, begin with matrix gradients and training systems, then follow the one-question reading route into attention, multiple GPUs, inference, and NeMo RL.

Follow the question you have

Find the question closest to yours in the left column and read the route in the middle column. The right column lists the details worth watching as you read.

What you want to understand Reading route What to inspect
FSDP, vLLM, and SGLang are familiar names, but their roles are unclear Training stacks → Inference engines Who handles training state, request scheduling, and kernels
How does a model become a complete product? ML system map → Data to model → Serving and feedback Inputs, outputs, versions, failures, and team handoffs
The equations make sense, but training code does not Tensors and storage → Autograd → Training loop Whether parameters update and validation loss uses the right denominator
What to prepare before fine-tuning Pretraining data pipeline → SFT → LoRA / QLoRA Labels, loss masks, data splits, and memory use
New architecture names are hard to tell apart Component reading map → Model reports Changes to sequences, caches, experts, or network depth
The model accepts an image, but does it use it? Image–text matching → Visual features in an LLM → VLM training and evaluation Whether the answer follows a changed fact in the image
RL equations make sense, but experiments are unstable Value estimates and GAE → PPO clipping → Debugging experiments What changed in rewards, advantages, and update size
Retrieval scores improve, but answers do not Dual encoders → Hybrid retrieval and reranking → Metric robustness Which examples improve when the candidate pool is held fixed
What changes when I replace an embedding model? Qwen Embedding and BGE-M3 → Vector indexes Input and pooling compatibility, and when to rebuild the index
nvidia-smi shows 100%, yet generation is slow AI infrastructure → GPU architecture → Performance: roofline and MFU Operations per byte moved from memory, and whether bandwidth or compute is the limit
How do cars and robots get from pixels to actions? Perception and geometry → Autonomous driving → Robot learning What each step hands to the next
What do “world model” and “self-improvement” actually mean? Frontier → World models → Recursive self-improvement Which of several things the word refers to, and how far the evidence goes

Practice sits next to the material: coding exercises are on the From formulas to code track and system design on the System design track; the questions at the end of each note are collected in self-check questions.

What should I know before focusing on one subject?
Subject Enough background to get started What can wait on a first pass
Multimodal models Vector similarity, attention, cross-entropy Distributed training and full RL derivations
SFT / preference learning Next-token loss, gradients, data splits Pretraining from scratch and MoE deployment
RL / post-training Expectations, log-probabilities, basic differentiation Robotics; return to continuous control when needed
Inference / deployment Decoder forward pass, tensor shapes, KV cache Reward models and preference optimization
Retrieval / RAG / agents Embeddings, retrieval metrics, basic API calls Every model family and training recipe

These are the prerequisites for reading. For example, you can build RAG before studying SAC, and study training before service scheduling.

All chapters

The complete catalog matches the All notes drawer: the tracks of the four areas, then the two shelves, Go deeper (model reports, architecture variants, classic RL and Tech history) and Still moving. Click a title for its overview, or expand a chapter to find its articles. Every note that is not a stop on a track is here, at the same address as before.

How a model reads

Start from vectors and one layer, then put the Transformer together piece by piece.

01

Foundations

20 notes

Follow text into a model, then connect attention, FFNs, and the full Transformer.

Maths1
  1. ML math
Sequences & tokens7

Start with functions, vectors, and tokens; use RNNs and Seq2Seq to motivate attention.

  1. Linear to neural
  2. Tokenization
  3. Tokenizer algorithms
  4. Embeddings & similarity
  5. RNN & LSTM
  6. Seq2Seq
  7. BPTT & gates
The whole Transformer12

With tokens and vectors in place, examine how positions exchange information and form a complete network.

  1. Overview
  2. Learning map
  3. Labs from scratch
  4. Transformer
  5. Transformer lab
  6. Multi-head attention
  7. Residual connections
  8. Normalization
  9. FFN & SwiGLU
  10. Vanilla Transformer
  11. BERT: how an encoder learns to read
  12. Decoder-only

How a model learns

How one training update happens, and what changes at scale.

02

Pretraining & training mechanics

19 notes

Connect the objective, data, and one batch to precision, memory, and distributed execution.

Training basics5

Start with a linear layer's gradients, then study generalization, activations, initialization, and optimizer updates.

  1. Matrix gradients & training systems
  2. Generalization & diagnosis
  3. Activations & initialization
  4. SGD to AdamW
  5. Muon: updating a matrix
Pretraining5

Establish the prediction target, then follow the data into a batch and a parameter update.

  1. Training route
  2. LM objective
  3. Pretraining pipeline
  4. One training step
  5. Multi-token prediction
Many GPUs4

After one training step, separate numeric formats, stored state, recomputation, and multi-device partitioning.

  1. Precision & memory
  2. Distributed training
  3. Tensor parallelism, worked through
  4. DDP, FSDP2 & training stacks
Scaling laws5
  1. Overview
  2. Compute-optimal size and data
  3. Training past Chinchilla
  4. LR, batch size & schedule
  5. Review

How a model is taught

How demonstrations, preferences and rewards shape a model; RL is explained here once.

03

Post-training

29 notes

Separate demonstrations, preferences, and rewards before choosing fine-tuning, distillation, or RL.

Fine-tuning & distillation7

Separate the source of supervision from trainable parameters: LoRA is not a new signal, and distillation is not only model compression.

  1. Overview
  2. SFT
  3. Rejection sampling & filtering
  4. Fine-tuning & LoRA
  5. Prompt / Prefix / Adapter
  6. LoRA & QLoRA
  7. Distillation: answers & distributions
Rewards & preferences5

After demonstration learning, distinguish preference pairs, reward models, and verifiers.

  1. Reward models
  2. Reward-model targets
  3. Reward-model ranking losses
  4. After PPO
  5. Verifiable rewards
Methods after PPO5
  1. RLOO: leave-one-out baselines
  2. DAPO: sampling & weighting
  3. Clipping & gradients
  4. GSPO & ASPO
  5. SAO & asynchronous training
Inside RLHF9
  1. Overview
  2. RL for language models
  3. Value & advantage
  4. On- vs off-policy
  5. Stages & models
  6. Reference & Critic
  7. Three KL estimators: similar values, different gradients
  8. PPO clipping
  9. Evaluation & review
Experiments & trade-offs3

Return to experiments: align rollout and training, compare a shared base, and check regressions.

  1. Infrastructure
  2. One base model
  3. Alignment tax

How we check it

What a score can tell you, and what it cannot.

How a model runs

From one token to many requests: where prefill and decode get stuck, what batching, caching, quantization and speculative decoding save, and how many requests one GPU can take.

05

Generation, context & inference

18 notes

Separate token selection, cached state, memory traffic, and the number of attention pairs.

How the hardware computes

One request on CPUs, GPUs and memory: where the time goes, whether compute or bandwidth runs out first, and what crosses between GPUs.

06

AI infrastructure

10 notes

The whole chain behind one request: wafers, chips, GPUs and CUDA, up to frameworks, clusters and products.

Inside the runtime

Follow generation and training through the frameworks that run them.

16

Inside the runtime

9 notes

Start with how computation and tasks run, then trace scheduling, updates and stability through vLLM, SGLang and NeMo RL.

ML / LLM runtime walkthroughs5

Start with computation and task execution, then connect multi-GPU training, clusters, and RL data flow.

  1. ML / LLM systems map
  2. CPU, GPU & cluster scheduling
  3. Multi-GPU training & Megatron
  4. An RL update end to end
  5. Async RL & AReaL
Source walkthroughs: generation & training4

Connect prefill, decode, and learning objectives to scheduling, updates, and stability in vLLM, SGLang, and NeMo RL.

  1. From algorithms to source: generation, training, and stability
  2. One generation: from prefill and decode to engine scheduling
  3. Follow a training run through NeMo RL
  4. Why training becomes unstable: from samples to an update

Search, vector indexes and RAG, then how a model keeps memories.

Agents

Prompts, tools and agent patterns, and how to recover when things go wrong.

08

Agents

9 notes

How models choose tools, maintain state, recover from failures, and decide when to stop.

09

AI systems & experience

7 notes

From one request to repeated use: diagnose failures, recover safely, involve people, and measure whether the system helps.

Multimodal

Start with image patches in ViT, see how CLIP matches pictures to text, then connect the image features to a language model. Read SigLIP for a different way to train on image–text pairs.

Perception & robots

From cameras and tracking to driving and robots that learn to act.

From formulas to code

Write the maths as code a test can check: shapes, gradients, masks and numerics.

An ML system in production

From data to a model to live results and what users send back; then serving, queues and failures.

13

An ML system end to end

3 notes

Follow data, training, and live requests through modules, contracts, tradeoffs, and team handoffs.

From data to users3

Start with three timelines, then examine data, training, indexes, requests, and feedback, including inputs, outputs, and ownership.

  1. An ML system, from data to users
  2. Data to model: the deliverable is more than a checkpoint
  3. After deployment: requests, failures, and feedback
14

Production ML & recommendation

3 notes

Follow a recommendation request into data timing, experiment slices, and releases.

15

AI Infra & distributed systems

2 notes

Trace serving and training, then calculate cache, queue, capacity, and failure budgets.

System design

Requirements and budgets first, then a design you can defend.

17

System design

5 notes

Work through Feed, RAG, and memory designs with explicit requirements and budgets.

Go deeper

Model reports, architecture variants, classic RL and Tech history, for when a stop sends you there.

18

Model reports

9 notes

19

Architecture variants

18 notes

Read model reports by asking what changed, why it changed, and what it costs.

20

Classic RL

26 notes

Understand returns, values, and policies in small environments before comparing algorithms.

27

Tech history

2 notes

Still moving

Fast-moving directions that have not settled: pin down what is meant, then see how far the evidence goes.

Earlier additions (October 2026)

These series completed their first primary-source check on 2026-10-21, when the draft labels were removed. Further revisions are recorded in the individual notes.

Reading and updates

For how these techniques developed, see the Tech history. To check what you have understood, use the self-check questions: the questions in the notes, by track, with a reference answer where there is one.

Use the language switch at the top right to open the same article in Chinese or English. Chinese pages retain useful English terminology; English pages contain the full examples, derivations, and code.

Search at the top or press / to look up a concept. “My reading” keeps your saved and recently read articles in this browser. Progress is tracked in the coverage and remaining-work list.