Skip to content
mlmentorship

Visual library

Choose a visual lesson.

Pick a chapter, then open any lesson in the visual review workspace. Each visual leads with the mechanism before the explanation.

Browse the library
I · FoundationsML foundations 9 chapters · 62 visuals
Linear algebra and geometry6 visuals
  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 visuals
  1. Expectation, variance, covariance, and correlation
  2. Probability distributions used in ML
  3. Entropy, mutual information, and information gain
  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
  9. Hypothesis testing and confidence intervals
  10. Bootstrap and resampling
  11. Exponential family
  12. KL divergence
  13. Monte Carlo and importance sampling
  14. Markov chains
Supervised learning8 visuals
  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 (xgboost, lightgbm, catboost)
Unsupervised learning3 visuals
  1. k-means clustering
  2. DBSCAN
  3. t-SNE and UMAP: nonlinear dimensionality reduction
Neural network foundations6 visuals
  1. Universal approximation theorem
  2. Activation functions
  3. Backpropagation
  4. Exploding and vanishing gradients
  5. Residual connections
  6. The attention mechanism
Representations and architectures4 visuals
  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 visuals
  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 visuals
  1. Variational autoencoders (VAE)
  2. Normalizing flows
  3. Generative adversarial networks (GANs)
  4. Diffusion models
  5. Discrete gradient estimators
Foundation interview questions8 visuals
  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 vs L2 regularization, beyond the formula
  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 visuals
Objectives and regularization7 visuals
  1. Cross-entropy and softmax
  2. Regularization: L1, L2, dropout, early stopping, and the modern view
  3. Dropout
  4. Label smoothing
  5. Weight decay vs. L2 regularization
  6. Mixup and CutMix
  7. Z-loss
Optimization and schedules7 visuals
  1. SGD with momentum
  2. Adam, AdamW, and modern optimizer choices
  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 (Kaiming, Xavier)
Numerics and training stability4 visuals
  1. BatchNorm vs LayerNorm (and the transformer wrinkle)
  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 visuals
  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 visuals
  1. The neural-network training recipe
  2. Lessons from Marin 8B: what an open pretraining log actually teaches you
Training and debugging questions5 visuals
  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 visuals
  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 visuals
  1. Debug this training loop
  2. Extend an unfamiliar ML codebase with an AI coding agent
Research methods and derivations7 visuals
  1. Derive logistic regression from MLE
  2. Why is softmax + cross-entropy the right pairing?
  3. Explain the reparameterization trick
  4. Derive ML math under oral-interview pressure
  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 visuals
IV · LLMs & agentsLLMs, agents, and post-training 7 chapters · 42 visuals
Transformer architecture and attention8 visuals
  1. Transformer architecture: a senior-level mental model
  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 visuals
  1. Tokenization: BPE, WordPiece, and the LLM era
  2. RoPE, ALiBi, and modern positional encodings
  3. Rotary position embeddings (RoPE)
  4. Long-context LLMs: training and serving techniques
Inference and decoding9 visuals
  1. Decoding strategies: greedy, beam, top-k, top-p, temperature
  2. KV cache: how LLM inference avoids quadratic decode cost
  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 visuals
  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 visuals
  1. Mechanistic interpretability
  2. Chain-of-thought monitorability
Fine-tuning and retrieval-augmented generation5 visuals
  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 visuals
  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 visuals
Hardware and performance6 visuals
  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 visuals
  1. All-reduce and other collectives
  2. Sharded matrix multiplication
  3. FSDP and ZeRO: sharding optimizer state, gradients, and parameters
  4. Tensor parallelism
  5. Pipeline parallelism
  6. Context parallelism and ring attention
  7. Strong scaling, MFU, and parallelism selection
Training plans and reliability5 visuals
  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 visuals
  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 visuals
  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 visuals
  1. Design fraud detection for a payment company
  2. Design a content moderation system
VI · Retrieval & rankingRetrieval, ranking, and recommendations 4 chapters · 23 visuals
VII · RL & roboticsReinforcement learning and robotics 3 chapters · 13 visuals
VIII · Vision, language & speechVision, language, and speech 4 chapters · 21 visuals
IX · Interview practiceInterview and career practice 3 chapters · 15 visuals
X · Coding practiceCoding interview practice 11 chapters · 107 visuals
Learn by rebuilding1 visuals
  1. How to learn coding interview problems without memorizing them
Remember the past6 visuals
  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 visuals
  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 visuals
  1. Valid Parentheses
  2. Decode String
  3. Daily Temperatures
  4. Min Stack
Process the next best item5 visuals
  1. Kth Largest Element
  2. Top K Frequent Elements
  3. Rotting Oranges
  4. Binary Tree Level Order Traversal
  5. Network Delay Time
Explore choices17 visuals
  1. Clone Graph
  2. Number of Islands
  3. Pacific Atlantic Water Flow
  4. Maximum Depth of Binary Tree
  5. Same Tree
  6. Invert Binary Tree
  7. Balanced Binary Tree
  8. Subtree of Another Tree
  9. Subsets
  10. Permutations
  11. Combination Sum
  12. Word Search
  13. Climbing Stairs
  14. House Robber
  15. Partition Equal Subset Sum
  16. Longest Common Subsequence
  17. Edit Distance
Create a useful order8 visuals
  1. Merge Intervals
  2. Insert Interval
  3. Non-overlapping Intervals
  4. Meeting Rooms II
  5. Jump Game
  6. Course Schedule
  7. Course Schedule II
  8. Redundant Connection
Change links6 visuals
  1. Reverse Linked List
  2. Linked List Cycle
  3. Remove Nth Node From End
  4. Merge Two Sorted Lists
  5. Implement Trie
  6. Design Add and Search Words
Complete core coverage32 visuals
  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. Coin Change
  11. Longest Increasing Subsequence
  12. Word Break
  13. Combination Sum IV
  14. House Robber II
  15. Decode Ways
  16. Unique Paths
  17. Graph Valid Tree
  18. Number of Connected Components
  19. Meeting Rooms
  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. LRU Cache
Practical AI coding8 visuals
  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 visuals
  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. Alien Dictionary
  8. Word Search II
  9. Merge K Sorted Lists
  10. Find Median From Data Stream