Skip to content
mlmentorship

The field guide

Visual library

391 lessons · 10 books

All books
I · FoundationsML foundations 9 chapters · 62 lessons
Linear algebra and geometry6 lessons
  1. Matrices as linear maps
  2. Determinant and volume
  3. Positive (semi-)definite matrices
  4. Eigenvalues and the spectral theorem
  5. SVD and PCA
  6. Matrix calculus for ML
Probability and statistics14 lessons
  1. Expectation, variance, covariance, and correlation
  2. Probability distributions used in ML
  3. Entropy and mutual information: a noisy observation
  4. Epistemic vs aleatoric uncertainty
  5. Bayes' rule and the posterior
  6. Maximum likelihood estimation
  7. Bias and variance of estimators
  8. Central limit theorem: what becomes Gaussian?
  9. Hypothesis testing and confidence intervals
  10. Bootstrap and resampling
  11. Exponential family
  12. KL divergence: which distribution weights the error?
  13. Monte Carlo and importance sampling
  14. Markov chains
Supervised learning8 lessons
  1. Linear regression
  2. Logistic regression
  3. Naive Bayes
  4. SVM and the kernel trick
  5. Kernel methods and the kernel trick
  6. Decision trees
  7. Random forests
  8. Gradient boosting: fit the next correction
Unsupervised learning3 lessons
  1. k-means clustering
  2. DBSCAN
  3. t-SNE and UMAP: nonlinear dimensionality reduction
Neural network foundations6 lessons
  1. Universal approximation theorem
  2. Activation functions
  3. Backpropagation
  4. Exploding and vanishing gradients
  5. Residual connections
  6. The attention mechanism
Representations and architectures4 lessons
  1. Encoder-decoder architectures
  2. Contrastive and self-supervised learning
  3. Graph neural networks: message passing as A·X·W
  4. Autoregressive vs. diffusion generation
Probabilistic and latent-variable models8 lessons
  1. Gaussian processes
  2. Factor analysis and probabilistic PCA
  3. Expectation-Maximization (EM)
  4. Gaussian mixture models
  5. Probabilistic graphical models
  6. Belief propagation (message passing)
  7. Hidden Markov models
  8. Forward-backward and Viterbi: dynamic programming on chains
Deep generative models5 lessons
  1. Variational autoencoders: calculate the bound and its gap
  2. Normalizing flows
  3. Generative adversarial networks (GANs)
  4. Diffusion models
  5. Discrete gradient estimators
Foundation interview questions8 lessons
  1. Walk me through the bias-variance tradeoff
  2. How do you choose a loss function?
  3. Explain backprop in your own words
  4. Why does dropout work?
  5. L1 versus L2: derive the zero coefficient
  6. How do you choose a learning rate?
  7. When would you not use cross-validation?
  8. Bayesian vs frequentist: a practitioner's framing
II · Training & researchModel training and research 9 chapters · 52 lessons
Objectives and regularization7 lessons
  1. Cross-entropy and softmax
  2. Regularization: diagnose the gap and choose a constraint
  3. Dropout
  4. Label smoothing
  5. L2 and weight decay: follow the shrinkage path
  6. Mixup and CutMix
  7. Z-loss
Optimization and schedules7 lessons
  1. SGD with momentum: keep the update history
  2. Adam: trace direction and coordinate scale
  3. Learning rate schedules: warmup and cosine decay
  4. WSD and WSD-S learning rate schedules
  5. Microannealing and midtraining
  6. Gradient clipping
  7. Weight initialization: trace signal scale through a layer
Numerics and training stability4 lessons
  1. BatchNorm and LayerNorm: which values share statistics?
  2. Floating-point formats: FP32, FP16, BF16, FP8, TF32
  3. Mixed precision training: FP16, BF16, and FP8
  4. Loss spikes at scale
Efficiency, data, and scaling9 lessons
  1. Activation checkpointing
  2. Gradient accumulation
  3. Sequence packing with block-diagonal masks
  4. Foundation-model data curation
  5. Synthetic data generation and verification
  6. Design a foundation-model data platform
  7. Neural scaling laws and compute-optimal training
  8. Knowledge distillation
  9. Pruning: structured vs unstructured sparsity
Training recipe and case study2 lessons
  1. The neural-network training recipe
  2. Lessons from Marin 8B: what an open pretraining log actually teaches you
Training and debugging questions5 lessons
  1. How would you debug a model that's not learning?
  2. Mixed precision: what's actually happening?
  3. How do you deal with class imbalance in 2026?
  4. Explain backprop through time
  5. Why does Adam sometimes generalize worse than SGD?
ML implementation9 lessons
  1. Implement KNN efficiently
  2. Implement reverse-mode autodiff for scalar expressions
  3. Implement attention from scratch
  4. Implement a pre-norm Transformer decoder block
  5. Implement incremental decoding with a KV cache
  6. Implement beam search with EOS and length normalization
  7. Implement a LoRA adapter for a frozen linear layer
  8. Implement memory-bounded batched top-k retrieval
  9. Implement mergeable streaming classification metrics
