Not sure where to begin? Choose a route for your goal.

For interviews, go straight to Interview prep and pick the area you need. The full explanations stay here in Foundations whenever you want to go deeper.

This section explains how models work, why training methods take the forms they do, and how to judge their results. Start with examples, then explore derivations and implementations as needed. You do not need every prerequisite or every new model; go straight to the subject you care about.

  • New to the subject? Follow the examples and computations first. Return to derivations on a second pass.
  • Already have the basics? Start with your question and fill in missing concepts as needed.
  • Ready to build? Check the implementation assumptions, run a small experiment, then see how the pieces fit in Engineering practice.

Recent additions (October 2026):

Drafts pending review open with a notice and are marked “(draft)” in the sidebar; check the primary sources they link before relying on a fact.

Start with the foundations

If vectors, losses, and gradients are still unfamiliar, begin with linear models to neural networks. Steps 1–3 below explain computation and learning; step 5 covers checking the result. Post-training and inference optimization can wait until you need them. Run the small PyTorch experiments alongside the concepts rather than saving all coding for the end.

Follow the question you have

You do not need to finish an entire subject to resolve one doubt. Start with the first article in a route. If you can answer the question in the last column, that may be enough for now; the remaining links are ways to go further, not a checklist to finish.

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 (draft, pending review)
How do cars and robots get from pixels to actions? Perception and geometry → Autonomous driving → Robot learning What each step hands to the next (draft, pending review)
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

Want to review or solve problems? Interview preparation separates ML / LLM questions, ML coding, and Python with LeetCode. Want to design and build a system? Engineering practice connects design exercises with public projects and teaching implementations. Small experiments remain alongside the concepts here, without putting every exercise in this directory.

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
Python / algorithms Functions, loops, lists, dictionaries Language models; this route stands on its own

These are not reader rankings. You can build RAG without first studying SAC, or study training before service scheduling. Follow the links when a concrete question calls for the background.

All chapters

The four areas match the sidebar: understand models → train and evaluate → inference and applications → frontier watch. These describe subjects, not difficulty levels. Each article has one main home; links connect related subjects without duplicating content.

Open an overview or expand a chapter for all its articles. Model families follow component fundamentals. Questions and coding exercises live in Interview preparation; design exercises and project walkthroughs live in Engineering practice. Switch whenever you want to try an idea, without finishing the whole section first.

01 · Understand models

Start with inputs and computation, then compare architectures and add other modalities.

01

Foundations

21 notes

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

Learning path4
  1. Learning map
  2. Study & review guide
  3. Transformer
  4. Transformer lab
01 · Inputs & sequences7

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
02 · Build a Transformer8

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

  1. Overview
  2. Multi-head attention
  3. Residual connections
  4. Normalization
  5. FFN & SwiGLU
  6. Vanilla Transformer
  7. BERT: how an encoder learns to read
  8. Decoder-only
Build from scratch1
  1. Labs from scratch
Advanced reading map1
  1. Component reading map
02

Architectures & model families

26 notes

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

03

Multimodal learning

12 notes

Follow images through ViT, CLIP alignment, and connectors into language models.

02 · Train & evaluate

Connect objectives to updates, use feedback, and check what an experiment establishes.

04

Pretraining & training mechanics

18 notes

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

Training foundations4

Diagnose learning failures, then examine activations, initialization, and optimizer updates.

  1. Generalization & diagnosis
  2. Activations & initialization
  3. SGD to AdamW
  4. Muon: updating a matrix
01 · Objectives, data & updates5

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
02 · Precision, memory & parallelism4

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
03 · Scaling laws & hyperparameters (draft)5
  1. Overview
  2. Compute-optimal size and data
  3. Training past Chinchilla
  4. LR, batch size & schedule
  5. Review
05

Deep RL

22 notes

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

06

Post-training

27 notes

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

01 · Demonstrations, adaptation & 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
02 · Preferences, rewards & objectives7

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

  1. Reward models
  2. After PPO
  3. DAPO: sampling & weighting
  4. Clipping & gradients
  5. GSPO & ASPO
  6. SAO & asynchronous training
  7. Verifiable rewards
03 · The RLHF training process10
  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. Then: GRPO · DPO · RLVR
  10. Evaluation & review
04 · Experiments & capability retention3

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

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

Evaluation

15 notes

Make comparisons meaningful, then examine metrics, slices, uncertainty, and model judges.

03 · Inference & applications

Move from generating an answer to retrieving evidence, using tools, and maintaining state.

08

Generation, context & inference

10 notes

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

01 · Generation & caching6

Once decoder prediction is clear, separate sampling choices from prefill and decode computation.

  1. Inference route
  2. Decoding
  3. KV cache & inference
  4. A request through the service
  5. vLLM & SGLang
  6. DFlash: drafting, verification, and speed
02 · Long context & efficient attention4

Compare changes to positions, memory traffic, cache layout, state compression, and selected positions.

  1. RoPE & long context
  2. NoPE & sequence order
  3. FlashAttention & paging
  4. MLA & sparse attention
09

Data, memory & retrieval

12 notes

Logs are not intent, and retrieval is not an answer. Follow the signal through memory and search.

10

Agents

9 notes

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

11

AI systems & experience

6 notes

Put a request back in its product context: observability, human oversight, and long-term use.

12

AI infrastructure (draft)

16 notes

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

13

Perception, robots & driving (draft)

14 notes

From pixels to actions: camera geometry and tracking, bird's-eye view and planning, imitation learning and VLAs. Draft, pending review.

04 · Frontier watch

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

Reading and updates

For the history behind these methods, use the separate Tech history area. Foundations stays focused on how things work rather than mixing historical routes into its directory.

Use EN / 中文 at the top right to switch the current article. Chinese pages retain useful English terminology; English pages contain the full examples, derivations, and code.

Search at the top or press / for a concept. “My reading” keeps your saved notes and recently read articles in this browser only. The coverage and remaining-work list tracks gaps. Reference material helps identify missing topics, but the reading order here follows the concepts.