Training code and codebase debugging2 lessons
  1. Debug this training loop
  2. Extend an unfamiliar ML codebase with an AI coding agent
Research methods and derivations7 lessons
  1. Derive logistic regression from MLE
  2. Why is softmax + cross-entropy the right pairing?
  3. Explain the reparameterization trick
  4. Defend an ML derivation when its assumptions change
  5. Design an ablation study that tests the claimed mechanism
  6. Critique an ML paper you have not seen before
  7. Investigate a black-box model behavior in 90 minutes
III · Evaluation & productEvaluation and product ML 4 chapters · 25 lessons
IV · LLMs & agentsLLMs, agents, and post-training 7 chapters · 42 lessons
Transformer architecture and attention8 lessons
  1. Transformer architecture: trace one complete block
  2. Multi-head attention: why one head is not enough
  3. Self-attention vs cross-attention
  4. Grouped-query and multi-query attention (GQA, MQA)
  5. FlashAttention
  6. Sparse attention (BigBird, Longformer)
  7. Linear attention (Linformer, Performer, kernel methods)
  8. Mixture of Experts (MoE)
Tokens, position, and long context4 lessons
  1. Tokenization: BPE, WordPiece, and the LLM era
  2. Positional encoding: where does position enter attention?
  3. Rotary position embeddings (RoPE)
  4. Long-context LLMs: training and serving techniques
Inference and decoding9 lessons
  1. Decoding strategies: greedy, beam, top-k, top-p, temperature
  2. KV cache: reuse past projections, retain growing reads
  3. Prefill vs. decode: the two phases of LLM inference
  4. PagedAttention and the vLLM serving model
  5. Continuous batching for LLM serving
  6. Speculative decoding
  7. Quantization: INT8, INT4, FP8, and the inference cost picture
  8. Test-time compute, search, and verifiers
  9. Walk me through speculative decoding
Post-training, alignment, and safety9 lessons
  1. RLHF, DPO, and the alignment training stack
  2. Preference data and reward models
  3. RL with verifiable rewards and GRPO
  4. Scalable oversight and AI control
  5. Model organisms of misalignment
  6. LLM security threat models
  7. Design post-training data, an RL environment, and its grader
  8. Design an LLM red-team and security evaluation program
  9. Design a safety control plane for high-impact agents
Interpretability and monitoring2 lessons
  1. Mechanistic interpretability
  2. Chain-of-thought monitorability
Fine-tuning and retrieval-augmented generation5 lessons
  1. RAG: retrieval-augmented generation
  2. When would you fine-tune vs prompt vs RAG?
  3. Fine-tuning vs prompting: the deep version
  4. Design a RAG system for legal documents
  5. Designing a RAG system that actually works
LLM application and agent design5 lessons
  1. How do you handle hallucinations in production?
  2. Design a system for safe LLM deployment in healthcare
  3. Build an LLM coding assistant from scratch
  4. Design an AI coding product
  5. Design an enterprise agent platform
V · SystemsML systems and infrastructure 6 chapters · 31 lessons
Hardware and performance6 lessons
  1. Transformer compute and memory accounting
  2. GPU memory hierarchy: HBM, SRAM, and roofline reasoning
  3. Accelerator network topology for distributed ML
  4. Profiling distributed ML workloads
  5. Optimize an accelerator workload from a trace
  6. Chinchilla scaling, MoE, and fused Triton kernels
Distributed training and parallelism7 lessons
  1. All-reduce and other collectives
  2. Sharded matrix multiplication
  3. FSDP and ZeRO: budget shards and temporary gathers
  4. Tensor parallelism
  5. Pipeline parallelism
  6. Context parallelism and ring attention
  7. Strong scaling, MFU, and parallelism selection
Training plans and reliability5 lessons
  1. Walk me through how you'd train a 100B parameter model
  2. Plan and cost a 70B transformer training run
  3. Fault-tolerant collectives
  4. Design fault-tolerant distributed training
  5. Debug a frontier LLM training run that suddenly diverges
Inference systems and cost5 lessons
  1. Design a production LLM inference service
  2. Train and serve a reasoning model under a fixed compute budget
  3. Annotated upper-IC mock: reasoning under a fixed budget
  4. How would you reduce LLM inference cost by 10x?
  5. How to think about LLM inference cost
ML platforms and operations6 lessons
  1. ML data lineage, versioning, and reproducibility
  2. Design a feature store from scratch
  3. Design ML monitoring
  4. Design a multi-team ML platform
  5. Design an ML system under a fixed serving budget
  6. Design real-time personalization
Applied ML system design2 lessons
  1. Design fraud detection for a payment company
  2. Design a content moderation system
VI · Retrieval & rankingRetrieval, ranking, and recommendations 4 chapters · 23 lessons
VII · RL & roboticsReinforcement learning and robotics 3 chapters · 13 lessons
VIII · Vision, language & speechVision, language, and speech 4 chapters · 21 lessons
IX · Interview practiceInterview and career practice 3 chapters · 15 lessons
X · Coding practiceCoding interview practice 11 chapters · 107 lessons
Learn by rebuilding1 lessons
  1. How to learn coding interview problems without memorizing them
Remember the past6 lessons
  1. Two Sum
  2. Valid Anagram
  3. Group Anagrams
  4. Longest Consecutive Sequence
  5. Product of Array Except Self
  6. Subarray Sum Equals K
Move boundaries10 lessons
  1. 3Sum
  2. Container With Most Water
  3. Longest Substring Without Repeating Characters
  4. Longest Repeating Character Replacement
  5. Permutation in String
  6. Count Number of Nice Subarrays
  7. Binary Search
  8. Search in Rotated Sorted Array
  9. Koko Eating Bananas
  10. Find Minimum in Rotated Sorted Array
Keep unfinished work4 lessons
  1. Valid Parentheses
  2. Decode String
  3. Daily Temperatures
  4. Min Stack
Process the next best item5 lessons
  1. Keep the best k values with the weakest retained value at the root
  2. Use bounded occurrence counts as ranking coordinates
  3. Rotting Oranges
  4. Freeze the current frontier before adding the next level
  5. Finalize the cheapest pending path under nonnegative edge costs
Explore choices17 lessons
  1. Allocate one copy per original identity before following edges
  2. Count new component seeds and mark each whole region
  3. Reverse the edges when many starts share a few goals
  4. Return one subtree height after both children
  5. Compare aligned values and missing-child positions together
  6. Return transformed child roots, then reconnect them locally
  7. Balanced Binary Tree
  8. Subtree of Another Tree
  9. Save each increasing-index choice path, then undo the last choice
  10. Permutations
  11. Combination Sum
  12. Own visited cells only for the current word path
  13. Count disjoint final-move cases and retain only their dependencies
  14. Compare skipping the current item with its last compatible prefix
  15. Extend a snapshot of reachable sums to use each occurrence once
  16. Define two-prefix answers before compressing the table to rows
  17. Edit Distance
Create a useful order8 lessons
  1. Sort starts to keep only one open union component
  2. Insert Interval
  3. Keep the earliest finishing compatible range to preserve future room
  4. Track active end times to find peak room demand
  5. Compress all reachable forward choices into one prefix boundary
  6. Release a dependency only when its unmet-requirement count reaches zero
  7. Course Schedule II
  8. Reject an undirected edge whose endpoints already share a component
Change links6 lessons
  1. Save the remaining chain before reversing the current link
  2. Detect a cycle with one-link and two-link moves
  3. Keep a link gap until the leading pointer reaches the tail
  4. Attach the smaller sorted frontier and advance only its source
  5. Share prefix paths and mark complete words separately
  6. Branch at wildcards and require an exact terminal match
Complete core coverage32 lessons
  1. Contains Duplicate
  2. Maximum Subarray
  3. Best Time to Buy and Sell Stock
  4. Maximum Product Subarray
  5. Number of 1 Bits
  6. Counting Bits
  7. Missing Number
  8. Reverse Bits
  9. Sum of Two Integers
  10. Remove the final coin and reuse the best smaller total
  11. Longest Increasing Subsequence
  12. Launch words only from completely segmentable prefixes
  13. Combination Sum IV
  14. House Robber II
  15. Add parse counts only for valid final tokens
  16. Unique Paths
  17. Graph Valid Tree
  18. Number of Connected Components
  19. Meeting Rooms: Make Every Conflict an Adjacent Boundary
  20. Reorder List
  21. Set Matrix Zeroes
  22. Spiral Matrix
  23. Rotate Image
  24. Valid Palindrome
  25. Longest Palindromic Substring
  26. Palindromic Substrings
  27. Encode and Decode Strings
  28. Construct Tree From Preorder and Inorder Traversal
  29. Validate Binary Search Tree
  30. Kth Smallest Element in a BST
  31. Lowest Common Ancestor in a BST
  32. Join direct key lookup to a doubly linked recency order
Practical AI coding8 lessons
  1. Pairwise Squared Distances
  2. Stable Softmax
  3. Cross-Entropy From Logits
  4. Causal Attention
  5. Pad Variable-Length Sequences
  6. Mini-Batches
  7. Top-K Scores
  8. Binary Precision and Recall
Hard problems10 lessons
  1. Minimum Window Substring
  2. Split Array Largest Sum
  3. Largest Rectangle in Histogram
  4. Binary Tree Maximum Path Sum
  5. Serialize and Deserialize Binary Tree
  6. Longest Increasing Path in a Matrix
  7. Infer only forced character precedences, then order the graph
  8. Traverse board paths and dictionary prefixes together
  9. Merge K Sorted Lists
  10. Find Median From Data Stream