← Engineermaxxing
Feynman-Level Interactive Lessons

Gleams

Build intuition from absolute zero. Every concept from first principles, with interactive simulations, step-by-step math, and quizzes. No prerequisites beyond curiosity.

149
Lessons
1256+
Chapters
826+
Simulations
⌕
No matches found.
AI Architectures44
LESSON 01

microGPT

From absolute zero to understanding every line of Karpathy's 243-line GPT.

11 chapters15+ sims
LESSON 02

Transformer

Self-attention, multi-head, KV cache, MoE — the architecture behind everything.

11 chapters
NEW

Understanding Attention

Every object in the attention equation, then the same mechanism in masks, heads, the KV cache and FlashAttention.

13 chapters16+ sims
NEW

Vision Transformer (ViT)

Split an image into patches, treat them as tokens, run a Transformer. How ViT unified vision and language architectures.

10 chapters10+ sims
NEW

Universal Architecture

Why one design rules everything — retrofitting patterns, cross-attention, conditioning zoo, composition.

10 chapters12+ sims
LESSON 03

SSM / Mamba

Linear recurrence, selective scan — the O(n) alternative to attention.

10 chapters
LESSON 04

Diffusion Models

Add noise, learn to reverse it. The dominant generative paradigm.

10 chapters
LESSON 05

Flow Matching

Straight paths from noise to data — simpler, faster than diffusion.

9 chapters
NEW

Magenta RealTime 2

A 2.4B music model you can jam with in ~200 ms on a laptop — frame-level codec LM, attention sinks, pianoroll & style control.

11 chapters10 sims
NEW

Diffusion Transformer (DiT)

Replace the U-Net with a Transformer. adaLN-Zero conditioning, scaling laws, and how DiT powers SD3, FLUX, and Sora.

10 chapters10+ sims
LESSON 06

VAE / VQ-VAE

The secret plumbing — variational inference, codebooks, tokenization.

10 chapters
LESSON 07

GAN

Generator vs discriminator — the adversarial game.

9 chapters
LESSON 08

Contrastive / CLIP

The glue connecting images and text in a shared space.

10 chapters
LESSON 09

VLM

Teaching language models to see — vision encoder + LLM fusion.

10 chapters
NEW

Pixel Buffers → VLM Tokens

The data layer under every vision model: trace one image from raw bytes through layout, resize, normalization, and patchify all the way to the tokens a VLM reads — and the silent bugs at each step.

10 chapters9 sims
LESSON 10

VLA

Foundation models that physically act in the world.

10 chapters
LESSON 11

World Models

Learning to imagine before acting — prediction as intelligence.

9 chapters
LESSON 12

NeRF / 3DGS

Reconstructing 3D worlds from 2D photographs.

10 chapters
LESSON 13

Reward / Alignment

RLHF, DPO, Constitutional AI — making AI do what we want.

10 chapters
LESSON 14

Agent Evaluation

From vibe checks to rigorous testing. Graders, pass@K/pass^K, τ-bench, Terminal-Bench, the Swiss cheese model.

12 chapters12+ sims
NEW

Mixture of Experts

Scaling without paying for it: experts & routing, top-k gating, the collapse problem & load-balancing loss, capacity/token-dropping, Switch, Mixtral & DeepSeek, expert parallelism.

10 chapters9+ sims
NEW

Test-Time Compute

Letting the model think longer: self-consistency, best-of-N & verifiers, chain-of-thought as compute, tree search, o1-style reasoning RL, the train-vs-test tradeoff, and the overthinking trap.

10 chapters9+ sims
NEW

U-Net

Seeing every pixel: encoder-decoder, the bottleneck blur, skip connections (the one big idea), upsampling & checkerboards, Dice loss, and why it became the backbone of diffusion models.

10 chapters9+ sims
NEW

Linear Attention & RWKV

Escaping the quadratic wall: where the n² comes from, the kernel/associativity trick, the recurrent dual form, the recall catch, RWKV’s decay & gating, the Mamba/RetNet family, and hybrid models.

10 chapters9+ sims
NEW

xLSTM

The LSTM reborn: the two fatal flaws, saturating sigmoids, exponential gating + normalizer (sLSTM), matrix memory (mLSTM), parallelizability, the revision lab, the block, and the recurrent-revival family.

10 chapters9+ sims
NEW

RNN & GRU

One vector of memory: build the recurrence, watch its gradients die, then fix it with two gates — and train a GRU live.

10 chapters11 sims
NEW

RetNet

The impossible triangle: retention (attention minus softmax plus decay), and one mechanism computed three equivalent ways — parallel to train, recurrent to deploy, chunkwise to scale. Multi-scale heads & the family.

10 chapters9+ sims
NEW

Hyena & Long Convolutions

Attention by convolution: a sequence-length filter, made practical by implicit filters (any length, few params), the FFT (n log n), and data-controlled gating — plus the recurrence=convolution duality.

10 chapters9+ sims
NEW

Jamba

The hybrid that works: interleave mostly-Mamba layers with a few attention layers (for recall) plus MoE (for cheap capacity) — why a few attention layers suffice, the KV-cache memory win, and the hybrid era.

10 chapters9+ sims
NEW

Griffin & Hawk

Google DeepMind’s RNN-speed transformers: a gated linear recurrence (RG-LRU) for cheap global memory + local attention for sharp recall. Linear recurrence → parallel scan → stability → gating → the hybrid stack → constant-size inference.

10 chapters9+ sims
NEW

JEPA

Yann LeCun’s Joint Embedding Predictive Architecture: stop predicting pixels, predict meaning. Why pixel loss blurs → latent prediction → collapse & the EMA fix → predictor + mask tokens → masking → the full I-JEPA loop → world models.

10 chapters9+ sims
NEW

Perceiver & Perceiver IO

One architecture for any modality: funnel a huge input through a small latent bottleneck with cross-attention. The n² wall → latent workspace → cross-attention → latent thinking → Fourier position → iteration → arbitrary outputs via query arrays.

10 chapters9+ sims
NEW

Neural ODEs

Networks with infinite, continuous depth. A residual block is one Euler step — take the limit and depth becomes a flow field solved by an ODE solver: adaptive computation, O(1)-memory adjoint gradients, and the continuous-normalizing-flow ancestor of diffusion.

10 chapters9+ sims
NEW

KANs

Kolmogorov–Arnold Networks: flip the MLP — put learnable 1-D functions (splines) on the edges, let nodes just sum. The result is a network you can read, prune, refine, and turn into a symbolic formula.

10 chapters9+ sims
NEW

Liquid Neural Networks

Continuous-time neurons with input- and state-dependent dynamics. Leaky neurons, conditional stability, neural circuit policies, and closed-form CfC — including the 19-neuron steering controller behind a separate visual feature extractor. Test the trade-offs in a live tracking experiment.

10 chapters9+ sims
NEW

Whisper & Audio Transformers

How machines learned to hear: turn sound into a log-mel picture, run a vanilla transformer encoder-decoder over it, control the task with prompt tokens, and train on 680,000 hours of the messy internet. The audio front-end behind all modern speech models.

10 chapters9+ sims
NEW

Video Generation

Sora-style spacetime diffusion: compress video into a spacetime latent, chop it into patches spanning space and time, and denoise the whole clip with a diffusion transformer whose attention crosses frames — coherence by construction, plus emergent world-model behavior.

10 chapters9+ sims
NEW

Diffusion Policy

The denoising that paints images can drive a robot. Instead of regressing one action (and averaging multimodal demos into a crash), it generates an action chunk from noise — committing to a mode, conditioned on observations, replanned in a closed loop. The action head behind modern VLAs.

10 chapters9+ sims
NEW

Inkling 2 Small

Thinking Machines' 594B MoE with 17B active: NVFP4 pretraining, four training stages, one joint async RL run.

11 chapters12 sims
NEW

Inkling 2 Mini

A 26B looped MoE for laptops: the middle layers run three times, experts pruned then healed, trained in 4-bit.

11 chapters11 sims
NEW

Looped Transformers

Run the same layers several times per token: depth without parameters, gated messages, and test-time depth.

10 chapters10 sims
NEW

Attention Residuals

Replace the plain residual sum: each layer attends over earlier layer outputs and learns its own mix.

11 chapters11 sims
NEW

End-to-End 4-bit Training (NVFP4 and MXFP8)

The FP4 number line, block scales, MXFP4 against NVFP4, stochastic rounding, and why you train in what you ship.

11 chapters11 sims
NEW

MoE Expert Pruning and Healing

Cut a mixture of experts by usage, see what breaks, then heal it with distillation from a larger teacher.

10 chapters10 sims
Audio & Speech11
NEW

Audio Representations

The journey from a raw pressure wave to the log-mel spectrogram every audio model eats: sampling & Nyquist, the Fourier transform, the STFT, the spectrogram, and the mel/log perceptual scales — plus MFCCs and learned front-ends.

10 chapters9+ sims
NEW

Neural Audio Codecs

How EnCodec/SoundStream turn sound into discrete tokens a language model can generate: conv autoencoder, vector quantization, residual codebooks (coarse→fine, scalable bitrate), and the GAN that keeps it crisp. The bridge to AudioLM, MusicGen, VALL-E.

10 chapters8+ sims
NEW

TTS Architectures

From robotic to human: text frontend (G2P), acoustic model, vocoder, the alignment problem, and the one-to-many trick — through Tacotron, FastSpeech, VITS, and modern diffusion & codec-token TTS, plus voice cloning.

10 chapters8+ sims
NEW

Self-Supervised Speech

BERT for audio: Wav2Vec 2.0 & HuBERT learn speech from unlabeled sound by masking spans and predicting discrete speech units — so ten minutes of transcripts can train a recognizer. Pretrain+fine-tune, contrastive vs cluster-predict.

10 chapters8+ sims
NEW

Music Generation

From text prompt to song: tokenize audio, model long-range structure with semantic + acoustic tokens, the AudioLM hierarchy and MusicGen delay pattern, joint text-music embeddings, and diffusion approaches (Stable Audio). The capstone of the Audio track.

10 chapters8+ sims
NEW

Classical Audio Classification

It is 2008: no GPUs, no AudioSet. Design every feature by hand — MFCCs, spectral shape, zero crossings — then feed GMMs, HMMs and SVMs.

12 chapters12 sims
NEW

Audio LLMs

Encoder, adapter, language model: one system that listens to any sound and answers questions about it — plus the audio-as-tokens rival.

10 chapters10 sims
NEW

Acoustic Scene Classification

Hearing the place from the soundscape: log-mel spectrograms, device mismatch, tiny edge models, PaSST distillation.

10 chapters
NEW

DNN-HMM Hybrid Acoustic Models

Classic ASR: HMM sequences, GMM→DNN emissions, the posterior/prior trick, Viterbi forced alignment.

10 chapters
NEW

Turn-Taking, Endpointing & Barge-In

Deciding when the human is done talking is the hardest product problem in voice — energy VAD up to full-duplex models that dissolve the question.

10 chapters11 sims
NEW

Streaming Speech: Real-Time ASR & TTS

Rebuild recognition and synthesis under a stopwatch: causality, chunked attention masks by hand, incremental decoding, time-to-first-audio.

10 chapters12 sims
Modalities & Methods6
NEW

Point Clouds

Deep learning on unordered 3D point sets: permutation invariance via max pooling (PointNet), hierarchical local features (PointNet++), point transformers, and ICP registration. Where convolutions can’t go.

10 chapters7+ sims
NEW

Graph Neural Networks

Learning on nodes and edges via message passing: each node gathers neighbor messages, aggregates symmetrically, and updates. GCN, GAT, over-smoothing, and the unifying view (a transformer is a GNN on a full graph).

10 chapters8+ sims
NEW

City2Graph: Urban Data as Heterogeneous Graphs

The city was always a graph, not a table: buildings, streets, POIs and transit as typed nodes and edges, built with real GeoPandas-to-PyG pipelines a hetero-GNN can learn from.

10 chapterscity2graph
NEW

Time-Series Forecasting

Predicting the future with its uncertainty: lookback→horizon, trend/seasonality decomposition, probabilistic (quantile) forecasts, global models, N-BEATS, the Temporal Fusion Transformer, PatchTST, and zero-shot foundation models.

10 chapters9+ sims
NEW

Gaussian Processes

Fit a distribution over functions, not one curve — getting calibrated uncertainty for free. Kernels, conditioning, error bars, the n³ wall, and the broader uncertainty toolkit (deep ensembles, MC dropout, conformal prediction).

10 chapters9+ sims
NEW

Recommender Systems

The engines behind Netflix/Amazon/YouTube: matrix factorization, user & item embeddings, the two-tower retrieval model, the retrieve-then-rank funnel, DLRM, and hard problems (cold start, feedback loops). Personalization at billion-item scale.

10 chapters8+ sims
LLM Inference & Adaptation3
Training Foundations18
NEW

Loss Functions

MSE, cross-entropy, KL divergence, Huber, contrastive, triplet, InfoNCE — every loss derived from scratch with interactive comparisons.

10 chapters12+ sims
NEW

Optimizers

SGD, momentum, AdaGrad, RMSProp, Adam, AdamW, Lion, Sophia — every update rule derived, hand-computed, and raced head-to-head.

10 chapters14+ sims
NEW

Normalization

BatchNorm, LayerNorm, RMSNorm, GroupNorm, InstanceNorm, Pre-LN vs Post-LN — every variant derived, hand-computed, and raced in the Arena.

10 chapters12+ sims
NEW

Attention Variants

MHA, MQA, GQA, sliding window, linear attention, FlashAttention — every variant derived with memory arithmetic and raced in the Arena.

11 chapters14+ sims
NEW

Positional Encoding

Sinusoidal, RoPE, ALiBi, then the group theory proving only a few encodings exist, GRAPE, and how to ship one.

13 chapters13 sims
NEW

Activation Functions

Sigmoid, ReLU, GELU, SiLU/Swish, SwiGLU, Mish — every nonlinearity derived with dead neuron analysis and racing arena.

10 chapters12+ sims
NEW

Learning Rate Schedules

Warmup, step decay, cosine annealing, 1cycle, WSD — every schedule derived with loss landscape simulations and racing arena.

10 chapters12+ sims
NEW

Initialization

Xavier, He/Kaiming, orthogonal, transformer recipes — every method derived from variance preservation with deep network explorer.

10 chapters12+ sims
NEW

Gradient Flow

Vanishing/exploding gradients, clipping, accumulation, mixed precision, loss scaling, checkpointing — the complete stability toolkit.

10 chapters12+ sims
NEW

Skip Connections

ResNet residuals, Pre-LN vs Post-LN, DenseNet, Highway — why every modern architecture uses shortcuts and how to choose.

10 chapters12+ sims
NEW

Pooling & Aggregation

Max, average, GAP, CLS, mean, attention, GeM pooling — how to collapse features into fixed-size vectors for any task.

10 chapters12+ sims
NEW

Embedding Layers

Token, position, segment, patch embeddings — tied weights, scaling, subword effects, and the lookup tables behind every model.

10 chapters12+ sims
NEW

Training Loop Mechanics

Epochs, batches, DataLoaders, shuffling, the 6-step training loop, eval mode, common bugs — the complete anatomy of training.

10 chapters12+ sims
NEW

Data Augmentation

Flips, crops, color jitter, RandAugment, Mixup, CutMix, text augmentation, TTA — synthetic variations that prevent overfitting.

10 chapters12+ sims
NEW

Curriculum Learning

Difficulty scoring, Bengio’s classical curriculum, pacing functions, self-paced learning, teacher-student bandits, DoReMi data mixing — and when ordering doesn’t help.

10 chapters9+ sims
NEW

Contrastive Learning

Self-supervised vision without labels: InfoNCE, temperature, the projection head you throw away, MoCo’s queue, and how BYOL & DINO dodge collapse with no negatives.

10 chapters9+ sims
NEW

Knowledge Distillation

Teaching a small model to think like a giant: dark knowledge, temperature softening, the KD loss, feature & attention matching, self-distillation, DistilBERT, and the capacity-gap trap.

10 chapters9+ sims
NEW

Dropout Variants

Co-adaptation, the mask & inverted-dropout scaling, the ensemble view, spatial dropout, DropConnect, stochastic depth/DropPath, DropBlock — breaking your network on purpose to make it generalize.

10 chapters9+ sims
AI & Search2
Mathematics Foundations10
43

ML Maths: Linear Algebra

Every matrix in every model. Hand calculations, from-scratch Python, PyTorch, and 19 interactive visualizations. Scalars to SVD to backprop to numerical stability.

19 chapters19 sims
NEW

Rotations & Rigid Transforms

Why order matters, gimbal lock's exact failure point, Rodrigues' formula, quaternions and slerp, and chaining frames with SE(3) — with a live frame-chain lab.

10 chapters12+ sims
NEW

Recursion & the Call Stack

Self-similar problems solved by a function that calls itself: base cases, the call stack pushing and popping frames, and even_factorial derived and hand-traced — with a live Python Code Lab.

5 chaptersCode Lab
NEW

Eigenvalues & Eigenvectors

The directions a matrix only stretches. The characteristic equation by hand, the triangular shortcut, power iteration, and why eigenvalues decide the stability of dynamical systems.

6 chaptersCode Lab
NEW

ODEs → State-Space

From a mass-spring-damper to first-order state-space: the four damping regimes, the matrix form, and the discovery that the regimes are the eigenvalues hiding inside it. With an RK4 Code Lab.

5 chaptersCode Lab
NEW

The Hessian & Curvature

Second derivatives that tell a bowl from a dome from a saddle. The symmetric Hessian, the second-derivative test, and how Newton's method uses curvature to take a smarter step.

8 chaptersCode Lab
NEW

Jacobians & Linearization

A curved sensor looks flat once you zoom in close enough. The polar to Cartesian Jacobian by hand, a finite difference check, and a live lab comparing true versus linearized uncertainty.

10 chapters9+ sims
NEW

Bayes' Rule

Updating belief with evidence, from zero. The disease-test trap (a positive test is only fifty-fifty, not eighty), the base-rate effect, and a live posterior Code Lab.

6 chaptersCode Lab
NEW

Multivariate Gaussians & Covariance

A GPS fix is a blob, not a dot. The covariance ellipse from a 2×2 matrix by hand, Mahalanobis distance, conditioning as a Kalman update in disguise, and a live two-sensor fusion lab.

10 chapters9+ sims
NEW

Nonlinear Least Squares

Three noisy beacon ranges that never quite agree. Normal equations by hand, a hand-worked Gauss-Newton iteration, the Levenberg-Marquardt damping knob, Huber outlier rejection, and a live trilateration lab.

10 chapters9+ sims
Monte Carlo Methods7
NEW

Monte Carlo Simulation

Estimate the impossible by random sampling: the law of large numbers, the unavoidable square-root error law, why it shrugs off high dimensions, variance reduction — and how it prices options, traces light, and powers modern AI.

12 chapters12 sims
NEW

Importance Sampling

Sample from a proposal you can afford, then reweight to the truth — and watch a one-in-a-million event become reachable. The optimal proposal, effective sample size, rare-event tilting, off-policy RL, and importance-sampled rendering.

11 chapters11 sims
NEW

Quasi-Monte Carlo

Stop scattering points at random — place them deterministically to fill space evenly, and watch integration error fall from one-over-root-N toward one-over-N. Discrepancy, van der Corput, Halton & Sobol, Koksma–Hlawka, effective dimension, and randomized QMC.

12 chapters12 sims
NEW

Markov Chain Monte Carlo

When you can’t sample a distribution, build a random walk that visits its points in the right proportions — then just average. Metropolis–Hastings, Gibbs, detailed balance, burn-in & mixing, autocorrelation & R-hat, and the Ising lattice where it was born.

12 chapters12 sims
NEW

Hamiltonian & Langevin Monte Carlo

Stop wandering — use the gradient of the log-probability to glide across high-dimensional distributions in long, high-acceptance jumps. The score, momentum & leapfrog, NUTS, Langevin & MALA — and how score-based diffusion models are Langevin sampling in disguise.

13 chapters13 sims
NEW

Sequential Monte Carlo

When one proposal isn’t enough: march a weighted swarm of particles through a ladder of distributions, resampling to survive — and read off the normalizing constant nobody else can. Degeneracy & resampling, tempering, annealed importance sampling, and Bayesian model evidence.

12 chapters12 sims
NEW

Monte Carlo Tree Search

When you can’t evaluate every move, search only the promising ones — grow a tree by playing the game out at random, then let the wins steer where you look next. The four phases, UCT exploration, AlphaGo → AlphaZero → MuZero, and LLM reasoning as search (Tree of Thoughts, rStar-Math).

12 chapters12 sims
Evaluation & Analytics9
NEW

Summarizing Distributions

The average salary is $68k and almost nobody earns near it. What a percentile actually is, mean vs median, IQR, the CDF/ECDF, box & violin plots, and why heavy tails make the average lie — descriptive statistics from absolute zero.

11 chapters9 sims
NEW

The Statistics of Evaluation

Is that benchmark delta real or a coin flip? Standard errors, confidence intervals, the bootstrap, McNemar, power, and multiplicity — the statistics that separate signal from sampling noise.

11 chapters9 sims
NEW

Metric Design

A 99%-accurate fraud detector that catches no fraud is a metric you designed badly. Confusion matrices, ROC/PR, calibration, NDCG, aggregation traps, and Goodhart’s law.

11 chapters9 sims
NEW

Plots That Tell the Truth

The same numbers can be plotted into opposite conclusions. Histogram traps, honest error bars, log-log scaling fits, and a lie-detector toolkit for every eval plot you read or make.

11 chapters9 sims
NEW

Experiment Design & A/B Testing

Your feature ‘improved’ retention — because it launched before a holiday. Randomization, power & MDE, the peeking problem, CUPED, switchbacks, and why offline wins vanish online.

11 chapters9 sims
NEW

Regression Testing & Quality Gates

Your tests are green and your model is broken. Golden sets, statistical release gates, PSI/KS drift alarms, canary & shadow, and the rollback machinery that stops bad models from shipping.

11 chapters9 sims
NEW

Evaluating Estimators, Fusion & Robots

Two Kalman filters, identical RMSE — one is lying about its confidence. NEES & NIS consistency, the Cramér–Rao bound, SLAM ATE/RPE, and honest robot success-rate intervals.

11 chapters9 sims
NEW

Evaluating Generative Models

Classification has an answer key; generation has a taste problem. pass@k, Bradley–Terry & Elo, FID from scratch, judge-bias quantified, and inter-rater kappa — for LLMs, VLMs, and diffusion.

11 chapters9 sims
NEW

The Metrics Ladder

Your model gained 2 points and revenue dropped. Climb from module metric to P&L: driver trees, guardrails & SLOs, funnels, error analysis, and exec-ready launch memos.

11 chapters9 sims
Classical Machine Learning11
NEW

Linear Regression & LMS

The first ML algorithm done right. Fit a line, score it with squared error, then minimize two ways: roll downhill with the LMS rule (batch & SGD) and jump to the exact answer with the normal equations — and discover least squares is maximum likelihood under Gaussian noise.

11 chapters9+ sims
NEW

Logistic Regression & Perceptron

How a line learns to say yes/no. Squash a score into a probability with the sigmoid, derive cross-entropy from maximum likelihood, meet the update rule that's identical to LMS, then extend to the perceptron, softmax for many classes, and Newton's method.

10 chapters8+ sims
NEW

Locally-Weighted Logistic Regression

Re-fit a fresh classifier around every query point, trusting nearby data more. The Gaussian kernel, Newton's method, and the bandwidth as a bias/variance knob — the showcase Code Lab repaints the decision boundary as you turn it.

6 chaptersCode Lab
NEW

Generalized Linear Models

One recipe that produces linear regression, logistic regression, softmax, and Poisson regression. The exponential family, why the sigmoid is forced not chosen, the three-line GLM recipe, and the single gradient every GLM shares. The framework that explains the mystery.

10 chapters7+ sims
NEW

Generative Learning: GDA & Naive Bayes

The other half of classification: model what each class looks like, then flip with Bayes. Gaussian Discriminant Analysis (its posterior is secretly a sigmoid), generative vs discriminative trade-offs, and the Naive Bayes spam filter that defined an era — plus Laplace smoothing.

10 chapters7+ sims
NEW

Bias, Variance & Double Descent

Why a model that fits perfectly can predict garbage — and why making it even bigger can fix it. Test error decomposed into bias, variance, and noise; the classical U-curve and its sweet spot; then double descent and the implicit regularization behind modern deep learning, simulated live in your browser.

10 chapters8+ sims
NEW

Model Selection & Regularization

How to actually find the sweet spot without cheating. The golden rule (train/validation/test), the cross-validation family (hold-out, k-fold, leave-one-out), regularization as a continuous complexity dial, L1 vs L2 (shrink vs select), and the Bayesian view where regularization is a prior.

10 chapters9+ sims
NEW

k-Means Clustering

Finding hidden groups when nobody labeled them — the first unsupervised algorithm. The assign/average two-step dance, the distortion it minimizes, why it always converges (and to a local minimum), choosing k with the elbow, and where its spherical assumption breaks.

9 chapters8+ sims
NEW

EM & Gaussian Mixture Models

k-means, leveled up: soft probabilistic clustering with stretchable elliptical groups. The mixture model, the chicken-and-egg problem, the E-step (Bayes’ responsibilities) and M-step (weighted re-fit), why it converges, and how k-means is just EM with hard assignments and fixed spheres.

9 chapters7+ sims
NEW

Principal Component Analysis

Squeeze high-dimensional data down to the few directions that matter, via one eigenvector calculation. Centering, the max-variance projection, the covariance matrix, principal components as its eigenvectors, reduction & reconstruction, and applications from eigenfaces to noise removal.

9 chapters7+ sims
NEW

Independent Component Analysis

Unmix what was blended — the cocktail party problem. The mixing model x=As, finding the unmixing W, independence as the criterion, why ICA needs non-Gaussian sources, a live un-mixing lab, and how ICA differs from PCA (independence beats uncorrelatedness).

9 chapters7+ sims
Language Modeling from Scratch17
Lec 1

Overview & Tokenization

From-scratch LM motivation, the CS336 pipeline, and building BPE tokenizers from character/byte/word up.

10 chapters7 sims
Lec 2

PyTorch & Resource Accounting

Tensors, fp32/bf16/fp8, FLOP counting, the 6ND rule, optimizer & activation memory, the training loop.

10 chapters6 calculators
Lec 3

Architectures & Hyperparameters

Pre-norm, RMSNorm, SwiGLU, RoPE, GQA, FFN ratios — every modern LLM architecture choice, derived.

10 chapters5 canvases
Lec 4

Mixture of Experts

Mixture of Experts: top-k gating, load-balance loss, expert capacity, router z-loss. DeepSeek, Mixtral, Llama 4.

10 chapters5 canvases
Lec 5

GPUs

Arithmetic intensity, the roofline model, memory coalescing, tiling, and fusion — why GPUs idle and how to fix it.

10 chapters5 canvases
Lec 6

Kernels & Triton

HBM traffic, kernel fusion, writing a fused Triton kernel, and FlashAttention's online-softmax recurrence.

10 chapters5 canvases
Lec 7

Parallelism I: Data & Tensor

Collective ops, data parallelism, ZeRO 1–3, ring all-reduce, tensor parallelism, and memory accounting.

10 chapters5 canvases
Lec 8

Parallelism II: Pipeline & FSDP

Pipeline parallelism, the bubble formula, GPipe vs 1F1B, FSDP/ZeRO-3, and sequence parallelism.

10 chapters5 canvases
Lec 9

Scaling Laws I: The Basics

Compute-optimal scaling: C=6ND, the loss law, IsoFLOP curves, Chinchilla, and the D=20N rule.

10 chapters5 canvases
Lec 10

Inference

Prefill vs decode, KV-cache sizing, the roofline, KV compression, speculative decoding, and quantization.

10 chapters5 canvases
Lec 11

Scaling Laws II: Details & Methodology

Parametric loss fits, IsoFLOP profiling, the three Chinchilla methods, WSD, muP transfer, data-limited scaling.

10 chapters5 canvases
Lec 12

Evaluation: How Good Is Your Model?

Perplexity, multiple-choice scoring, majority vote, best-of-N, Elo, and contamination across MMLU, GPQA, Arena.

10 chapters5 canvases
Lec 13

Data I: Sources & The Pipeline

Where LLM corpora come from: Common Crawl, WARC vs WET, HTML→text extraction, the data-mix problem, copyright.

10 chapters5 canvases
Lec 14

Data II: Filtering & Deduplication

Cleaning web text: KenLM & fastText filtering, DSIR, Bloom filters, MinHash, and LSH deduplication.

10 chapters5 canvases
Lec 15

Alignment I: SFT & RLHF

Post-training: SFT, Bradley-Terry preferences, the RLHF KL objective, PPO, and the DPO loss derived.

10 chapters5 canvases
Lec 16

Alignment II: RLVR & GRPO

RLVR with verifiable rewards: REINFORCE, baselines, GRPO group advantage. DeepSeek-R1, Kimi, Qwen 3.

10 chapters5 canvases
Lec 17

Alignment III: Policy Gradients & the RL Frontier

Policy gradients from scratch: the PG theorem, REINFORCE variance, baselines, GAE, PPO clip, GRPO. Series capstone.

10 chapters5 canvases
Principles of Robot Autonomy15
Lec 1

The See-Think-Act Loop & the Autonomy Stack

The four-module autonomy stack and the perception–action loop that ties it together — map representations, finite-state-machine executives, and a full gridworld stack you can break.

10 chapters6 sims · 3 labs
Lec 2

Rigid-Body Transforms, SE(2) & Wheeled Kinematics

From “turn 30°” to wheel speeds: rotation matrices, SE(2) frames, holonomic vs nonholonomic constraints, and the unicycle & differential-drive models you integrate yourself.

11 chapters11 sims · 3 labs
Lec 3

Motion Planning I: Configuration Space & A*

Turn a robot+obstacles into a point searching a graph: C-space inflation, Dijkstra, admissible heuristics, and A* — run by hand on a grid, then built and flooded yourself.

11 chapters8 sims · 3 labs
Lec 4

Sampling-Based Planning: PRM, RRT & RRT*

When grids explode in high dimensions, sample instead: build a roadmap, grow a rapidly-exploring tree, and rewire it to optimality — you implement nearest, steer, and choose-parent yourself.

11 chapters9 sims · 3 labs
Lec 5

Trajectory Optimization & Differential Flatness

A planner gives waypoints; a robot needs a smooth, timed, dynamically-feasible trajectory. Polynomial trajectories, differential flatness (recover v & ω from the path), and the min-snap QP.

11 chapters9 sims · 3 labs
Lec 6

Trajectory Tracking: PID & LQR

Open-loop drifts; feedback corrects. Error dynamics, P/PI/PID, pole placement, and LQR via the Riccati equation — build the controllers and watch them track a path through a disturbance.

11 chapters8 sims · 3 labs
Lec 7

Robot Sensors: IMU, LiDAR, Point Clouds & ICP

What robots measure and how it goes wrong: encoder odometry, gyro drift, LiDAR scans, line extraction, and Iterative Closest Point — you integrate a biased gyro and align two scans with SVD.

12 chapters8 sims · 3 labs
Lec 8

Camera Models & Calibration

How a camera turns 3D into pixels: the pinhole model, intrinsics K, extrinsics, the full projection P=K[R|t], lens distortion, and calibration — you project a cube and calibrate from correspondences.

11 chapters9 sims · 3 labs
Lec 9

Structure from Motion: Features & RANSAC

Recover 3D from images: Harris corners, descriptor matching, epipolar geometry, RANSAC robust fitting (N=log(1−p)/log(1−wₛ)), triangulation and stereo depth Z=fB/d — built by hand.

12 chapters9 sims · 3 labs
Lec 10

Learning-Based & Semantic Perception

From corners to meaning: template matching, IoU & non-max suppression, convolution as a learned filter, detectors and segmentation — and how a detection becomes an FSM input that stops the robot.

11 chapters8 sims · 3 labs
Lec 11

SLAM: Factor Graphs & Pose-Graph Optimization

Build a map and localize in it at once: EKF-SLAM and its growing correlations, factor graphs, Gauss-Newton on a pose graph, sparsity, and loop closure that snaps drift away — built by hand.

12 chapters10 sims · 3 labs
Lec 12

Occupancy Mapping & Frontier Exploration

Build a free/occupied map from noisy range scans via log-odds and ray-casting, then explore autonomously: detect frontiers, score them by information gain vs cost, and cover the unknown.

11 chapters8 sims · 3 labs
Lec 13

Recursive Estimation: Kalman, EKF & UKF

Fuse a noisy prediction with a noisy measurement: the Bayes filter, Gaussians, the Kalman gain as a trust dial, EKF Jacobians for nonlinear models, EKF-localization, and the unscented transform.

12 chapters7 sims · 3 labs
Lec 14

Particle Filters & Monte Carlo Localization

When the belief is multimodal a Gaussian can't capture, use a cloud of weighted samples: predict, weight, resample. Monte Carlo Localization, the kidnapped robot, and N​eff — built from scratch.

11 chapters10 sims · 3 labs
Lec 15

The Frontier: Imitation, VLAs, 3DGS & World Models

Series capstone. Behavior cloning & the O(εT²) distribution-shift trap, DAgger, diffusion policies, Vision-Language-Action models, 3D Gaussian Splatting, and world models — where the classical stack meets learning.

11 chapters9 sims · 3 labs
OpenClaw — Anatomy of an Agent Gateway11
01

The Gateway

Why one long-lived daemon owns the stateful provider connections, and everything else — operator clients, capability nodes, seven chat surfaces — is a thin client of it.

8 chapters3 sims · 3 labs
02

The Wire Protocol

A typed request/response/event grammar over one WebSocket: the handshake, discovery, idempotent retries, and gap-detecting sequence numbers.

8 chapters2 sims · 3 labs
03

Auth, Pairing & Trust

Capability-based trust: keypair device identity, challenge-nonce signing, role/scope RBAC, pairing approval — and what auth actually protects.

9 chapters1 sim · 3 labs
04

The Agent Loop

The run as a serialized state machine — intake to context to inference to tools to stream to persist — with hooks, timeouts, and four ways to end.

9 chapters2 sims · 3 labs
05

Context & Streaming

What the model sees and how you see it back: layered prompt assembly under a cache boundary, and block-and-preview reply streaming.

9 chapters2 sims · 3 labs
06

The Command Queue

Lane-aware concurrency: per-session FIFO plus global caps, and the steer / followup / collect / interrupt modes for messages that arrive mid-run.

9 chapters2 sims · 3 labs
07

Sessions & Multi-Agent

State partitioning and routing at scale: session keying and isolation, lifecycle and pruning, and the most-specific-wins agent router.

9 chapters2 sims · 3 labs
08

Agent Memory

How a stateless model gets durable memory: a file-backed hierarchy, hybrid vector-plus-keyword search, and a dreaming process that consolidates what matters.

9 chapters2 sims · 3 labs
09

Self-Healing & Reliability

Treat failure as normal: retries with backoff and jitter, model failover chains, context-overflow compaction, and diagnostics that recover on their own.

9 chapters2 sims · 3 labs
10

Tools, Exec-Approvals & Sandboxing

The hard enforcement fence: the five-mode exec ladder, the allowlist, exec-approval flow, and sandbox modes that decide whether a command runs.

9 chapters2 sims · 3 labs
11

Skills, Plugins & Automation

The four extension surfaces: skills loaded on demand, plugins, hooks that fire on events with precedence, and cron jobs on a schedule. The finale.

9 chapters2 sims · 3 labs
Flow Matching & Diffusion Models6
Introduction to Robot Learning25
Lec 1

What Is Robot Learning?

Sequential decisions in the physical world: the closed loop, the compounding-error trap that breaks naive imitation, the robot data problem, the four pillars, and a preview of the whole course.

10 chapters6 sims · 3 labs
Lec 2

Robot Learning: An Overview

The agent–environment loop and the reward hypothesis, a policy as a state→action map, the ladder of methods from imitation to RL, known vs learned worlds, and high-level plans over low-level skills.

9 chapters5 sims · 3 labs
Lec 3

ML / DL Refresher, Part 1

Supervised learning, loss & empirical risk, linear and logistic regression by hand, gradient descent and the learning rate, overfitting, the bias–variance tradeoff, and regularization.

10 chapters5 sims · 3 labs
Lec 4

ML / DL Refresher, Part 2

Why depth and nonlinearity, the MLP and backprop by hand, optimizers from SGD to Adam, CNNs, attention and Transformers, generative models, and knowing when the model is uncertain.

10 chapters8 sims · 3 labs
Lec 5

MDP Basics & Imitation Learning, Part 1

The MDP tuple, policies and trajectories, discounted return and value functions, the Bellman idea, and behavior cloning — plus why copying an expert is not standard supervised learning.

10 chapters5 sims · 3 labs
Lec 6

Imitation Learning, Part 2

DAgger and how it beats the quadratic cost, privileged teachers, GAIL as distribution matching with a discriminator, and Diffusion Policy for multimodal demonstrations.

10 chapters7 sims · 3 labs
Lec 7

RL Basics: Value & Policy Iteration

Value and Q functions, the Bellman expectation and optimality equations derived, dynamic programming — policy evaluation, policy improvement, policy iteration and value iteration — worked by hand on a gridworld.

10 chapters6 sims · 3 labs
Lec 8

Q-Learning & Variants

Model-free control from samples: Monte Carlo vs TD, SARSA vs Q-learning and the off-policy max, ε-greedy exploration, the cliff, and DQN's replay buffer and target network that tame the deadly triad.

10 chapters7 sims · 3 labs
Lec 9

Policy Gradient Methods

Optimize the policy directly: the log-derivative trick, the policy gradient theorem, REINFORCE, why the estimator is unbiased but high-variance, and reward-to-go and baselines that calm it down.

10 chapters5 sims · 3 labs
Lec 10

Actor-Critic Methods

A learned critic cuts policy-gradient variance: the advantage function, the TD error, two networks in one loop, and the n-step / GAE dial that trades bias against variance.

10 chapters6 sims · 3 labs
Lec 11

Advanced RL: TRPO, PPO, DDPG & SAC

The biggest safe step: natural gradients and the KL trust region, PPO's clipped surrogate, deterministic off-policy control with DDPG/TD3, and maximum-entropy RL with SAC — mapped on one 2×2 grid.

10 chapters6 sims · 3 labs
Lec 12

Model-Based Control Basics

When you know the physics: state-space models, feedback, PID, stability from eigenvalues, and LQR — the optimal linear controller — with the Riccati recursion worked by hand.

10 chapters5 sims · 3 labs
Lec 13

Optimal Control & Planning, Part 1

Plan a whole control sequence: shooting vs collocation, the LQR backward pass derived line by line, and iLQR / DDP — linearize, solve LQR, repeat — plus sequential convex programming.

10 chapters5 sims · 3 labs
Lec 14

Optimal Control & Planning, Part 2

When you can't write the equations: MPC and replanning, random shooting, the cross-entropy method and MPPI, and learned-model RL — PILCO, PETS ensembles, and MBPO.

11 chapters5 sims · 3 labs
Lec 15

Deep Model-Based RL: Dreamer & TD-MPC

Learn a latent world model from pixels and plan inside it: Dreamer's learning-in-imagination, TD-MPC's plan-in-latent with a learned value, and how model error compounds over a rollout.

10 chapters3 sims · 3 labs
Lec 16

Learning Structured World Models

Guest lecture: model dough, beans, and fluids as particles plus relations and learn the dynamics with a graph network — message passing, permutation-equivariance, and planning with a learned simulator.

11 chapters3 sims · 3 labs
Lec 17

Offline Reinforcement Learning

Guest lecture: learn from a fixed log with no new interaction — the out-of-distribution overestimation death spiral, and the fixes: policy constraints, conservatism (CQL), in-sample IQL, and Diffuser.

10 chapters6 sims · 3 labs
Lec 18

Inverse Reinforcement Learning

Recover the reward from demonstrations: why it's ambiguous, feature matching, max-margin, and the maximum-entropy principle — the least-committal reward that explains the expert.

10 chapters6 sims · 3 labs
Lec 19

Bandits & Preference-Based Learning

The cleanest explore–exploit problem: regret, ε-greedy, UCB optimism, Thompson sampling, and dueling bandits / preference learning — the foundation under RLHF.

11 chapters5 sims · 3 labs
Lec 20

Exploration in Reinforcement Learning

When rewards are sparse and random actions never stumble onto them: count-based bonuses, curiosity as prediction error, the noisy-TV trap, and Random Network Distillation.

11 chapters3 sims · 3 labs
Lec 21

Robot Simulation & Sim2Real

The reality gap: why a sim-perfect policy falls on the real robot, domain randomization (reality is just sim #10,001), system identification, and champion-level drone racing.

10 chapters5 sims · 3 labs
Lec 22

Safe RL & Safe Robot Learning

When you can't learn from the crash: constrained MDPs, safe exploration, control barrier functions, and safety filters that project any unsafe action onto the nearest safe one.

10 chapters3 sims · 3 labs
Lec 23

Multi-Task, Adaptive & Transferable Learning

Adapt within a step: teacher–student distillation, RMA inferring terrain from recent motion, and Neural-Fly's online residual adaptation for agile flight in wind.

11 chapters4 sims · 3 labs
Lec 24

Foundation Models in Robotics

Guest lecture: borrow the web's common sense — SayCan's say×can grounding, CLIPort, RT-1's tokenized actions, Code-as-Policies, and the move toward vision-language-action models.

10 chapters5 sims · 3 labs
Lec 25

Course Summary: The Robot-Learning Spine

The capstone: the two hard problems revisited, one map from imitation to foundation models, a method-selection decision tree, honest tradeoffs, and the open frontier.

10 chapters7 sims · 3 labs
Sensor Fusion: Classical to Modern22
Lec 1

The Fusion Problem: Why Fuse At All

Why no single sensor is enough: complementary vs competitive vs cooperative fusion, the fusion levels, and the reliability paradox — more sensors isn't always more robust.

11 chapters7 sims · 3 labs
Lec 2

Fusion Architectures & the JDL Model

Where and how to combine: the JDL levels, centralized vs distributed vs decentralized, and the double-counting trap — correlated estimates that fool the fused covariance into overconfidence.

11 chapters7 sims · 3 labs
Lec 3

Combining Two Measurements

The seed of all fusion: the inverse-variance weighted average. Trust each source by its precision; the fused estimate is always sharper — and it's secretly the Kalman update.

11 chapters7 sims · 3 labs
Lec 4

The Bayes Filter

Fusion over time: keep a belief, predict it forward (it blurs), then fuse each new measurement via Bayes' rule (it sharpens). The recursive engine behind every filter that follows.

11 chapters6 sims · 3 labs
Lec 5

The Kalman Filter as Optimal Fusion

The Bayes filter for linear-Gaussian worlds: fuse a model prediction with a measurement, each weighted by its uncertainty. The Kalman gain is the trust dial — recursive inverse-variance fusion.

11 chapters6 sims · 3 labs
Lec 6

Complementary Filters & AHRS

The cheapest fusion: blend a fast-but-drifty gyro with a slow-but-stable accel/mag by frequency — high-pass the gyro, low-pass the reference. Madgwick & Mahony attitude estimators.

11 chapters6 sims · 3 labs
Lec 7

The Extended Kalman Filter

Nonlinear fusion: linearize the model with its Jacobian, then run the Kalman machinery — fusing IMU motion with range/bearing GPS. The workhorse of real navigation.

11 chapters6 sims · 3 labs
Lec 8

The Unscented Kalman Filter

Skip the Jacobian: pick a few sigma points, push them through the true nonlinearity, and recover the fused mean and covariance. More accurate than the EKF, derivative-free.

11 chapters5 sims · 3 labs
Lec 9

The Information Filter

The Kalman filter inside-out: track information (inverse covariance) instead of covariance. Fusion becomes simple addition — the key that unlocks decentralized, multi-sensor networks.

11 chapters7 sims · 3 labs
Lec 10

The Particle Filter

When the world isn't Gaussian: represent the belief with a swarm of weighted samples. Predict, weight by the measurement, resample — non-parametric fusion that powers Monte Carlo Localization.

11 chapters6 sims · 3 labs
Lec 11

Covariance Intersection

Fusing estimates that secretly share information: when the correlation is unknown, naive fusion grows overconfident and diverges. CI stays consistent for any correlation — the key to decentralized fusion.

11 chapters7 sims · 3 labs
Lec 12

Data Association

The dodged half of fusion: which measurement updates which track? Validation gating, global nearest-neighbor, JPDA and MHT — because one wrong correspondence makes the best filter fuse garbage and diverge.

12 chapters6 sims · 3 labs
Lec 13

IMU & Inertial Navigation

The sensor everything fuses with: what gyros and accelerometers really measure (specific force, not acceleration), strapdown mechanization, and why an unaided IMU's position error explodes as t³.

11 chapters5 sims · 3 labs
Lec 14

INS/GNSS Coupling

Bounding inertial drift with absolute fixes: loose vs tight vs deep coupling, and the error-state Kalman filter that fuses a high-rate IMU with low-rate GNSS — coasting through tunnels, snapping back on reacquisition.

11 chapters7 sims · 3 labs
Lec 15

Calibration & Time Sync

The silent prerequisite for all fusion: get the sensor-to-sensor transform (hand-eye AX=XB) or the clock offset wrong and your optimal filter quietly diverges. Spatial + temporal calibration, observability, Kalibr.

11 chapters7 sims · 3 labs
Lec 16

Visual-Inertial Odometry

The complementary masterpiece: a camera and an IMU cover each other's blind spots — and the IMU's metric acceleration resolves the monocular scale. MSCKF, VINS-Mono, and IMU preintegration.

11 chapters5 sims · 3 labs
Lec 17

LiDAR-Inertial & Factor Graphs

Fusing precise 3-D LiDAR with the IMU that de-skews it — and the factor graph that unifies it all. Point-to-plane registration, LIO-SAM vs FAST-LIO2, iSAM2, and degeneracy detection.

11 chapters5 sims · 3 labs
Lec 18

Multimodal Driving Fusion

Camera, LiDAR, and radar in a self-driving stack: their complementary blind spots, the early/mid/late fusion question, PointPainting, and the Bird's-Eye-View revolution (Lift-Splat-Shoot).

11 chapters6 sims · 3 labs
Lec 19

Transformer & BEV Fusion

When attention learns where to fuse: BEVFormer, BEVFusion, and TransFusion replace hand-designed projection with soft cross-modal attention — gracefully down-weighting a blinded or miscalibrated sensor.

10 chapters6 sims · 3 labs
Lec 20

Learned & Differentiable Filters

The frontier: keep the Bayesian filter's structure but learn the parts you don't know. KalmanNet learns the gain, BackpropKF learns the measurement uncertainty — model-based deep learning.

11 chapters7 sims · 3 labs
Lec 21

Debugging & Consistency

The capstone skill: how to know your fusion works. NEES/NIS chi-square tests, innovation whiteness, and robust costs (Huber, DCS, switchable constraints) that catch the silent killer — overconfidence.

12 chapters5 sims · 3 labs
Atlas

The Sensor Fusion Atlas

The ultimate map: an interactive concept graph wiring all 21 methods together, a 1960–2024 historical timeline, and the full curated reference library. One page for the whole journey.

connections · timeline · refsinteractive map
Visual Navigation for Autonomous Vehicles14
Lec 1

3D Geometry: Rotations & Transforms

Frames, rotation matrices SO(3), Euler angles & gimbal lock, axis-angle, quaternions, and SE(3) transforms.

10 chapters5 canvases
Lec 4–5

Lie Groups: SO(3), SE(3) & exp

Lie groups for optimizing over rotations: so(3), hat/vee, the exp & log maps, the SE(3) Jacobian, BCH, retraction.

10 chapters6 canvases
Lec 6–7

Control: PID, LQR & Geometric

Control: state-space stability, PID, LQR via Riccati, quadrotor dynamics, and geometric attitude control on SO(3).

10 chapters5 canvases
Lec 8–10

Trajectory Optimization: Minimum-Snap & Differential Flatness

Minimum-snap trajectories: smoothness as derivative minimization, the QP formulation, and differential flatness.

10 chapters5 canvases
Lec 11

Image Formation: Pinhole Camera Model

Pinhole projection (x=fX/Z), intrinsic matrix K, extrinsics [R|t], full pipeline P=K[R|t], back-projection, and lens distortion.

10 chapters5 canvases
Lec 12–13

Feature Detection & Tracking

Corners vs edges, structure tensor G, Harris & Shi-Tomasi, SIFT descriptors, ratio-test matching, KLT optical flow.

10 chapters5 canvases
Lec 14

Two-View Geometry: Epipolar & SfM

Epipolar constraint, essential matrix E=[t]×R, fundamental matrix F, 8-point algorithm, 4-fold R,t ambiguity, cheirality, triangulation, scale ambiguity.

10 chapters5 canvases
Lec 15

RANSAC: Robust Estimation Amid Outliers

Minimal sample → fit → count inliers → keep best → refit; iteration formula N=log(1−p)/log(1−ws); threshold tradeoffs; sample sizes line=2/homography=4/E=8.

10 chapters5 canvases
Lec 16–18

Estimation & Nonlinear Least Squares

MLE → weighted LS; normal equations (ATA)x=ATb; Jacobian as sensitivity matrix; Gauss-Newton linearize-and-step; LM damping λI trust-region; covariance = (JTΩJ)−1.

10 chapters5 canvases
Lec 18–19

Optimization on Manifolds

SO(3)/SE(3) as curved surfaces; tangent space; retraction R·exp(δ); ⊞/⊝ operators; on-manifold GN: perturb in tangent → solve → retract; rotation averaging; singularity-free local coords.

10 chapters5 canvases
Lec 20

Visual-Inertial Odometry (VO/VIO)

VO pipeline: track → relative pose → chain SE(3); drift & why it compounds; monocular scale ambiguity; IMU accelerometer & gyro; bias double-integration; VIO fusion; IMU preintegration ΔR/v/p; tight vs loose coupling.

10 chapters5 canvases
Lec 21–22

Place Recognition: Bag-of-Words & Loop Closure

Image retrieval framing; visual vocabulary via k-means; BoW histogram; TF-IDF weighting; vocab tree + inverted index; cosine similarity ranking; geometric verification (RANSAC); precision-over-recall; perceptual aliasing; DBoW2/FAB-MAP.

10 chapters5 canvases
Lec 23–24

SLAM: Factor Graphs & Sparsity

Factor graph = poses + landmarks + factors; MAP → sparse NLLS; odometry, landmark, loop-closure factors; sparsity from local measurements; Hessian block pattern; sparse Cholesky & variable ordering; bundle adjustment; smoothing vs filtering; marginalization & Schur complement fill-in.

10 chapters5 canvases
Lec 29–30

Robust SLAM & Frontiers

M-estimators (Huber, Cauchy, TLS), influence functions, IRLS, non-convexity & local minima, GNC annealing, switchable constraints, PCM, SE-Sync certifiability; frontiers: NeRF/Gaussian maps, learned features, semantic SLAM, multi-robot, LiDAR, event cameras; full VNAV series cheat sheet.

10 chapters5 canvases
CAPSTONE

The Estimation–Learning Merger

Where the two halves meet: differentiable filters, neural nets inside Kalman skeletons, KalmanNet's learned gain, transformers that filter in their forward pass, and FoundationStereo front-ends on factor-graph back-ends — gated by chi-squared consistency.

10 chapters9+ sims
FIELD GUIDE

State, Doubt & Learning Machines

The whole arc — Kalman filters to robot foundation models — plus a build ladder of 8 runnable in-browser Python labs: implement a Kalman filter, EKF Jacobian, unscented transform, particle filter, pose-graph SLAM, VIO bias estimation, Q-learning vs SARSA, and a diffusion policy yourself.

4 chapters8 code labs
TinyML & Efficient Deep Learning20
Lec 1

Introduction: Why Efficiency Matters

A 175 billion parameter model needs 350 GB at 16 bits, and a phone has 4 GB.

11 chaptersMIT 6.5940
Lec 2

Basics of Neural Networks

AlexNet holds 61 million weights but does 724 million multiply-adds, and the two live in different layers.

12 chaptersMIT 6.5940
Lec 3

Pruning and Sparsity I

Han et al. cut AlexNet from 61 M to 6.7 M weights, 9× fewer. Yet a GPU only runs faster when the zeros follow a pattern it can skip.

12 chaptersMIT 6.5940
Lec 4

Pruning and Sparsity II

Prune each layer by its own amount, found by search, and MobileNet does half the work for 0.1 points of accuracy.

11 chaptersMIT 6.5940
Lec 5

Quantization I

Store a network's weights in 2 bits, not 32, and a layer shrinks 3.2 times.

12 chaptersMIT 6.5940
Lec 6

Quantization II

One scale for a whole layer sinks MobileNetV1 from 70.9% to 0.1% at 8 bits. A scale per channel lifts it to 59.1%.

11 chaptersMIT 6.5940
Lec 7

Neural Architecture Search I

A tiny search space already holds 3.2 × 1011 networks. A search tries a few hundred of them and returns one that fits your budget.

12 chaptersMIT 6.5940
Lec 8

Neural Architecture Search II

Designing a fresh network for every phone, GPU and chip costs 40,000 GPU hours each.

12 chaptersMIT 6.5940
Lec 9

Knowledge Distillation

A hard label says cat 1, dog 0. A teacher says cat 0.971, dog 0.018, car 0.011, and the small gaps hold what it knows.

11 chaptersMIT 6.5940
Lec 10

MCUNet: TinyML on Microcontrollers

MobileNetV2 needs 1,372 kB of working memory. A tiny chip has 256 kB.

12 chaptersMIT 6.5940
Lec 11

TinyEngine and Parallel Processing

A plain matrix multiply takes 24,296 ms. Reorder three loops and it takes 1,979 ms, 12 times faster, with the same arithmetic.

11 chaptersMIT 6.5940
Lec 12

Transformers and LLMs

Every new word an LLM writes re-reads a cache of all earlier words.

12 chaptersMIT 6.5940
Lec 13

LLM Quantization and Deployment

A 7B model's weights take 3.4 GB in 4 bits instead of 13.4 GB, so decoding can run about 4 times faster.

12 chaptersMIT 6.5940
Lec 14

LLM Post-Training

Teaching a base model new manners costs one full 13.5 GB copy per task.

12 chaptersMIT 6.5940
Lec 15

Long-Context LLMs

A chatbot can talk forever if its memory stays small.

12 chaptersMIT 6.5940
Lec 16

Vision Transformers

Why ViTs get costly at high resolution, and the fixes: window, linear and sparse attention, then parallel image generation.

12 chaptersMIT 6.5940
Lec 17

Diffusion Models I

Add noise in a thousand steps, train a network to undo it, then cut the bill: fewer steps, a smaller latent, linear attention.

11 chaptersMIT 6.5940
Lec 18

Diffusion Models II

Make video diffusion fast: sparse attention, 4-bit weights with a low-rank branch, a 2-bit cache, and a few sampling steps.

11 chaptersMIT 6.5940
Lec 19

Distributed Training I

GPT-3 would take about 355 years on one GPU. Split the data, the layers and the tensors, and shard the state so each GPU holds a slice.

11 chaptersMIT 6.5940
Extra

On-Device Training

Training keeps every activation for the backward pass. Train biases, update a few layers, use 8-bit gradients, and fit in 256 KB.

10 chaptersMIT 6.5940, earlier year
Signal Processing for ML31
Lec 1

Introduction

SP+ML overview, applications, course roadmap, full pipeline demo.

8 chPilanci
Lec 2

Discrete Signals

x[n], δ[n], periodicity theorem, Nyquist sampling, aliasing.

8 chPilanci
Lec 3

Quantization Noise

Bennett’s theorem, SQNR, 6 dB/bit rule, proof sketch.

8 chPilanci
Lec 4

Lloyd-Max Quantizers

Non-uniform, centroid/boundary conditions, 1/3 power law, NF4 for LLMs.

10 chPilanci
Lec 5

Dithering & Stochastic Rounding

Linearization, subtractive dither, NVFP4, gradient accumulation.

8 chPilanci
Lec 6

DFT

Fourier basis, orthogonality, DFT/IDFT, FFT butterfly.

8 chPilanci
Lec 7

Spectral Descriptors

Centroid, spread, kurtosis, entropy, flatness, flux.

8 chPilanci
Lec 8

STFT

Windowed DFT, spectrogram, uncertainty principle, overlap-add.

8 chPilanci
Lec 9

Distance Classification

NN classifier, Hilbert spaces, Parseval, template matching.

8 chPilanci
Lec 10

Wavelets

CWT, DWT filter bank, Haar, Daubechies, multi-resolution.

8 chPilanci
Lec 11

Wavelet Applications

Denoising, JPEG2000, wavelet families, Fourier vs wavelet.

8 chPilanci
Lec 12

Linear Systems

LTI, convolution theorem, eigenvectors, circulant matrices.

8 chPilanci
Lec 13

Cepstrum & MFCC

Log trick, mel scale, mel filter bank, MFCC pipeline.

8 chPilanci
Lec 14

Bayes Classifiers

Bayes risk, likelihood ratio, ROC curves, Neyman-Pearson.

8 chPilanci
Lec 15

LDA & QDA

Stationarity, autocorrelation, Gaussian classification, LDA/QDA.

8 chPilanci
Lec 16

Fisher Discriminant

J(w) criterion, scatter matrices, simultaneous diagonalization.

8 chPilanci
Lec 17

SVM

Maximum margin, hard/soft margin, slack variables, multi-class.

8 chPilanci
Lec 18

Convex Duality

Lagrangian, KKT, primal→dual derivation, dual SVM.

8 chPilanci
Lec 19

Kernels

Feature maps, kernel trick, RBF, Mercer, representer theorem.

8 chPilanci
Lec 20

Regression & AR

Least squares, ridge, LASSO, autoregressive models, Yule-Walker.

8 chPilanci
Lec 21

RKHS

Bayesian regression, kernel regression, Gaussian processes.

8 chPilanci
Lec 22

Adaptive Filters

Wiener filter, LMS algorithm, noise cancellation, echo cancel.

8 chPilanci
Lec 23

Neural Networks

Hidden layers, activations, backprop, universal approximation.

8 chPilanci
Lec 24

Deep Learning & CNNs

Convolutional layers, spectrograms+CNN, BatchNorm, ResNets.

8 chPilanci
Lec 25

Attention

QKV, scaled dot-product, multi-head, transformer blocks.

8 chPilanci
Lec 26

Transformers for Signals

Signal tokenization, causal masking, GPT-style prediction.

8 chPilanci
Lec 27

Diffusion Models

Forward/reverse process, noise prediction, WaveGrad.

8 chPilanci
Lec 28

Convex Neural Networks

Pilanci’s reformulation, group LASSO, double descent.

8 chPilanci
Lec 29

Autoencoders & RPCA

VAE, nuclear norm, Robust PCA, matrix separation.

8 chPilanci
Lec 30

NMF & Clustering

Multiplicative updates, source separation, deep MF.

8 chPilanci
Lec 31

Dictionary Learning

K-SVD, OMP, matching pursuit, LASSO, sparse coding.

8 chPilanci
Embedded Systems & IoT7

The survey and prerequisite layer: MCU fundamentals, C, hardware design and interfacing, RTOS, embedded Linux. For the deep systems-engineering tracks built on top of it (real-time Linux, firmware, silicon, edge inference), see Physical AI Systems below.

Physical AI Systems38

The systems engineering under robots, AR/VR and edge AI: firmware and buses, embedded Linux and drivers, real-time pipelines, tracing, camera and video, edge inference, silicon. New lessons land here wave by wave.

The Machine Underneath

Firmware, Buses and Motion

Real-Time Pipelines

PAI RT 04

Real-Time Linux

A robot arm needs a command every millisecond. Learn why Linux is sometimes late, and how real-time Linux keeps the worst case small.

12 chapters18 devices

Deadlines, Jitter and Hot Loops on Shared Robot Compute: From Absolute Zero to Mastery

A robot that speaks, listens and moves runs loops hundreds of times a second on one shared computer. One late cycle is a stutter. Learn to find it, co

11 chaptersGleam

Buses, Timestamps, Motor Drivers and Control Loops

A sensor reading is only useful if it has the right units and the right time. A 12 ms delay turns a swinging arm into a 3.6 degree error. Bring a part

11 chaptersGleam

Loudspeakers, MEMS Microphones and the Sound of a Robot Head: From Absolute Zero to Mastery

A robot’s voice must leave a speaker the size of a coin. Most of a 120 Hz voice never makes it out. Pick a speaker and watch which parts survive.

12 chaptersGleam

Hearing One Talker in a Crowded Room: From Absolute Zero to Mastery

Four microphones can pick one voice out of a room and ignore a loud TV. Sound reaches each microphone a fraction of a millisecond apart, and that gap

12 chaptersGleam

Acoustic Echo Cancellation

A robot that talks hears its own voice come back from the room. A small adaptive filter learns that path and subtracts it, cutting the echo by about 3

11 chaptersGleam

Active Noise Cancellation, Hear-Through and What Robots Inherit

Noise cancellation plays the mirror image of a sound, but the mirror must arrive on time. At 50 µs late it still helps up to about 3 kHz, and above th

11 chaptersGleam

Impulse Responses, Sweeps, RT60, EQ and Loudness for a Robot in a Crowded Room

A showroom is not a chamber. Measure how a room answers one click and you can predict, tune and correct how a robot sounds and hears inside it.

12 chaptersGleam

Cleaning Voices in Noise and Echo

A robot hears your voice and the room at the same time. Pick a cleaner, push the noise up, and watch which cells of the sound each method keeps and wh

11 chaptersGleam

Gaze, Gesture, Turn-Taking and Timing for a Robot That Speaks, Listens and Moves: From Absolute Zero to Mastery

People leave a gap of about 200 ms before they answer. Learn how a robot earns that: eyes that follow, gestures that fit the words, and layers of moti

10 chaptersGleam

Measuring Whether an Expressive Robot Feels Alive: From Absolute Zero to Mastery

A robot feels alive only in the minds of people, so we measure the people: with scales, votes, reply gaps near 200 ms, behaviour, A/B tests and a chec

10 chaptersGleam
01

Sensor Timing, Rolling Shutter and MIPI CSI-2: From Absolute Zero to Mastery

A camera frame is not one instant: its rows are read over tens of milliseconds. Stamp it at the exposure midpoint and the camera-IMU offset stays fixe

9 chaptersPhysical AI
05

Low-Latency Video

Turning off B-frames and lookahead can cut over a second from a “low-latency” stream, because the encoder was holding frames back. A faster network wo

11 chaptersPhysical AI
06

Scan-out, Timewarp and Frame Pacing

Asynchronous timewarp cuts head-turn lag to about one scan-out, because a fast compositor re-aims the last frame just before vsync. It cannot fix tran

10 chaptersPhysical AI
01

The Boot Chain and Where the Log Stops

A board prints a few lines, then goes quiet. The last line names which of six stages stopped, and what to measure next. Break the chain and read where

10 chaptersPhysical AI
03

Platform, Char, IIO and Threaded IRQs for a Device That Did Not Exist: From Absolute Zero to Mastery

Your interrupt handler asks an I2C sensor for a reading, and the kernel stops with BUG: scheduling while atomic. Move the read into a threaded handler

10 chaptersPhysical AI
04

PCIe, DMA Engines, IOMMU and Ring-Buffer Command Queues

A driver feeds an accelerator by writing commands to a ring and ringing a doorbell. Ring it once per batch and the ring runs 5 times faster. Train the

10 chaptersPhysical AI
05

Building and Reproducing the Image

A bbappend named for the right recipe version changes your Linux image. One named for the wrong version changes nothing. BitBake picks by name, versio

9 chaptersPhysical AI
06

Secure Boot and OTA

A signed boot chain refuses a flipped bit, and an A/B update that waits for a confirm cannot brick, even when the power dies mid-write. Break each sta

9 chaptersPhysical AI
08

Jetson Platform Bring-Up

The same Jetson board can run at full clock or at half, and your code never says which. Pick a power mode, add a fan, and watch ten minutes of heat de

8 chaptersPhysical AI
03

Media Controller, libcamera and Zero-Copy to the GPU

A camera driver hands your code frames through a queue of buffers. Every buffer left waiting is a frame of delay. Drain the queue to the newest frame

9 chaptersPhysical AI
04

Hardware Triggers, GMSL, GigE and the N-Camera Bandwidth Budget: From Absolute Zero to Mastery

One coax cable carries a camera fifteen metres where a ribbon cable fails at thirty centimetres. Pick the link by bandwidth, distance and ports, then

9 chaptersPhysical AI
01

Partitioning and the Fallback Cliff

One operator the accelerator cannot run splits a model in three. Move it to the edge of the graph and you cut the damage about in half.

10 chaptersPhysical AI
02

Raw Light to Steady Image

A camera chip sends a dim, green, mosaic-patterned grid of numbers. Nine small stages turn it into a picture, and three loops keep it steady. Quantise

10 chaptersPhysical AI
02

INT8, FP8 and FP4 in Production: Calibration, TensorRT Plugins and Parity: From Absolute Zero to Mastery

A night camera frame can break an INT8 model that scored fine all day. Learn to quantise, compile with TensorRT, and prove layer by layer that the bin

9 chaptersPhysical AI
03

Where the Other Two-Thirds Go

A detector’s datasheet says 2.30 ms. The camera to box loop around it takes 12. Flip the switches and watch two thirds of the loop vanish while the ne

9 chaptersPhysical AI
04

Why a Robot's Model Is Limited by Memory Bandwidth and Heat, From Absolute Zero to Mastery

A 3-billion-parameter robot policy cannot decode faster than 11 ms per token on Jetson Thor, whatever the 2070 TFLOPS headline says, and a sealed box

9 chaptersPhysical AI
05

Running a Vision-Language-Action Model at 20 Hz: Prefill, Decode, Chunking and the Compute Budget: From Absolute Zero to Mastery

A robot arm needs a new command every 20 ms, but a VLA takes 44 to 94 ms to think. Overlap the next chunk’s thinking with the current chunk’s motion,

9 chaptersPhysical AI
06

Tiling, Double Buffering, SRAM and Performance Counters

A matrix multiply can leave its compute units idle two thirds of the time, waiting for data. Overlap the copy with the maths and the same chip, at the

9 chaptersPhysical AI
07

NPU Architectures, Drivers and Runtimes Compared

A laptop NPU rated 80 TOPS can run your model slower than a 6 TOPS board. Pick two engines and watch memory, operators and runtimes shrink the headlin

9 chaptersPhysical AI
02

compatible to probe: How Linux Matches Hardware to Drivers: From Absolute Zero to Mastery

A sensor works for 30 seconds after boot, then dies. No driver fix helps; one line in the device tree does. Match a node to a driver, feed it resource

9 chaptersPhysical AI
07

Syscalls, EEVDF, Interrupt Halves, Locks, Isolation

Acknowledge a level-triggered interrupt and a storm that pins one CPU stops. Leave it unacknowledged and the kernel disables the line after 99,900 unh

10 chaptersPhysical AI
02

WebRTC, GCC and the Teleop Link: Congestion Control, ICE and Prioritised Control

On Wi-Fi you do not own, one 150 ms stall can make a video sender cut its rate by a third. A bit-rate floor and a separate control flow keep the robot

9 chaptersPhysical AI
03

PTP on the Wire and TSN

A control frame that is 20 microseconds late for its slot waits almost a whole 1 ms cycle. Time-aware shaping, LaunchTime and PTP clocks keep it on ti

9 chaptersPhysical AI
04

Connectivity, Telemetry, OTA Rollout and Trace Correlation: How a Robot Fleet Stays Reachable, Observable and Updatable

A robot that loses its Wi-Fi can find its own root cause, fail over to cellular and keep reporting, where a monitoring alert can only page a human at

10 chaptersPhysical AI
01

The Packet's Journey from NIC Ring to Socket

A control packet can wait 40 ms for no reason a faster link would fix. Follow one packet from the network card to your code, and learn the knob at eve

9 chaptersPhysical AI
Model Optimization4
Systems & Hardware1
Systems for Machine Learning9

Stanford CS 229s Fall 2023. Hardware-aware algorithm design, transformer efficiency, FlashAttention, sparsity & quantization, finetuning, parallelism, efficient architectures, cluster scheduling.

PyTorch Deep Dive5
Tools & Frameworks1
Probability Distributions5
Advanced Fusion & Estimation5

The quals-level layer above the filtering core — estimation-theoretic bounds, smoothing, adaptation, multiple models, and multi-platform fusion. Grows with the Fusion and Estimation path.

Estimation & Probabilistic Models12
NEW

Continuous-Time Markov Chains

Discrete chains tick on a clock; real systems jump whenever they like. The generator matrix, exponential clocks racing to jump, the transition function, equilibrium, and Gillespie simulation — built from zero.

12 chapters12 sims
NEW

Continuous-Time HMM

A hidden state that drifts in continuous time, watched only at scattered moments — the gap between observations becomes part of the math. Forward-backward with the matrix exponential, smoothing, and continuous-time EM.

12 chapters12 sims
NEW

Particle Filter

Estimation by a cloud of weighted guesses — for multimodal, nonlinear beliefs the Kalman filter can’t represent. Predict, weight, resample; Monte Carlo Localization; the curse of dimensionality.

10 chapters8+ sims
NEW

Factor Graphs

The modern SLAM back-end: optimize the whole trajectory + map at once as a sparse least-squares problem. Smoothing vs filtering, variables & factors, Gauss-Newton, the loop closure that snaps a drifted map straight, and bundle adjustment.

10 chapters9+ sims
NEW

Robust Estimation

One bad measurement wrecks least squares. The two great cures: down-weight outliers (M-estimators, Huber, IRLS) and vote them out (RANSAC). Influence functions, breakdown points, and the robust kernels behind every SLAM back-end and SfM pipeline.

10 chapters9+ sims
LESSON 14

Bayes Filter

The mother of all filters — recursive belief update from first principles.

9 chapters
LESSON 15

Kalman Filter

Track a moving object through noise — the most elegant algorithm in engineering.

11 chapters
LESSON 16

Extended Kalman Filter

When the world is nonlinear — linearize with Jacobians.

9 chapters
LESSON 17

Unscented Kalman Filter

Beyond linearization — sigma points capture nonlinearity directly.

9 chapters
LESSON 18

Hidden Markov Model

Sequences with hidden causes — Forward, Viterbi, Baum-Welch.

10 chapters
LESSON 19

Bayes Estimation

Prior × likelihood = posterior. The foundation of all inference.

9 chapters
LESSON 20

Bayesian Networks

Variables with dependencies — DAGs, d-separation, message passing.

10 chapters
Robotics & Perception6
Decision & Control3
Deep Reinforcement Learning36
HW1 · Forge

CS 224R HW1 — Imitation Learning

Homework as a forge: implement BC/MSE and watch it collapse a bimodal expert into the wall, then flow matching and DAgger fix it — on a live Flappy Bird you build yourself.

10 chaptersforge studio
HW2 · Forge

CS 224R HW2 — Online RL

One Bellman recursion, three realizations: tabular Q-learning on a gridworld where one number flips the optimal goal, then PPO, then a stabilized off-policy actor-critic — build every function yourself.

12 chaptersforge studio
HW3 · Forge

CS 224R HW3 — Offline RL

Offline RL that stitches suboptimal trajectories to the goal: build AWAC's advantage-weighted actor-critic and IQL's expectile value regression yourself — every function, no out-of-distribution blow-ups.

11 chaptersforge studio
43

Policy Gradients: The Complete Guide

Every symbol explained, every step derived. From REINFORCE to off-policy IS to KL constraints → PPO.

12 chaptersCS 224R
44

Actor-Critic Methods

Learn to estimate what’s good vs bad. MC, bootstrapping, N-step returns, PPO, SAC — the complete guide.

12 chaptersCS 224R
45

Off-Policy Actor-Critic: PPO & SAC

The practical algorithms. Clipping, GAE, replay buffers, Q-functions — from theory to real robots.

11 chaptersCS 224R
47

Offline RL: Learning from Fixed Data

Train policies without environment interaction. AWR, AWAC, IQL — data stitching, expectile regression, and implicit policy improvement.

10 chaptersCS 224R
48

Reward Learning

Where do rewards come from? Goal classifiers, adversarial training, human preferences, Bradley-Terry, RLHF, and Constitutional AI.

10 chaptersCS 224R
46

Q-Learning & DQN

No policy needed. Bellman optimality, target networks, double Q-learning, N-step returns — value-based RL.

11 chaptersCS 224R
47

Imitation Learning

Behavioral cloning, expressive policies, diffusion policies, compounding errors, DAgger — learning from demos.

11 chaptersCS 224R
48

Deep RL: The Complete Theory

Every derivation, every proof. MDPs → Policy Gradients → TRPO → PPO → SAC → DQN → Offline RL → DPO.

12 chaptersCS 224R · CS 234 · CS 285
49

Model-Based RL

Learn a simulator of the world, then practice inside it. Dyna, MBPO, MPC, CEM, value-augmented planning, AlphaGo as MBRL.

10 chaptersCS 224R
50

Multi-Task & Goal-Conditioned RL

One policy, many tasks. Task conditioning, goal-conditioned rewards, HER — turning failures into free training data.

10 chaptersCS 224R
51

CS 224R Exam Review

Complete midterm prep: every algorithm, every equation, 36+ practice questions, interactive exam simulator, cheat sheet.

12 chaptersCS 224R
52

RL for LLM Reasoning

Noam Brown’s approach: search, self-play, and RL for superhuman reasoning in language models.

CS 224R
53

RLHF & DPO

The post-training frontier: reward models, PPO alignment, direct preference optimization, and beyond.

CS 224R
54

Meta-Reinforcement Learning

Learning to learn new tasks from a handful of episodes. Black-box architectures, exploration strategies, task inference as POMDP.

12 chaptersCS 224R
55

Hierarchy in IL & RL

Decompose long-horizon tasks into subtask hierarchies. HL/LL policies, goal representations, DAgger for hierarchy, HIRO, skill discovery.

12 chaptersDeep RL
56

Sim2Real Robot Learning

Crossing the reality gap: domain randomization, privileged teacher–student adaptation, real2sim residuals & actuator nets, learning from human data, and the Sim2Real 1.0→4.0 map.

11 sectionsCS 224R
57

RL for Robot Foundation Models

Pushing a vision-language-action model past the 80% imitation plateau with RL: offline-RL-as-supervised-learning, diffusion steering, and small edit policies. When the model is too big, too weird, too expensive for textbook RL.

10 sectionsCS 224R
58

Frontiers of Deep RL & How to Do Research

The capstone: deep RL as a unified toolbox, the four data settings, the seven open frontiers (no reward, prior knowledge, world models, scaling, safety, errors, evaluation) — and how to actually pick problems, front-load risk, and do research.

10 sectionsCS 224R
UC Berkeley CS 285

Advanced Policy Gradients (UC Berkeley CS 285)

Why PPO and TRPO may reuse old samples: the performance difference identity, the drift bound, KL penalties and the natural gradient.

7 chapters7 sims
UC Berkeley CS 285

RL Theory (UC Berkeley CS 285)

What theory can promise: the policy-evaluation inverse, projected contraction, concentration, the simulation lemma, fitted Q error.

7 chapters7 sims
UC Berkeley CS 285

Variational Inference for RL (UC Berkeley CS 285)

Latent policies, the ELBO and its gap, the reparameterised gradient, VAEs inside RL, and diffusion as a chain of latents.

6 chapters6 sims
UC Berkeley CS 285

Control as Inference (UC Berkeley CS 285)

Optimality as evidence: backward messages are soft value iteration, the policy is e to the advantage, and SAC falls out.

8 chapters8 sims
UC Berkeley CS 285

Inverse RL and Adversarial Imitation (UC Berkeley CS 285)

Recover the reward, not the actions: MaxEnt IRL gradients, importance weights, IRL as a GAN, and why GAIL is the same thing.

7 chapters7 sims
UC Berkeley CS 285

Offline-to-Online RL and Flow Actors (UC Berkeley CS 285)

Pretrain on the log, then practise: why fine-tuning dips, RLPD half-and-half batches, flow actors, and model-based penalties.

8 chapters7 sims
UC Berkeley CS 285

Successor Representations (UC Berkeley CS 285)

Where the policy will be, as a map: the SR and its Bellman backup, successor features, GPI transfer and C-learning.

8 chapters8 sims
UC Berkeley CS 285

Exploration by Skills and Goals (UC Berkeley CS 285)

Explore with no reward: coverage and control in bits, DIAYN skills, goal-conditioned policies and Skew-Fit goal proposals.

6 chapters6 sims
UC Berkeley CS 285

Partial Observability in Deep RL (UC Berkeley CS 285)

When observations are not states: random memoryless policies, biased critics, models that lie, and giving the agent a history.

7 chapters7 sims
UC Berkeley CS 285

Uncertainty-Aware Model-Based RL (UC Berkeley CS 285)

Plan under every model: epistemic vs aleatoric doubt, ensembles, pathwise gradients that explode, short rollouts, latent models.

8 chapters8 sims
HW1 · Workbook

CS 285 HW1: Action Chunking and Flow Policies (UC Berkeley)

Practise imitation with action chunks: why an MSE chunk policy averages into the wall, and how a flow policy samples whole chunks.

7 chapters7 sims
HW2 · Workbook

CS 285 HW2: Policy Gradients (UC Berkeley)

Practise REINFORCE end to end: reward-to-go, baselines, GAE in one backward pass, advantage normalisation and tuning.

8 chapters8 sims
HW3 · Workbook

CS 285 HW3: DQN and Soft Actor-Critic (UC Berkeley)

Practise DQN and SAC: replay, target copies, the done mask, double Q, the reparameterised actor and auto-temperature.

8 chapters8 sims
HW4 · Workbook

CS 285 HW4: RL for Language Models (UC Berkeley)

Practise RL on token sequences: log-probs and masks, the KL estimate, group advantages, GRPO against GR-REINFORCE, reward hacks.

8 chapters8 sims
HW5 · Workbook

CS 285 HW5: Offline RL with Flow Policies (UC Berkeley)

Practise offline RL: SAC+BC and its weight, the IQL expectile critic and actor, flow policies and FQL one-step distillation.

8 chapters8 sims
NLP with Deep Learning19
Lec 1

History of Language AI

Four eras of NLP: rule-based translation, hand-built AI, statistical methods, neural revolution. Understanding vs pattern matching.

10 chaptersCS224N
Lec 2

Word Vectors

One-hot limitations, distributional hypothesis, Word2Vec (CBOW & Skip-gram), GloVe, negative sampling, word analogies, embedding bias.

10 chaptersCS224N
Lec 3

Backpropagation & Neural Nets

Neurons, activations, forward pass, loss functions, chain rule, backprop algorithm, gradient descent playground, practical tips.

10 chaptersCS224N
Lec 4

Language Models & RNNs

N-grams, neural LMs, recurrent networks, BPTT, vanishing gradients, LSTM & GRU, live text generation, attention preview.

10 chaptersCS224N
Lec 5

The Transformer

Self-attention, scaled dot-product, multi-head attention, positional encoding, encoder-decoder, build a Transformer piece by piece.

10 chaptersCS224N
Lec 6

Practical Methodology

Debugging, hyperparameter tuning, regularization, training diagnostics dashboard, evaluation & error analysis.

8 chaptersCS224N
Lec 7

Pre-training at Scale

BERT vs GPT paradigms, masked LM, autoregressive LM, data pipelines, scaling laws, Chinchilla, Llama 3 architecture.

10 chaptersCS224N
Lec 8

Post-training: RLHF & DPO

SFT, reward modeling, PPO with KL constraint, DPO, alignment data, evaluation, safety guardrails.

10 chaptersCS224N
Lec 9

Efficient Adaptation

In-context learning, prompt engineering, chain-of-thought, lottery tickets, adapters, LoRA, PEFT playground.

10 chaptersCS224N
Lec 10

Agents, Tools & RAG

Retrieval-augmented generation, dense retrieval, ReAct reasoning loops, Toolformer, agent simulator.

10 chaptersCS224N
Lec 11

Benchmarking & Evaluation

MMLU, HELM, LLM-as-judge, benchmark explorer dashboard, data contamination, metric saturation.

8 chaptersCS224N
Lec 12

Reasoning Part 1

Chain-of-thought, self-consistency, zero-shot CoT, process rewards, DeepSeek-R1, GRPO & DAPO.

10 chaptersCS224N
Lec 13

Reasoning Part 2

Process reward models, best-of-N, speculative decoding, RoPE, context extension, test-time compute scaling.

10 chaptersCS224N
Lec 14

Tokenization & Multilinguality

BPE, WordPiece, SentencePiece, multilingual fertility, XLM-R cross-lingual transfer, tokenizer explorer.

8 chaptersCS224N
Lec 15

Interpretability

Linear probes, attention visualization, sparse autoencoders, agentic interpretability, concept discovery.

8 chaptersCS224N
Lec 16

Social & Broader Impacts

Bias, toxicity, misinformation, privacy, environmental cost, governance & policy.

8 chaptersCS224N
Lec 17

Multimodality

Vision encoders, early/late fusion, Chameleon, Transfusion, scaling mixed-modal, retrieval-augmented multimodal.

10 chaptersCS224N
Lec 18

LoRA Without Regret

When LoRA fails, regularization in PEFT, merging adapters, QLoRA, DoRA, future of adaptation.

8 chaptersCS224N
Lec 19

Open Questions in NLP 2026

Reasoning, grounding, efficiency, safety, multimodal frontier, interactive research map.

8 chaptersCS224N
CS 8803-LLM: Frontiers of Language Models22
SESSION 01

Tokenizer Fairness & Data Mixing

Parity-aware BPE tokenizer fairness, the Gini coefficient, and Chameleon’s kernel ridge leverage scores for domain-mixing pretraining data.

10 chaptersCS 8803-LLM
SESSION 02

LLMs as Embedding Models

E5-Mistral turns a decoder-only LLM into a state-of-the-art embedder: last-token pooling, LoRA, synthetic contrastive data, and the MMTEB benchmark.

10 chaptersCS 8803-LLM
SESSION 03

MLA & Architectural Choices

DeepSeek-V2’s Multi-head Latent Attention compresses the KV cache via low-rank projection; NV-Embed adapts it into a bidirectional embedding backbone.

10 chaptersCS 8803-LLM
SESSION 04

Mixture-of-Experts

Sparsely-gated Mixture-of-Experts: noisy top-k routing and load-balancing loss, and how DeepSeekMoE and OLMoE turn conditional compute into embeddings.

10 chaptersCS 8803-LLM
SESSION 05

Bayesian Reasoning over Beliefs

BIRD casts LLM chain-of-thought as abduction plus deduction over a Bayesian network, turning free-text guesses into calibrated probabilities.

10 chaptersCS 8803-LLM
SESSION 06

DPO & Curious Agents

Direct Preference Optimization replaces the RLHF reward model with a closed-form Bradley-Terry loss; Paprika trains agents to explore out of curiosity.

10 chaptersCS 8803-LLM
SESSION 07

Agent Harness

Agent Workflow Memory induces reusable routines from past trajectories; the OpenHands SDK shows how sandboxing, delegation, and event loops compose a harness.

10 chaptersCS 8803-LLM
SESSION 08

Attention Sinks & Streaming

StreamingLLM explains why keeping a handful of initial attention-sink tokens lets a rolling KV cache stream infinite context without retraining.

10 chaptersCS 8803-LLM
SESSION 09

TransMLA & Sparse Latent Attention

TransMLA converts a GQA checkpoint into Multi-Head Latent Attention after the fact; DeepSeek-V3.2’s lightning indexer then makes 128k-token attention sparse.

9 chaptersCS 8803-LLM
SESSION 10

RL for LLMs: GRPO, DAPO & R1-Zero

GRPO strips the value network out of PPO for group-relative advantages; DAPO fixes its clip-higher, dynamic sampling, and length bias to reproduce R1-Zero.

10 chaptersCS 8803-LLM
SESSION 11

Reasoning II: Compound AI Systems

Optimas derives exactly when tuning a retriever, reranker, generator, and verifier locally also improves the compound system’s global reward.

10 chaptersCS 8803-LLM
SESSION 12

Reasoning III: Code World Models

Code World Model trains on Python execution traces instead of text alone, learning to simulate program state rather than just predict the next token.

10 chaptersCS 8803-LLM
SESSION 13

Self-Play RL I: Absolute Zero

Absolute Zero trains a proposer and solver via pure self-play, grading itself with a code executor instead of any human-written question.

10 chaptersCS 8803-LLM
SESSION 14

Self-Play RL II: SPICE & SWE-RL

SPICE grounds self-play in real corpus documents; Self-Play SWE-RL grounds it in bug injection and repair on real, breakable codebases.

10 chaptersCS 8803-LLM
SESSION 15

Test-Time Scaling: Compute-Optimal Inference

Compute-optimal test-time scaling spends inference compute where question difficulty says it will pay off, via process reward models and search.

10 chaptersCS 8803-LLM
SESSION 16

Mode Collapse in LLM Outputs

Mode collapse measures how twenty-five different chatbots converge on the same handful of answers across 26,000 real user questions.

10 chaptersCS 8803-LLM
SESSION 17

Linear Transformers & Fast Weight Programmers

Attention is secretly a fast weight programmer reprogramming its own weights one token at a time; DeltaNet’s delta rule fixes its capacity limit.

10 chaptersCS 8803-LLM
SESSION 18

Diffusion Language Models

Diffusion-LM and LLaDA throw away left-to-right generation for iterative denoising, trading the KV cache for parallel, any-order token refinement.

10 chaptersCS 8803-LLM
SESSION 19

Safety: Attention Heads & Emergent Misalignment

Safety Head Importance Score locates and ablates the attention heads carrying refusal; insecure code finetuning shows misalignment emerging without intent.

10 chaptersCS 8803-LLM
SESSION 20

Sparse Autoencoders & Crosscoders

Sparse autoencoders decompose the residual stream into a sparser basis where each direction means one thing; crosscoders span every layer and model at once.

10 chaptersCS 8803-LLM
SESSION 21

Calibration: Knowing What the Model Knows

Expected calibration error and active task disambiguation teach a model when to trust its own answer and when to ask a clarifying question instead of guessing.

10 chaptersCS 8803-LLM
SESSION 22

Scaling Laws: Chinchilla & Precision

Chinchilla’s compute-optimal law meets precision-aware scaling: quantizing weights and activations adds its own effective-parameter tax to the loss.

10 chaptersCS 8803-LLM
Frontier Model Research13

The research skills behind frontier post-training: synthetic data, environments, graders, ablations, agentic RL, audio and vision.

FRONTIER RESEARCH

Synthetic Data Pipelines for Post-Training

Seed tasks, evolved instructions, rejection sampling, execution checks, dedup and mixtures: the data factory behind agentic post-training.

10 chaptersGleam
FRONTIER RESEARCH

Grader Reliability: LLM Judges You Can Trust

LLM judges as instruments: biases, kappa and alpha, ambiguous ground truth, calibrated escalation and over-optimization.

11 chaptersGleam
FRONTIER RESEARCH

Task Environments: Worlds That Train Agents

The reset, step and reward contract, task generators, state verifiers and difficulty curves for tool-use and long-horizon agents.

11 chaptersGleam
FRONTIER RESEARCH

Controlled Ablations for Post-Training

Seed variance, paired tests, power and minimum detectable effect, small-scale proxies and the write-up a colleague trusts.

11 chaptersGleam
FRONTIER RESEARCH

Coding RL Environments: Sandboxes, Tests and Rewards

SWE-bench to SWE-smith: repo sandboxes, test rewards, flaky tests, contamination and the shortcuts graders must catch.

11 chaptersGleam
FRONTIER RESEARCH

RL Run Forensics: Catching Reward Hacking and Confounders

Reward hacking, over-optimization, entropy collapse, GRPO length bias and spurious rewards: an investigation playbook.

11 chaptersGleam
FRONTIER RESEARCH

Agentic RL Infrastructure: Surviving the Long Tail

Async rollouts, staleness versus throughput, partial rollouts and the retry, quarantine or drop choice for every failure.

11 chaptersGleam
FRONTIER RESEARCH

Benchmark Auditing: Can You Trust This Number?

Label errors, contamination checks, saturation, agreement between benchmarks and an audit report template.

11 chaptersGleam
FRONTIER RESEARCH

User Simulators for Agentic Evals

Simulated users, dual control, world-state grading, pass^k and cross-harness generalization for agentic evals.

11 chaptersGleam
FRONTIER RESEARCH

Usability Evals and the Data Flywheel

From user feedback to eval to data to training: usage mining, targeted evals, Arena ratings, personalization and sycophancy.

11 chaptersGleam
FRONTIER RESEARCH

Audio Data Pipelines: From Raw Hours to Training Data

VAD, segmentation, diarization, pseudo-labels, CTC forced alignment and quality filtering for speech training data.

11 chaptersGleam
FRONTIER RESEARCH

Speech Language Models: Scaling and Latency

Audio token rates, full-duplex design, speech LM scaling laws, interleaving with text and time to first audio.

11 chaptersGleam
FRONTIER RESEARCH

Vision Data and Benchmarks: Curating What Models See

Filtering and balancing image-text data, DataComp, and building vision benchmarks that text alone cannot answer.

11 chaptersGleam
MIT MMAI: Multimodal AI81

Follow-along of MIT MMAI (Spring 2026, Paul Liang): every lecture walked slide by slide, plus every assigned paper as its own lesson.

04

Data and Heterogeneity: Modalities, Symmetries and Model Architectures

Scramble five items and the right model gives the same answer. A plain model must see all 120 orderings to learn that. The wiring you choose decides h

12 chaptersMMAI
05

Early Fusion, Late Fusion and Explainable Fusion on Patient Data: From Absolute Zero to Mastery

Doctors read scans, notes, charts and vital signs together. A fusion model does the same: it joins every source into one patient vector, then explains

10 chaptersMMAI
08

Large Multimodal Models: How a Language Model Learns to See and Draw: From Absolute Zero to Mastery

A language model that only reads text can learn to see by training one small adapter while its own weights stay frozen. Switch the adapter on and watc

11 chaptersMMAI
11

Multimodal Reasoning and Reinforcement Learning: From Absolute Zero to Mastery

A model can learn to reason from a reward alone, with no worked examples. Choose how the answers are checked, press Train, and watch the probabilities

12 chaptersMMAI
12

Explainable Reasoning, xHAIM, Patient Summaries and Cited Explanations: From Absolute Zero to Mastery

A hospital model can score a patient well and still say nothing a doctor can check. xHAIM summarises each chart, lifts pneumonia AUC from 76.3 to 96.7

11 chaptersMMAI
13

Multimodal Interaction: Interactive Agents That See, Plan, Search, Remember and Act: From Absolute Zero to Mastery

A web agent can read a page as text, as a screenshot, or as a screenshot with numbered marks. Pick one: text finishes 7.25% of tasks, marks 16.37%, pe

11 chaptersMMAI
15

Prescriptive Modeling, Choosing the Best Treatment for Each Patient

A hospital has two heart valves and one patient. A prescriptive model picks the valve with the lower chance of a pacemaker. Add scans and reports, and

10 chaptersMMAI
01

Introduction to Multimodal AI: Heterogeneous, Connected and Interacting Data, and the Six Core Challenges: From Absolute Zero to Mastery

Words alone say “wow, great.” A face alone says “annoyed.” Together they say sarcasm, a meaning neither one holds. That gap is what multimodal AI is b

11 chaptersMMAI
P

Multimodal Machine Learning, A Survey and Taxonomy: Representation, Translation, Alignment, Fusion and Co-learning from Absolute Zero to Mastery

Five challenges sort every multimodal system: representation, translation, alignment, fusion and co-learning. Pick any of 12 tasks and see which of th

9 chaptersMMAI
02

Multimodal Datasets and Research Tasks: How to Do AI Research and Which Tasks and Datasets Define Multimodal AI

A multimodal task is a recipe: choose the signals that go in and the thing that comes out. Build one yourself and see which real dataset from the lect

12 chaptersMMAI
03

AI Tutorial: Thinking About AI Projects, Data Processing and Debugging a Model in PyTorch: From Absolute Zero to Mastery

Most failed AI projects fail before the model: in the data, then in the loss curve. Learn the order to look, and the one fix each symptom points to.

12 chaptersMMAI
06

Interactions and Fusion Models, How Modalities Combine, From Early and Late Fusion to Tensor, Low-Rank, Gated and Nonlinear Fusion

Two signals can say more together than apart. A sum of them cannot see it. A product can. Slide the pairing and watch four fusion rules score the same

11 chaptersMMAI
P

Kosmos-2

Kosmos-2 teaches a language model to answer with places as well as words. It writes a box as two tokens from a grid of 1,024 location tokens, learned

10 chaptersMMAI
P

Methods, Analysis and Insights from Multimodal LLM Pre-training: What Matters When You Teach a Language Model to See: From Absolute Zero to Mastery

Apple tested every choice in a seeing language model. Bigger pictures won: 224 to 336 pixels added about 3 points. A new connector between eye and bra

10 chaptersMMAI
07

Multimodal Alignment: Aligned Representations, Contrastive Learning, Optimal Transport and Emergent Alignment: From Absolute Zero to Mastery

Teach two encoders to put a picture and its caption in the same place. After 40 training steps all four images find their own caption, and that one pu

12 chaptersMMAI
P

What Makes Two Views Teach the Right Thing, From Absolute Zero to Mastery

Two views of a scene can teach a model the right thing or the wrong thing. Share too much and it learns noise. Share too little and it loses the task.

10 chaptersMMAI
P

Symmetry, Scaling Laws and Compute-Optimal Training, From Absolute Zero to Mastery

A transformer built around the symmetries of 3D space reaches about half the test loss of a plain transformer at every compute budget tested, from 10¹

10 chaptersMMAI
09

Multimodal Generation, From Understanding a Clip to Drawing a Picture

Type a sentence and a model hands back a picture. One recipe writes the picture as a row of tokens, one at a time. The other starts from noise and cle

12 chaptersMMAI
10

Modern Generative AI: From Text-to-Image to VAEs, Diffusion, Flow Matching and Guidance

A generative model turns pure noise into data by walking along a learned velocity field. One big step gives a blurry average. Thirty-two small steps g

12 chaptersMMAI
14

Cross-modal Transfer: Transfer, Co-learning and Model Induction: From Absolute Zero to Mastery

A noisy sensor can learn from a clean one that will not be there at test time. Train with both, deploy with one, and watch the lone sensor get better.

11 chaptersMMAI
16

Multimodal AI for Cities and Mobility: Four Channels, Behavior plus Computation, Grounded AI, From Absolute Zero to Mastery

Picture a city at rush hour and ask which district needs more buses. The answer hides in four kinds of record: numbers, a network, pictures and words.

11 chaptersMMAI
17

Multimodal AI for Transportation: Bus Dispatching, Generative Urban Design, Agency and Autonomous Vehicles from Absolute Zero

An AI told bus drivers when to hold at the terminal. Where drivers followed it, the longest waits fell 40%. Drag how many follow, and watch the buses

12 chaptersMMAI
18

Self-Evolving AI

An agent that never changes repeats its mistakes. An agent that keeps what worked gets better. On the lecture’s GPU speed task, four agents sharing no

10 chaptersMMAI
19

AI for New Senses: Smell, Taste, Temperature, Touch and Human-AI Interaction: From Absolute Zero to Mastery

A sensor board sniffs a jar of cumin and a model names it. A wearable puffs a drop of chemical at your face and the air feels cool. Pick a sense and w

12 chaptersMMAI
P

Principles, Challenges, and Open Questions: From Absolute Zero to Mastery

One survey sorts all of multimodal machine learning into 3 principles and 6 challenges with 19 subchallenges. Pick a challenge and see what it asks an

10 chaptersMMAI
P

Bengio, Courville and Vincent's Review

A good description makes a hard problem easy. Two rings of dots cannot be split by one straight cut, until you describe each dot by its distance from

10 chaptersMMAI
P

Grids, Groups, Graphs, Geodesics and Gauges

Reorder a graph’s nodes and a plain network changes its answer, though the graph is the same. A layer built from the graph’s symmetry does not. This p

10 chaptersMMAI
P

Permutation-Invariant and Equivariant Networks for Sets: From Absolute Zero to Mastery

A set has no order, so a model for sets must give the same answer in every order. Deep Sets proves that adding up a code for each item, then reading t

10 chaptersMMAI
P

An Information Decomposition Framework (PID): From Absolute Zero to Mastery

Two inputs can tell you the same thing, different things, or something only the two of them tell you together. This paper measures all three in bits,

10 chaptersMMAI
P

MoMa, Experts for Each Modality: From Absolute Zero to Mastery

Picture a web page with a jam recipe and two photos. A normal model spends the same weights on every word and every picture piece. MoMa gives each kin

10 chaptersMMAI
P

VLMs as Bags-of-Words, Why CLIP Ignores Word Order

A vision-language model like CLIP can match a photo to its caption, yet it often cannot tell “the horse is eating the grass” from “the grass is eating

10 chaptersMMAI
P

When Do Separate Models Agree, and Does Agreement Predict Performance: From Absolute Zero to Mastery

Two witnesses study a robbery alone. Both saw the car, but only one saw the thief’s face. Their notes can match on the car and never on the face. Two

9 chaptersMMAI
P

Training Compute-Optimal Large Language Models: From Absolute Zero to Mastery

A 70 billion parameter model trained on 1.4 trillion tokens beat Gopher, four times its size, for the same compute. Slide the model size and find the

10 chaptersMMAI
P

Generalization via Declarative Instructions on 1600+ NLP Tasks: From Absolute Zero to Mastery

Train a model on 757 tasks written as plain instructions and it can follow a new instruction it never saw. The 11B version beats 175B InstructGPT by 9

10 chaptersMMAI
P

How a Fixed-Size Memory Learns to Forget and Trains Fast on a GPU: From Absolute Zero to Mastery

In a toy memory, 40 chatter tokens bury a stored fact (0.14 times the clutter). A gate that chooses what to forget keeps it at 1.5 times. This paper s

10 chaptersMMAI
P

Whose Preferences?

Alignment teaches a model what people prefer. This paper asks which people. Step through training and watch US English gain far more than Indian or Ni

9 chaptersMMAI
P

Crossmodal Attention for Unaligned Sequences

A reviewer frowns two seconds before the word that explains the frown. Crossmodal attention lets each word go and find that frown, so nobody lines up

10 chaptersMMAI
P

MAE: From Absolute Zero to Mastery

Hide three quarters of a photo, show the encoder only the rest, and let a small decoder repaint the gaps. That one trick trains a vision model about 3

9 chaptersMMAI
P

Early vs Late Fusion, Compute-Optimal Training and Sparse Experts

Bolting a vision encoder onto a language model is not better than training one transformer on images and text from scratch. Across 457 trained models,

9 chaptersMMAI
P

Transfer between Modalities

A frozen multimodal model can steer an image painter. Hand it a few learnable queries, and the painter draws what the model worked out, not just the w

10 chaptersMMAI
P

Efficient Fine-tuning of Language Models with Zero-init Attention: From Absolute Zero to Mastery

LLaMA-Adapter teaches a frozen 7B language model to follow instructions by training only 1.2 million new numbers, and a gate that starts at zero keeps

10 chaptersMMAI
P

Extending Mamba to Multi-Modal Large Language Models for Efficient Inference: From Absolute Zero to Mastery

Cobra swaps the transformer inside a vision-language model for Mamba, which keeps a fixed-size memory. It writes 256 tokens in 1.54 s where MobileVLM

10 chaptersMMAI
P

Efficiently Transforming Modalities with LLMs

Ask for a picture of the animal that made a sound. ModaVerse trains 40 million parameters in one stage and lets the language model write plain orders

10 chaptersMMAI
P

Any-to-Many Multimodal LLM

Spider answers one request with text, an image, audio and a video together, because its language model writes a separate signal prompt for every decod

10 chaptersMMAI
P

Scaling Data and Parameters for a Family of Multi-modal Large Language Models

You photograph a receipt and ask a model for the total. Can it read the small print? One recipe, SPHINX-X, trains four model sizes, from 1.1B to 8×7B

9 chaptersMMAI
P

How Far Are We to GPT-4V? Closing the Gap to Commercial Multimodal Models with Open-Source Suites: From Absolute Zero to Mastery

InternVL 1.5 cuts a big page into 448 pixel tiles, so an open 26 billion parameter model can read small print. Cut the page below and watch the words

10 chaptersMMAI
P

Any-to-Any Multimodal LLM, MIT MMAI Paper Reading

NExT-GPT lets one language model take in and answer with any mix of text, image, video and audio, while training only 1% of its weights. Pick a reques

10 chaptersMMAI
P

Learning to Rebalance Multi-Modal Optimization by Adaptively Masking Subnetworks

A model that hears and sees often learns only to hear. AMSS mutes part of the loud sense’s learning, and lifts Kinetics-Sound accuracy from 64.55% to

10 chaptersMMAI
P

A Single Model is Not All You Need

Train small models on the pieces, then multiply their probabilities. The product can draw combinations that no model ever saw, and it needs far less d

10 chaptersMMAI
P

A Cast of Media Foundation Models: From Absolute Zero to Mastery

Meta’s Movie Gen writes a 16 second HD video from one sentence. A plain 30 billion parameter transformer starts from pure noise and walks to a clip in

10 chaptersMMAI
P

Training Straight-Line Flows on Autoencoder Codes (LFM, Dao et al. 2023): From Absolute Zero to Mastery

A 256 by 256 colour picture is 196,608 numbers. Its latent code is 4,096. Teach the flow to draw the small code, and every one of its 89 steps writes

10 chaptersMMAI
P

Large Language Diffusion Models, a Masked Diffusion Language Model at 8B: From Absolute Zero to Mastery

A language model that writes a whole answer at once: start fully masked, fix the surest words first, and match LLaMA3 8B on many tests.

10 chaptersMMAI
P

Learning a Velocity Field That Turns Noise Into Data: From Absolute Zero to Mastery

Flow Matching trains a network to name the velocity that carries random noise to real data, by regressing on one straight line at a time. No simulatio

10 chaptersMMAI
P

Target-Predictive Conditional Flow Matching for Jitter-Reduced Text-to-Motion Generation: From Absolute Zero to Mastery

A model that turns a sentence into a human motion. It learns to predict the clean motion, not the velocity, so the figure stops shivering: jitter 39.5

9 chaptersMMAI
P

Multimodal Music Generation via Conditional Flow Matching

Give MusFlow a photo, a story or a plain caption and it composes a short music clip. Each input is mapped into the sound space of CLAP, and flow match

10 chaptersMMAI
P

Flow Matching Posterior Sampling for Training-free Conditional Generation: From Absolute Zero to Mastery

Steer a frozen flow-matching model toward any condition with no retraining: find the diffusion score hidden inside its velocity, then borrow posterior

10 chaptersMMAI
P

Patel, DeLoye and Mathias: From Absolute Zero to Mastery

Diffusion and flow matching look like two recipes. Under Generator Matching they are one family, and one dial mixes them. Run the sampler below and tu

10 chaptersMMAI
P

Best-First Search on the Real Web, With Backtracking and a Model as Judge, From Absolute Zero to Mastery

A web agent that clicks its first idea fails most tasks. Let it search, look ahead and back up, and GPT-4o rises from 18.9% to 26.4% on VisualWebArena

10 chaptersMMAI
P

Reward Models, Human Preferences and Policy Learning: From Absolute Zero to Mastery

Nobody can write down a score for “carry the cup well”, but anyone can pick the better of two attempts. RLHF turns thousands of such picks into a rewa

10 chaptersMMAI
P

Learning to Synergize Memory and Reasoning for Efficient Long-Horizon Agents

MEM1 trains an agent to rewrite one short memory every turn. On a 16-question research task it peaks at 1,040 tokens of context, where a 14B model tha

10 chaptersMMAI
P

An Open-Source Vision-Language-Action Model

A 7-billion-parameter model writes each robot move as seven words from a 256-word vocabulary, and beats a 55-billion-parameter rival by 20 points of s

10 chaptersMMAI
P

VisualWebArena: Evaluating Multimodal Agents on Realistic Visually Grounded Web Tasks: From Absolute Zero to Mastery

A web agent reads a page, then clicks. With only text it finishes 7 of 100 visual tasks. With a screenshot and numbered boxes it finishes 16. A person

10 chaptersMMAI
P

A Foundation Action Model for Generalist GUI Agents: From Absolute Zero to Mastery

OS-Atlas teaches an open model to find the right spot on a screenshot. Its 7B grounding model hits 82.47% of ScreenSpot targets, where the Qwen2-VL-7B

10 chaptersMMAI
P

Mind2Web: Towards a Generalist Agent for the Web, Filter Then Choose

A real web page has over 1,000 elements, far too many to show a model. Mind2Web filters them first, then asks for one choice. Run 100 steps and see wh

9 chaptersMMAI
P

High-Modality Multimodal Transformer

One model reads ten kinds of input, from words to robot forces. It measures which inputs behave alike and shares weights only there: 71.0 average accu

10 chaptersMMAI
P

Multi-Agent Post-Co-Training for Collaborative LLMs with Reinforcement Learning: From Absolute Zero to Mastery

Three small language models debate a maths problem. Left alone, they get worse each turn. Trained together on a verifier’s score, they climb from 0.67

10 chaptersMMAI
P

Training a Large Language-and-Vision Assistant for Biomedicine in One Day

LLaVA-Med turns a general picture-chatting model into a biomedical assistant in under 15 hours on eight GPUs, by letting text-only GPT-4 write the les

10 chaptersMMAI
P

Synergistic Multimodal Comprehension and Creation: From Absolute Zero to Mastery

DreamLLM writes a document and draws its own pictures, deciding where each one goes. It trains by asking a frozen Stable Diffusion to grade its notes,

9 chaptersMMAI
P

An Embodied Multimodal Language Model, From Absolute Zero to Mastery

A language model that can see and act: PaLM-E feeds camera images and robot states into a language model as if they were words, and plans robot tasks

10 chaptersMMAI
P

Autonomous Multi-agent Evolution for Open-ended Discovery

Four coding agents that share one notebook cut a GPU kernel from 1,363 to 1,103 cycles. Fixed evolutionary search stalled at 2,740. Press Run, then sw

10 chaptersMMAI
P

A Multimodal Tutoring System for Collaborative, Visual Problem-Solving: From Absolute Zero to Mastery

It is eleven at night and a student is stuck on an integral. A tutor that draws. It writes code to make an exact diagram, gives one hint at a time, an

10 chaptersMMAI
P

Interactive Generation of Rich Olfactory Experiences with Multimodal Language Models

Describe a smell in words. A language model returns 12 numbers, and a neck-worn device sprays them as pulses. People then picked the generated smell i

10 chaptersMMAI
P

Machine Smell Dataset

Six cheap gas sensors, 50 foods, 68 hours of readings. Teach a Transformer to watch how the signal changes, and it names the food 63.3% of the time. G

10 chaptersMMAI
P

Bringing Full-Hand Touch to Real-World Interaction

A glove can feel a push that a camera never sees. OpenTouch records touch, video and hand pose together, then teaches a model to match them: 7.15% rig

10 chaptersMMAI
P

ASCII Art Jailbreak Attacks

Safety training teaches a model what words mean, not what letters look like. Draw one word as ASCII art and the average attack success on five models

10 chaptersMMAI
P

Trends, Perspectives, and Prospects (Jordan and Mitchell, Science 2015): From Absolute Zero to Mastery

A rule you write by hand stays frozen. A rule learned from examples gets better as the examples grow. Move the slider and watch both try to catch the

10 chaptersMMAI
P

From Absolute Zero to Mastery

A model that sees a picture and its caption together may score no better than two models that each see one. EMAP removes the combining and measures: o

10 chaptersMMAI
P

Eight Classes of How a Picture and Its Words Relate: From Absolute Zero to Mastery

A picture and its caption can agree, clash or say nothing to each other. Three simple questions sort any pair into one of eight classes, and a network

10 chaptersMMAI
14b

AI for Manufacturing, Multisensor Fusion, Metal 3D Printing and Agents That Share Decisions: From Absolute Zero to Mastery

A laser melts metal powder layer by layer, and each sensor sees only part of what can go wrong. Switch sensors on and watch the confusion shrink as th

12 chaptersMMAI
14c

AI for Design, Axiomatic Design and Agents That Think in What and How

A good design starts by asking what the thing must do, never how it will do it. Split the two, and a faucet, a hospital and an AI agent all get easier

11 chaptersMMAI
P

Eighteen Design Rules for AI-Infused Products

Eighteen plain rules for building AI that people can use, distilled from over 150 ideas and tested by 49 designers on 20 products. Switch them on and

10 chaptersMMAI
MIT AI4AI: How to AI an AI34

Follow-along of MIT MAS.S62 AI4AI (Fall 2026): context, harness, model and environment evolution, lecture by lecture as the course proceeds.

01

Introduction, Self-Evolving AI, From Prompted Agents to Automated Improvement Loops: From Absolute Zero to Mastery

An agent that gets better by itself: it tries a task, reads the result, and keeps the changes that help. Run three agents on one task and see when tha

12 chaptersAI4AI
02

Context Evolution: Prompts, Memory and Playbooks That Improve Themselves: From Absolute Zero to Mastery

An AI can improve by editing the text it reads, with no weight updates. Rewrite its notes every round and they collapse. Add small deltas and they kee

12 chaptersAI4AI
04

Harness Evolution

A model alone is an engine. The harness is the rest of the car: memory, tools, skills and loops. Let the model rewrite more of that harness, and the s

11 chaptersAI4AI
05

Harness Engineering and Multi-Agent Systems (How an Agent Is Built Around a Model and When More Agents Help)

Ask a model to fix a bug and it writes a neat paragraph, then nothing runs. An agent is a model plus a harness, the code that runs its loop. Same mode

12 chaptersAI4AI
06

Model Evolution 1: Reinforcement Learning, Distillation and Test-Time Training: From Absolute Zero to Mastery

A model learns from a copy, a score or a critic. Let it write one wrong answer. The copy never sees the mistake, the score hides it, and the teacher m

12 chaptersAI4AI
07

RL in Practice and Self-Play: From a Training Step to Models That Write Their Own Questions: From Absolute Zero to Mastery

A model can write its own practice questions and grade its own answers, but only if the questions sit at the edge of what it can solve. Choose the que

12 chaptersAI4AI
03

LLMs as Optimizers: Context Evolution 2, From Prompt Search to Scientific Discovery: From Absolute Zero to Mastery

Show a model its past attempts with their scores and it proposes a better one. On the same budget of tries that beats blind guessing, and the same loo

11 chaptersAI4AI
P

Large Language Models Are Human-Level Prompt Engineers: From Absolute Zero to Mastery

A language model reads a few examples, writes many candidate instructions, scores each one, and keeps the best. This search matched human prompts on 2

10 chaptersAI4AI
P

Automatic “Differentiation” via Text

TextGrad treats a pipeline of language model calls like a neural network: it backpropagates written criticism instead of numbers. It lifted GPT-4o on

9 chaptersAI4AI
P

Compiling Declarative Language Model Calls into Self-Improving Pipelines: From Absolute Zero to Mastery

One line, dspy.ChainOfThought(“question -> answer”), scores 50.0% on math word problems with GPT-3.5. Compile that same line and it scores 80.3%, with

10 chaptersAI4AI
P

Evolving Prompts In-Context

Cut words out of a clean prompt and its accuracy can rise: a pruned prompt of 10 words scores 86.7% on MultiArith, where the 18-word original scored 8

10 chaptersAI4AI
P

Scaling Agent Self-Evolving with Reasoning Memory: From Absolute Zero to Mastery

An agent that writes down its own lessons beats one that starts blank every time. On 187 shopping tasks it solves 49.7%, where no memory solves 39.0%.

10 chaptersAI4AI
P

Optimization by PROmpting

A language model can search for the best instruction by reading a scoreboard of its own past tries. Within six steps it found “Let’s do the math!”, wh

9 chaptersAI4AI
P

From Absolute Zero to Mastery

Blind expert reviewers scored an AI agent’s research ideas as more novel than ideas from 49 NLP experts: 5.64 against 4.84. They scored them slightly

10 chaptersAI4AI
P

Towards End-to-End Automation of AI Research, Idea, Agentic Tree Search, Write-Up and Automated Review: From Absolute Zero to Mastery

An AI system that dreams up an idea, codes it, runs the tests, writes the paper and reviews it. Give it 32 experiment nodes, not 4, and its paper scor

10 chaptersAI4AI
P

Treating a Prompt as an Environment

Treat a huge prompt as a variable the model reads with code, not as input it must swallow. On 6M to 11M tokens, GPT-5 alone scores 0.0 and an RLM arou

10 chaptersAI4AI
P

A Model That Edits Its Own Context File

An agent’s context fills up. Let the model edit its own context as a file and it scored 59.4% on BrowseComp-Plus at a 32K limit, 11.4% above the best

10 chaptersAI4AI
P

Online Adaptation for Self-Improving Foundation Agents

An agent plays Pokémon Emerald with only a screen and buttons. Every few steps it rewrites its own prompt, skills and memory. On Gemini 3 Pro that cut

10 chaptersAI4AI
P

Disentangling Evolution Capabilities in Self-Evolving LLM Agents: From Absolute Zero to Mastery

Change the model that writes an agent’s harness updates and the agent’s score hardly moves. Change the agent and it moves by tens of points. Try the e

10 chaptersAI4AI
P

How Much Does the Harness Matter for Coding Agents?: From Absolute Zero to Mastery

The same model solves about the same share of coding tasks in two different agent harnesses, yet one bill is double the other: $1.33 a task against $0

10 chaptersAI4AI
P

Facilitating Large Language Models to Master 16000+ Real-world APIs

A model that tries one path gets stuck at the first broken API. ToolLLM lets it back up and try another, and a 7B model learns to call 16,464 real API

10 chaptersAI4AI
P

Benchmarking How Well Agent Skills Work Across Diverse Tasks

Give an AI agent a folder of expert instructions and it passes more tests: 33.9% of 87 tasks without the folder, 50.5% with it. Let the agent write it

10 chaptersAI4AI
P

An Open-Ended Embodied Agent with Large Language Models

Voyager is a GPT-4 agent that plays Minecraft without end. It sets its own goals, writes code to reach them, and keeps every working program. It reach

9 chaptersAI4AI
P

Test-Time Reinforcement Learning

A model with no answer key can still grade itself: let it vote, call the winning answer correct, and reward the rest. On AIME 2024 that took Qwen2.5-M

10 chaptersAI4AI
P

A Model That Writes, Judges and Trains on Its Own Answers: From Absolute Zero to Mastery

A language model writes answers, scores them itself, and trains on its own scores. Three models in a row, M1 to M3, took Llama 2 70B from a 9.94% win

10 chaptersAI4AI
P

Simple Test-Time Scaling, Reasoning From 1,000 Examples and Budget Forcing

A model tuned on only 1,000 reasoning examples gets smarter when you stop it from stopping: append “Wait” and AIME24 accuracy climbs from 50.0% to 56.

10 chaptersAI4AI
P

From Absolute Zero to Mastery

Reinforcement learning lifts a model's first-try accuracy from 9.9% to 42.5%. Yet give the untrained model enough tries, and it solves more problems t

10 chaptersAI4AI
P

A Critical Perspective: Base Models, GRPO Length Bias and Dr. GRPO

Standard GRPO divides each answer’s learning signal by its length, so long wrong answers are pushed down less. Dr. GRPO deletes that division and reac

10 chaptersAI4AI
P

Why Online Reinforcement Learning Forgets Less

Teach a model one new skill and it can forget the rest. This paper finds that reinforcement learning forgets less than supervised fine-tuning, because

9 chaptersAI4AI
P

On-Policy Self-Distillation (OPSD)

One model reads the answer, then grades its own attempt token by token. On AIME25 (a set of hard maths contest problems), a 1.7B model rises from 36.7

10 chaptersAI4AI
P

SDPO, Rich Feedback and the Self-Teacher: From Absolute Zero to Mastery

A model writes code, fails a test, and gets back one number. SDPO lets the same model read the error message and blame the exact tokens that broke the

10 chaptersAI4AI
P

Why a Verifier Beats Copying Expert Traces: From Absolute Zero to Mastery

A model can think longer in two ways: copy expert traces, or learn from a verifier’s yes or no. As the token budget grows, copying falls behind by abo

10 chaptersAI4AI
P

A Challenger and a Solver That Write Their Own Curriculum

A model writes its own hard questions, answers them, and learns from its own vote. This lifts Qwen3-4B-Base from 42.57 to 49.93 on math, with no human

10 chaptersAI4AI
P

Self-Play Through Formal Verification: From Absolute Zero to Mastery

A model writes its own coding problems, solves them, and learns only from programs a formal checker proved correct. That lifted pass@1 on Dafny2Verus

10 chaptersAI4AI
Brain-Computer Interfaces44

From the spike to the brain foundation model: neuroscience, signal processing for neural data, decoding and estimation, and the landmark BCI papers, each its own lesson.

02

Spikes to Rates: Poisson Spiking, Cosine Tuning and the Population Vector: From Absolute Zero to Mastery

One neuron says almost nothing in 200 ms. Forty-eight of them point at a reach within about eight degrees. Move the reach, resample the spikes, and wa

10 chaptersBCI
03

The Recording Map: What Each Brain Sensor Measures and Why EEG Blurs

Every brain sensor listens from a different distance. Move from one neuron out to the scalp and watch two nearby signals merge into one: the same brai

10 chaptersBCI
04

Recording Hardware: Electrodes, Impedance, Utah Array, Neuropixels, Neuralink Threads, Stentrode and Dry EEG: From Absolute Zero to Mastery

Record every sample from 3,072 channels and you push 571 megabits per second out of a head that can barely warm up. Recording hardware is the craft of

10 chaptersBCI
05

Population State Space, PCA and jPCA: From Absolute Zero to Mastery

Record a few dozen neurons during a reach and every trace looks different. Treat the whole population as one point, and that point turns in a clean lo

11 chaptersBCI
07

IIR vs FIR, Band-Pass for Spikes and LFP, Notch, Causal vs Zero-Phase Filters: From Absolute Zero to Mastery

A raw electrode trace hides its spikes under hum and slow waves. A filter carves them out, but a filter that peeks at the future cannot run inside a l

11 chaptersBCI
08

Spike Detection

One electrode hears 30,000 numbers a second. A threshold set from the median of the noise, not its spread, turns them into the spike events a brain-co

11 chaptersBCI
09

Spike Sorting

One electrode hears several neurons at once. Sorting cuts out each spike, turns its shape into a point, and groups the points. Add noise and the group

12 chaptersBCI
10

Power, Radio Bandwidth, Spike-Band Power and Fixed-Point DSP for Brain Implants: From Absolute Zero to Mastery

Picture a chip the size of a coin under your skull, listening to 1,024 wires in the brain. Recorded raw, they make 491.5 Mbit/s, which is 491.5 millio

9 chaptersBCI
11

Blinks, Muscle, Hum, Bad Channels and ICA

A raw EEG is mostly not brain. Blinks, jaw muscle, mains hum and a loose electrode bury the signal. Switch each fix on and watch the leftover junk fal

10 chaptersBCI
13

ERPs and the P300 Speller: Averaging a Hidden Bump Out of Noise

Your brain makes a small bump when the letter you want flashes. Add up enough flashes and the bump beats the noise, so a computer can read the one let

10 chaptersBCI
14

Spatial Filters and Common Spatial Patterns: From a Blurred Scalp to CSP, LDA and EEGNet: From Absolute Zero to Mastery

Every scalp electrode hears the whole brain at once. A spatial filter is a weighted sum of electrodes that listens to one part. Common spatial pattern

11 chaptersBCI
15

From Binned Spikes to Hand Velocity with Lagged Regression, Ridge and Neuron-Dropping Curves: From Absolute Zero to Mastery

Spike counts from a few dozen neurons become a moving hand through one line of linear algebra. See when that line works, when it fails, and what ridge

10 chaptersBCI
16

Turning Spikes into a Moving Cursor with a State-Space Model

A cursor must glide, but spike counts jitter. The Kalman decoder fuses a physics prior with 70 ms of spikes and turns noisy counts into a smooth path.

10 chaptersBCI
01

Hodgkin-Huxley From Membrane to Action Potential

The brain talks in voltage blips, each about one millisecond wide. Drive a model neuron with current, watch four gates open and close, and see why eve

11 chaptersBCI
06

Amplifiers, Referencing, Filters and ADCs for Neural Signals: From Absolute Zero to Mastery

A neural spike is about 100 microvolts, riding on millivolts of mains hum and a drifting electrode offset. Five parts lift it out. Each one can also d

10 chaptersBCI
18

Point-Process GLM

A neuron’s spike train is a coin flipped every few milliseconds. A stimulus filter and a spike-history filter set how the coin is weighted.

11 chaptersBCI
24

Task-Trained Networks: Goal-Driven Deep Nets and Recurrent Networks as Models of the Brain: From Absolute Zero to Mastery

Train a network to do a job, never show it a single neuron, and real neurons can still agree with it. The better the network does the job, the better

12 chaptersBCI
12

Delta to Gamma, Power Spectra, Spectrograms, Wavelets and Event-Related Desynchronization for Brain-Computer Interfaces: From Absolute Zero to Mastery

Imagining a movement does not add a signal to the EEG. It removes one: the 8 to 13 Hz mu rhythm over the matching side of the head drops, and a decode

11 chaptersBCI
P

From Imagined Letters to 90 Characters per Minute (Willett 2021)

A man who cannot move his hand imagines writing letters, and a recurrent network turns his motor cortex activity into text at 90 characters per minute

10 chaptersBCI
20

Denoising Single-Trial Neural Population Activity

One trial of spikes is a noisy dice roll. LFADS learns the hidden dynamics behind it and returns smooth rates, so a decoder reads hand velocity at R²

11 chaptersBCI
21

Stabilizing Brain-Computer Interfaces with Manifold Alignment, NoMAD and FALCON: From Absolute Zero to Mastery

Brain signals drift, so a decoder tuned on Monday misreads the brain by Friday. Drag the days and watch a cursor lose its way, then fix it by realigni

10 chaptersBCI
22

Bitrate, ITR, Fitts Throughput, WER and CER

One typing session, three honest scores. A brain interface that picks the right target 9 times in 10 is not a 9 out of 10 interface in bits. Count the

11 chaptersBCI
P

Decoding Attempted Speech from Spikes (Willett 2023, Card 2024): From Absolute Zero to Mastery

A man with ALS cannot speak clearly. Electrodes in his cortex, a neural network and a language model turn his attempted words into text at 62 words pe

10 chaptersBCI
29

Invasive vs Non-Invasive, Neuralink, Synchron, Paradromics, Precision, Blackrock, Sabi and Merge: Peer-Reviewed Results vs Claims: From Absolute Zero to Mastery

Every brain-computer interface company sells a place to listen: outside the skull, on the brain, or inside it. The closer the sensor sits, the cleaner

10 chaptersBCI
19

Factor Analysis, GPFA and Single-Trial Trajectories

One recorded trial gives you thousands of spikes and one hidden signal behind them. Factor analysis and Gaussian-process smoothing recover that signal

11 chaptersBCI
P

How Four Teams Cut Speech-BCI Word Errors

Four teams improved one speech-BCI decoder. The winner cut word errors from 9.7% to 5.77% by merging ten decoders with a fine-tuned language model.

10 chaptersBCI
P

Implications for Speech Neuroprostheses (Kunz et al. 2025): From Absolute Zero to Mastery

Your silent inner voice leaves the same word pattern in motor cortex as spoken effort, only smaller. A decoder can read it on purpose and stay silent

9 chaptersBCI
17

Why Offline Accuracy Misleads a Brain-Computer Interface

A decoder that scores well on recorded data can still steer a cursor badly. Retrain it on what the user meant, and in this toy a 31% hit rate becomes

10 chaptersBCI
P

A Unified, Scalable Framework for Neural Population Decoding: From Absolute Zero to Mastery

POYO turns every spike into a token, so one model learns from many monkeys and sessions, then reads a brand-new session by learning only one small vec

10 chaptersBCI
23

The 15 Millisecond Budget from Electrode to Cursor: From Absolute Zero to Mastery

A brain implant only helps if the cursor answers fast. A public Neuralink description aims for 15 ms from neural stream to device control. Pick a bin

10 chaptersBCI
P

Brain-to-Voice Decoding from Intracortical Arrays (Wairagkar 2025): From Absolute Zero to Mastery

A man with ALS tries to speak. Four electrode arrays, a transformer and a vocoder turn his brain activity into his voice every 10 milliseconds, so he

10 chaptersBCI
P

Representation Learning for Neural Population Activity

A transformer reads 70 bins of spikes at once and recovers the hidden firing rates as well as a recurrent network does, in 3.9 ms instead of 26 ms.

10 chaptersBCI
P

Pretraining Transformers on Spikes for Brain-Computer Interfaces

A decoder pretrained on 2,000 hours of other people’s brain spikes learns your brain from far less of your data, until you hand it 1.5 hours of your o

10 chaptersBCI
25

LLMs and the Language Brain, Encoding Models and Predictive Processing

Fit one linear map from a language model’s features to a brain recording, and the model predicts the brain almost as well as the noise allows. What do

11 chaptersBCI
P

Shared-Subject Models Enable fMRI-To-Image With 1 Hour of Data, Explained From Zero

One model, pretrained on seven brains, redraws what a new person saw after just one hour of their scan. Forty hours of data bought a better picture, b

10 chaptersBCI
27

Adaptive Deep Brain Stimulation and Brain-Spine Interfaces: From Absolute Zero to Mastery

A Parkinson’s implant that stimulates only when a brain rhythm rises, and a spine implant that turns the thought of stepping into steps. Both close th

11 chaptersBCI
P

Brain-to-Text Decoding via Typing from Non-invasive MEG and EEG: From Absolute Zero to Mastery

A volunteer types a memorized sentence on a hidden keyboard while a MEG scanner listens. The decoder writes it back with 32% character error on averag

10 chaptersBCI
P

Mesh of Idealized Neural Trajectories

Every 20 ms, an electrode array reports how many spikes each motor neuron fired, and a decoder must say how the hand is moving. MINT asks which stored

10 chaptersBCI
P

A Digital Twin of the Mouse Visual Cortex: From Absolute Zero to Mastery

Show a mouse a movie type it never trained on, and a model fitted to other mice can still guess each neuron. Wang et al. (2025): 0.65 accuracy in unde

10 chaptersBCI
P

Reconstructing Continuous Language from Non-Invasive Brain Recordings: From Absolute Zero to Mastery

An fMRI decoder writes English from a brain scan: a language model proposes words, a brain model scores each guess against the scan, and a beam keeps

10 chaptersBCI
28

Class III Software, IEC 62304, ISO 14971, ISO 13485 and the BrainGate and SWITCH Safety Records: From Absolute Zero to Mastery

Change one line of software in a brain implant and a chain wakes up: hazards, safeguards, tests. In our toy system a label fix reruns 1 of 13 tests. A

11 chaptersBCI
P

LaBraM and CBraMod: One Pre-Trained Model for Every EEG Cap: From Absolute Zero to Mastery

EEG caps differ in channels and length. LaBraM cuts every recording into 1-second patches, learns to name hidden ones, and lifts TUEV balanced accurac

10 chaptersBCI
26

Chaotic Networks That Behave Like Cortex

A random network of 300 chaotic units can learn to draw a clean wave in a few seconds. Train only its readout, with recursive least squares, and the w

11 chaptersBCI
P

CEBRA

CEBRA draws a map of brain activity by pulling together moments that share a behavior and pushing the rest apart. It read a rat’s position to within 5

10 chaptersBCI
Firmware from Zero to Expertise67

One place to learn firmware from a blank chip to shipping products: datasheets, startup, interrupts, DMA, RTOS, bootloaders, debugging, testing, security, Zephyr and Rust, then tracks for audio, camera, lidar, IMUs, BLE wearables, motors, edge ML, time sync and biopotential front ends.

CORE

Firmware from Zero, Step 1

An accelerometer sends two bytes, 0xFF then 0x9C. Read them in one order and the board sits still at −0.006 g. Read them in the other and it claims −1

10 chaptersFirmware
CORE

From Register Map to Driver, Event Loops and Mastery

A sensor on a wire is only a promise until a driver keeps it. Write one IMU driver three ways and watch the CPU load fall from 11.8% to 3.3% when DMA

10 chaptersFirmware
CORE

Where Memory Goes

A chip has one pool of RAM, and the stack, the heap and your globals share it. Learn to measure each, fix what fragments, and make an overflow stop lo

10 chaptersFirmware
CORE

Chain of Trust on an MCU: Signed Images, Debug Lock, TrustZone-M and Key Storage: From Absolute Zero to Mastery

Anyone who can plug in a cable can run their own code on your device, unless the chip checks who signed it. Break a toy lock three ways, then switch o

11 chaptersFirmware
CORE

West, Devicetree, Kconfig, Drivers, Logging and the Sensor API

One devicetree line moves a blinking LED to another pin. One Kconfig line decides whether a driver exists at all. See how Zephyr turns small text file

11 chaptersFirmware
CORE

no_std, Ownership of Peripherals, HALs, Embassy and RTIC, and Where unsafe Lives: From Absolute Zero to Mastery

Two interrupts and one UART. In C the build passes and your message sometimes arrives torn. In Rust the build refuses until you say who owns the port.

11 chaptersFirmware
CORE

Registers, Timing, Errata, Pins

One bit in a sensor’s control register wakes the chip, and the datasheet says which. Flip the bits, send the write, and read the chip’s reply to every

11 chaptersFirmware
CORE

A Sensor Node from a Blank Chip

Take a blank STM32 chip to a battery sensor node that must pass six tests: fast response, one year on a cell, a power cut, an update, injected faults

11 chaptersFirmware
CORE

Non-Volatile Storage: Flash Pages, Wear Levelling, LittleFS and the Write That Lost Power: From Absolute Zero to Mastery

Cut the power while a setting is saved. Overwrite it in place and the chip wakes up holding a number you never saved. A journal or copy-on-write keeps

10 chaptersFirmware
CORE

SWD, GDB, OpenOCD, RTT, Trace, Coredumps and Cycle Counters: From Absolute Zero to Mastery

A chip crashed and its screen is dark. Read two registers and one map, and the crash names the function that failed and the kind of mistake. Then we a

11 chaptersFirmware
CORE

Flags, Sections, Size Budgets, CMake and CI: From Absolute Zero to Mastery

One new line of C made a gripper’s firmware 40 KB bigger, and it stopped fitting. The linker’s map file shows which line did it, and a few flags and c

11 chaptersFirmware
CORE

Test Firmware Without the Board: Host Unit Tests, Fakes, Emulation (Renode), HIL and CI: From Absolute Zero to Mastery

One bug in a sensor driver costs about 10 minutes per try on a board and about 2 seconds on your laptop. Pick where you test, then count the tries.

10 chaptersFirmware
CORE

Clock Tree, PLL, Pin Mux and the Blink That Does Not Blink: From Absolute Zero to Mastery

Your board is powered and your code compiles, yet the LED stays dark. Four hidden gates stand between main() and the light: a clock, a pin mode, a mux

11 chaptersFirmware
CORE

Sampling Without Jitter: From Absolute Zero to Mastery

A hardware timer ticks at an exact rate. Let it start the ADC and every sample lands on the tick. Read the ADC inside an interrupt, and busy code shif

11 chaptersFirmware
AUD

ADC/DAC, Gain Staging, I2C Control, Power Sequencing and Pop Suppression: From Absolute Zero to Mastery

A codec turns a microphone’s tiny voltage into numbers, and numbers back into sound. Set its gain, its power-up order or its control bytes wrong, and

10 chaptersFirmware
CORE

Dual Bank, Image Signing, Rollback and DFU Over UART, USB, BLE and CAN: From Absolute Zero to Mastery

A firmware update rewrites the only program that runs the device. Cut the power at the wrong moment and you have a brick. Pick a design, pull the plug

10 chaptersFirmware
AUD

Ping-Pong Buffers, Underruns, Two Clocks That Disagree and ASRC: From Absolute Zero to Mastery

Two crystals never run at exactly the same speed. At 50 ppm on a 48 kHz stream, the buffer gains 2.4 samples every second, and sooner or later you hea

10 chaptersFirmware
RNG

The Speed of Light as a Clock

Light travels 15 cm in one nanosecond, so a sensor that times an echo can measure distance. Three ways to time it: a pulse, a phase, and a chirp.

11 chaptersFirmware
AUD

UAC2, Async Feedback and LE Audio LC3

A PC and a USB speaker run on two separate clocks. One tiny feedback number keeps the buffer between them from running dry, and Bluetooth LE Audio sol

11 chaptersFirmware
CAM

Camera Sensor Bring-Up

A camera sensor stays silent until power, clock and reset arrive in the right order. Bring up a virtual sensor, fix its init table, and make the test

10 chaptersFirmware
AUD

Microsecond Latency, Sample-by-Sample vs Block, Feedforward ANC and the Beamformer in Firmware

Anti-noise must reach your ear at the same moment as the noise. Slide the loop delay and hear silence turn into a louder hum.

10 chaptersFirmware
CAM

Device Tree, Regulators, regmap, Controls and Streaming

A camera sensor boots only if the driver powers it in the right order. Fill in a driver, bind it with a device tree, and watch one stream start after

10 chaptersFirmware
RNG

Photon Arrivals, Bin Width, Pile-Up and Background Light: From Absolute Zero to Mastery

A single-photon lidar pixel catches at most one photon per laser shot, so it builds a histogram of thousands of shots. Sunlight arrives first and hide

10 chaptersFirmware
CAM

DVP, DCMI and JPEG

A 640 by 480 RGB565 frame is 614,400 bytes, almost five times the SRAM an STM32F407 lets the DMA reach. Plan where every frame lives before the first

10 chaptersFirmware
CAM

Descriptors, Probe/Commit, Payload Headers and Isochronous Bandwidth: From Absolute Zero to Mastery

A webcam works on any computer because its firmware answers a few fixed questions in a fixed format. Pick a picture size and rate, and see which USB b

10 chaptersFirmware
RNG

Range, Intensity, Per-Point Timestamps, UDP Layout and Bandwidth

A spinning lidar finds a peak in a photon histogram, packs it into 12 bytes, and sends 254 million bits every second. Turn the knobs and see where the

10 chaptersFirmware
AUD

I2S, TDM, PCM Frames and PDM Microphones

Three wires carry sound between two chips. Move the data one clock tick, flip a channel, or pick the wrong slot width, and one ear turns to noise. Fix

11 chaptersFirmware
AUD

Wake Word on an MCU

A microcontroller hears 16,000 samples a second all day. Every 20 ms it turns the newest ones into 40 numbers, scores them, and sleeps. One threshold

11 chaptersFirmware
RNG

Scan Patterns, Encoder Sync, Pulse Timing Jitter and Eye-Safety Interlocks: From Absolute Zero to Mastery

A spinning lidar fires its laser about twenty thousand times a second. Each shot that is late by a few microseconds slides a dot sideways by centimetr

11 chaptersFirmware
AUD

Fixed-Point Q15 and Q31, Biquads, FIR, FFT, SIMD and the Cycle Budget per Block: From Absolute Zero to Mastery

A 168 MHz Cortex-M4 has 3,500 cycles to spend on every audio sample at 48 kHz. Learn to spend them well: Q15 maths, filters, the FFT, SIMD and the bud

10 chaptersFirmware
BLE

Phone Sync That Survives Reality, Store-and-Forward Logs, Retries, Reconnect, Clock Reconciliation: From Absolute Zero to Mastery

A wearable takes one reading a second. You walk out of Bluetooth range for 20 seconds. Without a plan, 20 readings vanish or arrive twice.

9 chaptersFirmware
RNG

PPS, NMEA, PTP and Motion Deskew

A spinning lidar needs 100 ms to draw one picture, so every point has its own moment. Give a point the wrong time and a moving robot sees its wall ben

10 chaptersFirmware
RNG

VL53-Class Multizone ToF, Ultrasonic and mmWave Radar: Driver Patterns, Crosstalk, Calibration: From Absolute Zero to Mastery

In our model, a cover glass in front of a time-of-flight sensor makes a wall look 18 mm away. Learn the driver, the crosstalk calibration and the offs

11 chaptersFirmware
IMU

Bias, Noise Density, ODR, Range

An IMU never reports motion. It reports motion plus an offset plus noise, clipped to a range and sampled at a rate. Leave one still and its datasheet

9 chaptersFirmware
IMU

Always-On MCU, Wake-Up Gestures, Batching to the Application Processor: From Absolute Zero to Mastery

Watching a motion sensor with the main processor drains a battery in hours. A tiny always-on chip does the same watching on tens of microamps and wake

11 chaptersFirmware
BLE

Design a One-Year CR2032 Device

A CR2032 holds 240 mAh and a year has 8,760 hours. Divide them and the design is one number: 27 microamps, averaged over every sleep, burst and sag.

11 chaptersFirmware
ML

TFLM, CMSIS-NN Kernels, the Tensor Arena and Operator Fusion: From Absolute Zero to Mastery

A neural network is a recipe that needs memory at every step. See how a chip with 320 KB of SRAM runs one: the arena, the planner and the kernels that

10 chaptersFirmware
ML

Quantization on a Microcontroller: Scales, Zero Points, Requantization, Overflow and Parity With Python: From Absolute Zero to Mastery

A tiny chip must add up 144 small products to get one output of a neural network. Keep the running total in a 32-bit register and it matches the float

9 chaptersFirmware
IMU

Sensor Clock vs Host Clock, Batching, Interpolation: From Absolute Zero to Mastery

A motion sensor keeps its own clock and its own queue. Read the queue late and samples vanish. Stamp it carelessly and every sample lies about when it

12 chaptersFirmware
IMU

Gyro Bias, Magnetometer Hard and Soft Iron, Temperature and Factory Coefficients in Flash: From Absolute Zero to Mastery

A cheap motion sensor is wrong in four ways, and its compass can point nearly 50 degrees off. Turn it through every direction, fit the errors away, an

9 chaptersFirmware
BLE

Why a Stolen Phone Is Not a Stolen Ring

Two Bluetooth devices must agree on a secret while a stranger listens, and maybe stands in between. One check, six digits on two screens, separates a

11 chaptersFirmware
BIO

The Microvolt Signal Chain: Skin Interface, Instrumentation Amp, CMRR, Bias Drive, Delta-Sigma ADC: From Absolute Zero to Mastery

A brain signal is about 20 millionths of a volt, and the mains wiring around you can push in far more. Switch the bias drive on and watch the hum fall

11 chaptersFirmware
BLE

Advertising, Connection Events, Intervals, Latency, GATT, MTU and Throughput: Firmware from Zero to Expertise

A Bluetooth LE ring sleeps almost all the time. It wakes for a few milliseconds each interval to swap packets with a phone. Change the interval, radio

11 chaptersFirmware
SYNC

Many MCUs, One Timeline: Sync Pulse and Counter, Two-Way Exchange Over UART/SPI/BLE, Offset and Skew Filters: From Absolute Zero to Mastery

Three chips, three crystals, one recording. Left alone, the always-on chip drifts 186 ms in ten minutes. A two-way exchange and a Kalman filter hold a

10 chaptersFirmware
ML

Helium, DSP Extensions, Small NPUs, DMA Into SRAM and Partitioning: From Absolute Zero to Mastery

A keyword spotter needs 1.49 million multiply-adds per answer. In our model of one chip family, a Cortex-M4 takes 7.8 ms, a Cortex-M55 1.9 ms, and an

10 chaptersFirmware
ML

Profile and Ship

A model that runs is not a model that ships. Pick a chip, set an energy budget, and see which of five models still fit in flash, fit in RAM, and stay

9 chaptersFirmware
MOT

Brushed, BLDC, Steppers, H-Bridge, Hall Sensors and Six-Step Commutation

A brushless motor has no brushes to switch its coils. Your firmware does it, six times per turn of the magnetic field, using three Hall sensors. Get t

11 chaptersFirmware
MOT

A CAN Joint Controller

Cut the cable to a robot joint and a naive joint keeps turning at 0.8 rad/s into its hard stop. A guarded joint notices in 30 ms and brakes itself. Bu

11 chaptersFirmware
SYNC

Clap/LED Events, Cross-Correlation, Residual Plots, XDF-Style Recording: From Absolute Zero to Mastery

Two recorders each started at zero and each kept their own clock. After an hour, a flash and a click let you line them up to under 1 millisecond, and

10 chaptersFirmware
BLE

Wi-Fi, BLE and Thread

Wi-Fi, Bluetooth LE and Thread share one slice of 2.4 GHz air. Their frames collide, unless something decides who talks next. Here you play that somet

10 chaptersFirmware
BIO

DRDY-Driven SPI and DMA for the ADS1299: 24-Bit Samples, Status Bits, Lead-Off, Packet Counters and Loss Detection: From Absolute Zero to Mastery

An EEG chip hands your microcontroller 250 frames every second. Lose one and nothing complains: the recording just gets 4 ms shorter. A counter byte i

10 chaptersFirmware
BIO

Biopotential Firmware, From Absolute Zero to Mastery

Mains hum is hundreds of times bigger than the brain signal you want. Run one recording through three filters and watch each trade delay against ringi

9 chaptersFirmware
BIO

BLE and Wi-Fi Packets, Counters, Retransmit and LSL-Style Timestamps: From Absolute Zero to Mastery

A radio drops packets and never tells you. Number every packet, stamp every sample from a clock you trust, and you can rebuild the exact timeline of a

10 chaptersFirmware
PAI

Fail-Safe Firmware: From Absolute Zero to Mastery

A watchdog kicked from a timer interrupt never catches a hung program, because the interrupt keeps running. Move the kick to a health check and the ha

8 chaptersFirmware
ML

Sensor to Model Input Under a Latency Budget

A microphone sends 16,000 numbers a second, but a model wants 1,960. Cut the stream into windows, boil each to 40 numbers, and keep the delay and the

11 chaptersFirmware
IMU

Madgwick, Mahony and a Fixed-Point EKF

Three ways to turn gyro and accelerometer readings into a tilt cost from 113 to 894 cycles a sample on a Cortex-M4F. Run all three on one motion, then

10 chaptersFirmware
PAI

Context Switch, Stacks and the FromISR Rule: From Absolute Zero to Mastery

Three tasks share one chip’s memory, and nothing stops one stack from growing into the next. Size each stack from its measured high-water mark plus an

9 chaptersFirmware
SYNC

Crystals, RTCs and Drift: ppm, Temperature, Counters That Wrap: From Absolute Zero to Mastery

A chip tells time by counting the ticks of a crystal, and no two crystals tick at the same speed. Two clocks that are each 20 parts per million off dr

11 chaptersFirmware
SYNC

Input Capture, Frame-Sync Pins, Trigger Fan-Out and the Jitter of an ISR Stamp: From Absolute Zero to Mastery

An edge on a pin happens once. A stamp taken inside an interrupt arrives 0.1 to 40 µs late, and the delay changes every time. Let the timer hardware r

10 chaptersFirmware
MOT

Quadrature, Absolute SPI and BiSS, Position, Velocity and Current Loops, Tuning: From Absolute Zero to Mastery

A robot joint must land where you tell it. An encoder reports the angle, and three nested loops turn that report into motor current. Switch the tuning

12 chaptersFirmware
PAI

Why Your Low-Priority Handler Waits for Everyone Above It: From Absolute Zero to Mastery

A Cortex-M chip starts a handler in 12 cycles, yet a low-priority handler still waits for every handler above it. Fire three interrupts and watch the

9 chaptersFirmware
PAI

Every Bus Fault Has a Waveform That Names It

Nine clock pulses free an I2C bus that a reset could not, because the peripheral is still waiting to finish its byte. Break the bus below, then fix it

10 chaptersFirmware
BIO

Patient Isolation, IEC 60601 and IEC 62304: From Absolute Zero to Mastery

A tiny classifier on a chip reads brain signals four times a second and guesses what you intend. Learn how it decodes, and the safety rules that stop

12 chaptersFirmware
PAI

Sleep States, Wake Sources and the Battery Budget

A coin cell lasts 98 days at 100 µA of sleep current and 2.7 years at 10 µA. A faster CPU cannot fix that: below 1% duty, the sleep floor is the whole

10 chaptersFirmware
PAI

Schematic, Scope, Console and Root Cause Across the Boundary: From Absolute Zero to Mastery

A logic analyser said the bus was clean, yet the bytes were wrong. A scope showed ringing the analyser could not see. Root cause is a short chain of m

9 chaptersFirmware
PAI

Deterministic Buses for Motion

Two CAN nodes start talking in the same microsecond, and the lower identifier wins without losing a single bit. EtherCAT gets the same order the other

8 chaptersFirmware
PAI

FOC: The Current Loop at 20 kHz: From Absolute Zero to Mastery

A torque command becomes one number, the current that makes torque, and a small loop runs 20,000 times a second to hold it. Run that loop too slowly a

9 chaptersFirmware
Princeton NEU 560: Statistical Modeling of Neural Data23

Follow-along of Jonathan Pillow's NEU 560 (Spring 2024): linear algebra to GLMs, latent variable models, VAEs and dynamical systems for neural data.

03

Principal Components Analysis, From Absolute Zero to Mastery

Many neurons fire together, yet the activity of a population often moves along a few directions. PCA finds those directions and gives each one a numbe

11 chaptersNEU 560
02

SVD and Its Applications, the Singular Value Decomposition for Neural Data from Absolute Zero to Mastery

Sixteen neurons over 48 moments make a table of 768 numbers. Any such table is a rotation, a stretch and another rotation, and its few strongest stret

11 chaptersNEU 560
01

Course Intro and Linear Algebra, Neural Data from Spikes to Vectors

A neuron in your eye does not report light. It reports a difference, centre minus surround, as a rate of spikes. Move both lights and count the spikes

12 chaptersNEU 560
06

Probability Review, Joint to Independence

Two neurons fire together, so their activity has one joint shape. Squash it to forget a neuron, slice it to learn from one, and flip the slice with Ba

11 chaptersNEU 560
07

Statistics and Entropy

A neuron fires 0 to 7 spikes in a window. How many yes/no questions does it take to learn the count? A quiet neuron needs fewer than a bursty one.

11 chaptersNEU 560
05

Neuroscience Applications of PCA and Least Squares: Eigenfaces, Output-Null Dimensions and Movement-Dominated Cortex: From Absolute Zero to Mastery

Motor cortex can plan a reach while the muscles stay still, because the muscles read only one direction of the population. Least squares and PCA find

12 chaptersNEU 560
09

Maximum Likelihood and Generalized Linear Models: Encoding Models for Spikes: From Absolute Zero to Mastery

One knob sets how strongly a model neuron fires. Turn it until the recorded spikes look least surprising. That setting is the maximum likelihood estim

11 chaptersNEU 560
13

Model Selection, Cross-Validation and Evidence

You recorded one neuron and fitted a filter of 100 weights to it. Pull the weights toward a prior and the filter calms down. Pull too hard and it goes

11 chaptersNEU 560
17

EM for Mixtures of Gaussians: Fitting Hidden Clusters in Neural Data: From Absolute Zero to Mastery

Spikes from two neurons arrive mixed together with no labels. Expectation-Maximization guesses the labels, refits both neurons, and repeats until the

12 chaptersNEU 560
04

PCA II and Least Squares

A neuron fires more as contrast rises. Choose the line that predicts its spike counts with the smallest total squared miss, and see how one formula fi

11 chaptersNEU 560
08

Information Theory: Entropy, Mutual Information, KL Divergence, Data Processing and Efficient Coding for Neural Data: From Absolute Zero to Mastery

A neuron’s spikes are a code. Information theory counts the yes/no questions that code can answer, and shows why the best neurons use every spike coun

12 chaptersNEU 560
12

MAP Inference: Regularization as a Prior on a Neuron's Filter: From Absolute Zero to Mastery

A neuron’s filter hides inside noisy data, and plain least squares returns a scribble. Add a prior, a belief about the filter’s shape, and the same da

11 chaptersNEU 560
14

The Laplace Approximation: Posteriors, Error Bars and Evidence for Neural Models: From Absolute Zero to Mastery

You fit one neuron and get one number for its weight. The Laplace approximation adds the error bar: a bell curve whose width comes from how sharply yo

12 chaptersNEU 560
15

Latent Variable Models: Hidden Structure Behind Neural Data

Forty neurons fire with no stimulus, yet they rise and fall together. One hidden signal drives them all, and with 40 neurons we recover it almost exac

11 chaptersNEU 560
16

Expectation Maximization, Fitting a Model With Hidden Labels, From Spike Sorting to the Free Energy: From Absolute Zero to Mastery

Sort the spikes of two hidden neurons without being told which is which. Expectation maximization guesses the labels, refits the model, and repeats. E

10 chaptersNEU 560
19

Factor Analysis and Probabilistic PCA: Finding the Hidden Driver Under Noisy Neurons: From Absolute Zero to Mastery

Six neurons share one hidden driver, and one of them is loud and noisy. Factor analysis still finds the driver’s loadings where PCA chases the noise.

11 chaptersNEU 560
10

GLMs II: Poisson GLMs for Spike Trains, Bernoulli and Gaussian Noise, Likelihood and Spike-History Filters: From Absolute Zero to Mastery

A spike count can never be negative, yet a straight line happily predicts minus two spikes. Swap the line for an exponential and the noise for a Poiss

10 chaptersNEU 560
11

Regularization: Multi-Neuron GLMs, Convexity and Penalized Maximum Likelihood for Neural Data: From Absolute Zero to Mastery

A neuron model with 100 knobs and only 100 noisy samples fits the noise, not the neuron. A small penalty on the knobs pulls the estimate back toward t

12 chaptersNEU 560
18

Monte Carlo and Importance Sampling

A neuron fires 4 spikes on one trial and 12 on the next, and a hidden drive you cannot record explains part of the gap. To score a model of it, you mu

11 chaptersNEU 560
20

Variational EM and VAEs

A variational autoencoder fits a hidden-variable model of neural activity by climbing a lower bound it can compute, because the exact likelihood is ou

11 chaptersNEU 560
21

Hidden Markov Models and the Hidden State Behind a Spike Train

A neuron drifts between a quiet state and a busy state, and you only see its spikes. A hidden Markov model reads the state back out of the counts.

12 chaptersNEU 560
22

Latent Linear Dynamical Systems and the Kalman Filter-Smoother: Tracking Hidden States Behind Noisy Neural Data: From Absolute Zero to Mastery

A few hidden numbers drive hundreds of noisy neurons. A linear dynamical system tracks them, and the Kalman filter turns jittery readings into an esti

11 chaptersNEU 560
23

Neural Latent Time Series Models: A Survey of Latent Variable Models for Spikes, From Absolute Zero to Mastery

Hundreds of neurons fire, yet a few hidden numbers steer them all. Give a model only the spikes and it can recover that hidden path.

11 chaptersNEU 560
Onboard Perception Software6

The deterministic layer around learned perception on robots and vehicles: tracking, real-time C++, safety architecture, runtime monitors and active safety.

Training on Compute Islands45

Training one model across scattered clusters: the prerequisites in plain words, then every paper the Core Automation post links, each its own lesson.

01

The Datacenter as a Computer: GPUs, NVLink, Bandwidth, Latency and Power: From Absolute Zero to Mastery

A GPU cluster is one machine made of thousands of chips. Its speed depends on how fast they talk, and its size depends on power. Stretch it across an

10 chaptersCompute Islands
02

Why Every GPU Must Agree

Many GPUs train one model by agreeing on one set of numbers after every step. That agreement is the all-reduce, and its price depends on the wire.

10 chaptersCompute Islands
P

A Reliable Effective System (AllReduce on Hadoop)

Spread a model over a thousand machines and they spend their time talking. This paper sums their results up a tree, and trained on 16 billion ad examp

10 chaptersCompute Islands
03

The Parallelism Zoo

Training a big model means cutting the work across many GPUs. Each way of cutting sends different bytes over the wire, and only a few still work when

10 chaptersCompute Islands
04

Bytes per Sync, Gbps, Latency and the Compute-to-Communication Ratio on Compute Islands: From Absolute Zero to Mastery

A 32B model weighs 64 GB. A 25 Gbps link moves 3.1 GB a second. So one sync takes 20 seconds while the GPUs wait. Drag the link and the sync gap to se

11 chaptersCompute Islands
10

Inner AdamW, Outer Nesterov, Streaming and Scaling Laws: From Absolute Zero to Mastery

Train one model on far-apart clusters by syncing every 500 steps, not every step. DiLoCo sends 500 times fewer bytes and still matches fully synchrono

10 chaptersCompute Islands
11

The Whole Picture: Stranded GPUs, Low-Communication Training, a Two-Cluster Run and Butterfly Mixing: From Absolute Zero to Mastery

Scattered GPU clusters sit idle because a training job wants one big block. A 32B model trained across two clusters 9,000 miles apart, on a 25 Gbps li

11 chaptersCompute Islands
05

From Gradient Descent to Inner and Outer Optimizers

Four hikers start on the same foggy slope, and each follows a different rule for the next step. Drag the step slider and watch: at the same pace setti

10 chaptersCompute Islands
P

Slow Momentum for Distributed SGD, From Absolute Zero

Workers that sync rarely save waiting but lose accuracy. SlowMo adds one momentum step per sync and wins it back: Local SGD on ImageNet goes from 69.9

10 chaptersCompute Islands
P

Adaptive Federated Optimization

Thousands of phones each train a little, and the server averages the results. Give the server Adam’s memory and it takes smarter steps, so rare words

10 chaptersCompute Islands
07

Send Fewer Bits (Quantization, Top-k, PowerSGD, Error Feedback, DeMo)

A 32-billion-number update needs 20.5 seconds to cross a 25 Gbps link. Squeeze it 100 times and it needs 0.2 seconds. Try four ways to squeeze, and se

10 chaptersCompute Islands
P

Sending 0.1% of the Gradient and Keeping the Accuracy: From Absolute Zero to Mastery

Training machines swap gradients every step, and on a slow wire the swap takes longer than the work. This paper sends 0.1% of each gradient and keeps

10 chaptersCompute Islands
08

Parameter Servers, Asynchronous SGD, Gossip Averaging and Butterfly Mixing, From Absolute Zero to Mastery

Eight copies of a model learn apart. Then the copies average in pairs, one partner per round. After three rounds all eight agree, with no all-reduce a

11 chaptersCompute Islands
P

Downpour SGD, Sandblaster L-BFGS and Training on Thousands of Machines: From Absolute Zero to Mastery

A network too big for one machine can still learn if hundreds of copies share one set of weights and never wait for each other. Each copy is called a

9 chaptersCompute Islands
P

Can Decentralized Algorithms Outperform Centralized Algorithms? Lian et al., NeurIPS 2017: From Absolute Zero to Mastery

Many machines can train one model with no boss. Each machine swaps updates only with its two neighbours, so no single link jams. Turn the network down

10 chaptersCompute Islands
09

Heterogeneous and Unreliable Compute: Stragglers, Stale Updates, Churn, Failures and Trust: From Absolute Zero to Mastery

Lock-step training moves at the speed of its slowest machine. Make one of eight workers 4 times slower and the machines sit idle 65% of the time. Deci

11 chaptersCompute Islands
P

Crowdsourced Training with Decentralized Mixture-of-Experts: From Absolute Zero to Mastery

Eight PCs on slow home links must train one network together. In a chain, every batch waits for every link, and one dead PC stops all. Learning@home g

10 chaptersCompute Islands
P

Scalable Second Order Optimization for Deep Learning: From Absolute Zero to Mastery

Shampoo steers each training step with two small matrices instead of one huge one. In the paper it halves the steps a Transformer needs, and fewer ste

9 chaptersCompute Islands
06

Talk Less, Average More

Let each worker train alone for H steps, then average the weights. See how much talking you save, and where the average starts to drift away from the

10 chaptersCompute Islands
P

Train Apart, Average at the End: From Absolute Zero to Mastery

Train k copies of a model on k machines with no talking until the end, then average them. The average misses the best answer by about 1 over the squar

10 chaptersCompute Islands
P

Springs Between Workers

Four workers train one model but may talk only every τ steps. The standard method, DOWNPOUR, blows up once τ reaches 16. Elastic Averaging SGD ties ea

10 chaptersCompute Islands
P

Communication-Efficient Learning of Deep Networks from Decentralized Data: From Absolute Zero to Mastery

Phones hold the data and uploads are slow. FedAvg lets each phone train for many steps before the server averages. On MNIST it cut 626 rounds to 18.

9 chaptersCompute Islands
P

Why Workers That Meet Only Now and Then Still Learn K Times Faster: From Absolute Zero to Mastery

Let eight workers train alone and meet only now and then. Stich proves they still learn as fast as workers that meet at every step, with far fewer mee

10 chaptersCompute Islands
P

Post-Local SGD: From Absolute Zero to Mastery

Sixteen GPUs can share work without talking after every step. Train in big batches first, then let each GPU walk alone: 93% test accuracy with about h

10 chaptersCompute Islands
P

Measuring Its Effects and Fixing It with Server Momentum (FedAvgM): From Absolute Zero to Mastery

Train one model across devices that each hold different data and accuracy collapses. Add momentum on the server and the worst case climbs from 30.1% t

10 chaptersCompute Islands
P

Practical Low-Rank Gradient Compression for Distributed Optimization

PowerSGD sends two thin matrices instead of every gradient number. On ResNet-18, rank 2 sends 136 times less data per epoch, runs 23% faster per batch

10 chaptersCompute Islands
P

Decoupled Momentum Optimization: Training Across Slow Links by Sending Only the Fast Part of the Momentum, From Absolute Zero to Mastery

Sending every gradient to every GPU costs 636.9 MB per step at 300M parameters. DeMo sends 7.49 MB, 85 times less, by moving only the fast part of eac

10 chaptersCompute Islands
P

Communication-Efficient Decentralized Training on Heterogeneous Unreliable Devices: From Absolute Zero to Mastery

A swarm of unreliable computers must agree on one average. Moshpit All-Reduce splits the swarm into small groups that reshuffle every round, so a cras

10 chaptersCompute Islands
P

Distributed Deep Learning in Open Collaborations: Training One Model on Volunteer Computers: From Absolute Zero to Mastery

Strangers with mixed GPUs and home internet can train one model together. DeDLOC splits the averaging work by bandwidth, and finished sahajBERT in 8 d

10 chaptersCompute Islands
P

Training Large Models Can Be Surprisingly Communication-Efficient

A rigid training pipeline stops when one worker dies. SWARM sends every batch through whichever workers are alive, and trained a 1B-parameter model on

10 chaptersCompute Islands
P

Distributed Low-Communication Training of Language Models

Two far-apart clusters share a slow wire, so training one model across them stalls. DiLoCo lets each cluster train alone for 500 steps, then meet. On

10 chaptersCompute Islands
P

Globally Distributed Low-Communication Training

Four GPU machines on two continents, joined by slow internet, trained one 1.1 billion parameter model. They shared their work every 500 steps instead

10 chaptersCompute Islands
P

Federated LLM Pre-Training: Training a Billion-Parameter Model Across the Internet: From Absolute Zero to Mastery

Four sites, thin internet links, one 7B model. Averaging local training instead of syncing every step cuts a 7B run from 147.9 to 95.6 hours at 10 Gbp

9 chaptersCompute Islands
P

Overlapping Communication, Towards a Distributed Free Lunch: From Absolute Zero to Mastery

Streaming DiLoCo keeps GPUs busy on a link about 100 times slower than usual: it sends the model in slices, trains while they travel, and shrinks each

9 chaptersCompute Islands
P

Communication-Efficient SGD via Gradient Quantization and Encoding: From Absolute Zero to Mastery

Eight GPUs must tell each other 62 million numbers after every step, and the cable between them is slow. QSGD rounds each number up or down at random,

10 chaptersCompute Islands
P

A Preliminary Report on DisTrO

A training step normally ships every GPU’s whole gradient to every other GPU: 74.4 GB here. DisTrO reports 86.8 MB, the same loss, and a step a home i

10 chaptersCompute Islands
P

Pre-Training a 72B LLM with Trustless Peers Over-the-Internet: From Absolute Zero to Mastery

A 72-billion-parameter model learned from about 1.1 trillion tokens while strangers’ machines joined and left over ordinary internet links, and its GP

10 chaptersCompute Islands
P

Collective and Permissionless Internet-Scale Pretraining of Large Language Models: From Absolute Zero to Mastery

Strangers trained an 8.6-billion-parameter model on home internet links. Agora shrinks the signal between model pieces 100 times and shares only 5% of

10 chaptersCompute Islands
P

A 10B Model Trained Across Three Continents With DiLoCo and Int8 All-Reduce

Ten billion parameters, one trillion tokens, GPUs on three continents joined by ordinary internet: INTELLECT-1 spent 83% of its time computing by talk

10 chaptersCompute Islands
P

Communication-Efficient Language Model Training Scales Reliably and Robustly

Two buildings full of chips share one thin cable, and together they train one AI model. Ordinary training makes the chips wait on that cable. Pick how

10 chaptersCompute Islands
P

A Low-Communication Large-Scale Training Framework for Decentralized Cluster: From Absolute Zero to Mastery

A 107-billion-parameter model trained over a plain 1 Gbps link ran 357 times faster than the textbook method. Pick a model and a training time. See ho

10 chaptersCompute Islands
P

Overcoming the Communication-Performance Tradeoff in LLM Pretraining

SparseLoCo trains a language model while sending only 3% of each update, at 2 bits per value, and still reaches a lower loss (2.70) than DiLoCo, which

9 chaptersCompute Islands
P

Training That Survives Failed Chips: From Absolute Zero to Mastery

At 1.2 million chips, one chip fails about every 26 seconds, and even an elastic job keeps only 58% of its time. Split into eight learners, it keeps 8

10 chaptersCompute Islands
P

Reducing Blocking Communication in DiLoCo

On slow home internet, GPUs sit idle while they wait to average their work. Factored Gossip DiLoCo hides most of that wait: at 200 Mbps it keeps GPUs

10 chaptersCompute Islands
P

Elastic Aggregation, Data Leasing and Queue-Aware Placement: From Absolute Zero to Mastery

Three supercomputers on two continents train one model while sites crash and join. No data block is lost or trained twice. The price is perplexity 34.

10 chaptersCompute Islands
CIS 6280: World Models20

Penn's Fall 2026 course on world models (Jiatao Gu), followed lecture by lecture as the slides are posted.

LECTURE 01

World Models, an Overview

What a world model is: observation, state, transition, memory, prediction, simulation and planning. CIS 6280 Lecture 1.

11 chaptersCIS 6280
LECTURE 02

History, Foundations and Probabilistic Formulation

Trajectory distributions, latent state, partial observability and one-step versus rollout objectives. CIS 6280 Lecture 2.

12 chaptersCIS 6280
LECTURE 03

Environments, Simulators and Rollouts

Environment interfaces, reset and step, physics inside a simulator, and collecting rollouts. CIS 6280 Lecture 3.

12 chaptersCIS 6280
LECTURE 04

State-Space Models

Transition and emission models, filtering, smoothing, observability and belief states. CIS 6280 Lecture 4.

12 chaptersCIS 6280
LECTURE 05

Self-Supervised Representation Learning I

Probes, reconstruction, masked and autoregressive prediction, and contrastive learning. CIS 6280 Lecture 5.

11 chaptersCIS 6280
LECTURE 06

Self-Supervised Representation Learning II

Joint-embedding prediction, target encoders, collapse and how to stop it, action-conditioned JEPA. CIS 6280 Lecture 6.

12 chaptersCIS 6280
LECTURE 07

Latent-Variable and Adversarial Models

VAEs, the ELBO, posterior collapse, GANs, explicit versus implicit generation. CIS 6280 Lecture 7.

12 chaptersCIS 6280
LECTURE 08

Latent World Models

Autoregressive latent prediction, action conditioning, compounding error and World Models (2018). CIS 6280 Lecture 8.

11 chaptersCIS 6280
LECTURE 09

Planning and Control with World Models

MPC, CEM, MPPI and gradient planning with learned dynamics, and their limits. CIS 6280 Lecture 9.

12 chaptersCIS 6280
LECTURE 10

Policy and Value Learning with World Models

LeWM, RSSM and CEM revisited, then policy and value learning in imagination with Dreamer. CIS 6280 Lecture 10.

10 chaptersCIS 6280
LECTURE 11

Dreamer, Diffusion and Flow Matching

Dreamer's imagined experience, VAE to diffusion, DDIM and flow matching. CIS 6280 Lecture 11.

12 chaptersCIS 6280
LECTURE 12

Video Diffusion Models

Guidance, U-Net and DiT video backbones, latent versus pixel, text and image to video. CIS 6280 Lecture 12.

12 chaptersCIS 6280
LECTURE 13

Video World Models and Fast Sampling

Action-conditioned video, diffusion forcing, flow maps, consistency models and MeanFlow. CIS 6280 Lecture 13.

12 chaptersCIS 6280
LECTURE 14

Fast Sampling and Interactive World Models

One-step generation with DMD and MeanFlow, and steerable video rollouts with Self Forcing. CIS 6280 Lecture 14.

12 chaptersCIS 6280
15

Normalizing Flows for World Models

A flow bends hard data into a plain Gaussian and back, so it scores every outcome exactly and samples new ones with the same map. Drag a point and rea

12 chaptersCIS 6280
16

3D and 4D Representations: Points, Meshes, Voxels, Fields, Gaussian Splats and Point Tracks: From Absolute Zero to Mastery

A 3D world can be stored as points, a mesh, a grid of cells or soft blobs. Each one answers different questions, and adding time adds a new one: which

11 chaptersCIS 6280
17

Learning 3D and 4D World Models

Pointmaps, VGGT, NeRF and splats, spatial generation, 4D tracking and PointWorld: learning to predict a moving 3D world.

12 chaptersCIS 6280
18

World Models for Robotics I: Planning and Policy Learning

A policy that only reacts walks into the wall. A planner that imagines 20 steps ahead walks around it, while its model is right.

11 chaptersCIS 6280
19

World Models for Robotics II: VLAs and World-Action Models

Pixels and words straight to actions, or actions plus the future frames: what each design can learn from, and what it costs to run.

11 chaptersCIS 6280
20

LLMs as World Models?

A language model can predict the next state of a room. Chain twelve actions and one early slip spreads; a state tracker stops it.

11 chaptersCIS 6280
CS 329Z: Engineering AI Agents35

Stanford's Fall 2026 course, followed lecture by lecture as it proceeds.

LECTURE 01

What Are Agentic Systems?

Agent loops, ReAct, memory, tool use, RAG, MCP, compound AI systems, reliability, evaluation and safety: CS 329Z Lecture 1.

11 chaptersCS 329Z
ADDITIONAL READING

Execution-Grounded AI Research

Automated AI research, execution grounding, evolutionary search, GRPO, mode collapse, Stanford CS 329Z

11 chaptersVeanor
LECTURE 02

LLMs for Builders

Next-token sampling, attention, training stages, inference, test-time scaling and context engineering: CS 329Z Lecture 2.

13 chaptersCS 329Z
LECTURE 03

Retrieval-Augmented Generation

Grounding, embeddings and vector search, chunking, hybrid search, rerankers and ColBERT late interaction: CS 329Z Lecture 3.

12 chaptersCS 329Z
LECTURE 04

Tool Use & Function Calling

The REPL, function calling, MCP, designing good tools, code sandboxes, errors and retries: CS 329Z Lecture 4.

11 chaptersCS 329Z
LECTURE 05

Frameworks & Orchestration

DSPy signatures, modules and optimizers, LangGraph and LlamaIndex, and how much framework a project needs: CS 329Z Lecture 5.

12 chaptersCS 329Z
LECTURE 06

Agent Design Patterns & Scaffolds

Workflows versus agents, the five workflow patterns, ReAct, Reflexion, CodeAct and ReWOO, and context management: CS 329Z Lecture 6.

12 chaptersCS 329Z
READING · LECTURE 06

CodeAct: Executable Code Actions Elicit Better LLM Agents

Python as the action space: 74.4% against 52.4% for JSON on multi-tool tasks, in fewer turns.

12 chaptersVeanor
LECTURE 07

Agent Memory Architectures

Four kinds of memory, skill libraries, MemGPT tiers, memory streams and when to write, retrieve and forget: CS 329Z Lecture 7.

11 chaptersCS 329Z
READING · LECTURE 07

CoALA: Cognitive Architectures for Language Agents

One blueprint for language agents: four kinds of memory, four kinds of action, one decision loop.

12 chaptersVeanor
READING · LECTURE 07

Generative Agents: Interactive Simulacra of Human Behavior

The memory stream, retrieval by recency, importance and relevance, reflection and planning in Smallville.

12 chaptersVeanor
LECTURE 08

Multi-Agent Systems

Single versus multi-agent, orchestrator, swarm and hybrid, handoffs and A2A, and the failure modes: CS 329Z Lecture 8.

12 chaptersCS 329Z
READING · LECTURE 08

AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation

Conversable agents and conversation programming: 69.48% on MATH against 55.18% for plain GPT-4.

12 chaptersVeanor
READING · LECTURE 08

Why Do Multi-Agent LLM Systems Fail?

MAST: 14 failure modes in 3 families from 1,642 multi-agent traces, and what interventions fix.

12 chaptersVeanor
READING · LECTURE 08

Towards a Science of Scaling Agent Systems

260 controlled setups: more agents helped one task by 80.8% and hurt another by 70.0%; the task decides.

12 chaptersVeanor
LECTURE 09

Optimization

Prompt and program optimization (MIPROv2, OPRO, TextGrad, GEPA) and weight optimization (SFT, PPO, GRPO): CS 329Z Lecture 9.

12 chaptersCS 329Z
READING · LECTURE 09

MIPROv2: Optimizing Instructions and Demonstrations for Multi-Stage Language Model Programs

Optimize every module's instructions and demos from the end metric alone: 6% to 23.3% on HotPotQA Conditional.

12 chaptersVeanor
10

Terminal-Bench and Harbor, Evaluating AI Agents With Real Terminal Tasks

An agent’s score is only as honest as the test that grades it. See one terminal task graded by nine checks, and watch a cheat fool the grader.

11 chaptersCS 329Z
V

Terminal-Bench: Benchmarking Agents on Hard, Realistic Tasks in Command Line Interfaces

An AI agent sits at a blank terminal with a job: rebuild an old program, train a model, break a puzzle. Terminal-Bench 2.0 sets 89 such jobs. The best

10 chaptersVeanor
11

What Data Do Agents Need? Trajectories, Environments, Rewards and the Data That Teaches by Accident: From Absolute Zero to Mastery

An agent learns from two kinds of data: a recorded trajectory it can imitate, and an environment with a checker it can practice against. Run both here

12 chaptersCS 329Z
12

Data Selection and Quality

Which tasks and trajectories to keep: broken-task checks, run-to-verify, difficulty filters, LIMA, SWE-smith and validator alignment.

11 chaptersCS 329Z
12a

SWE-smith: Scaling Data for Software Engineering Agents

Break working code, keep the breaks that fail a test: 50,137 tasks for $1,360 and a 40.2% SWE-bench Verified agent.

12 chaptersVeanor
12b

Who Validates the Validators? Aligning LLM Evaluators with Human Preferences

EvalGen: grade a few outputs yourself, keep the LLM checks that agree, and watch your criteria drift as you grade.

12 chaptersVeanor
13

Evaluation Fundamentals and Benchmark Design

One agent, three scores on the same 100 tasks: the four parts of an eval, benchmark design, and how many tasks you need.

12 chaptersCS 329Z
13a

Establishing Best Practices for Building Rigorous Agentic Benchmarks

A do-nothing agent passes 38% of tau-bench airline tasks. The Agentic Benchmark Checklist catches flaws like this.

11 chaptersVeanor
15

LLM-as-Judge and Evaluation Infrastructure

A judge model agrees with humans over 80% of the time, and still favors the first and the longer answer. Fix the prompt, then validate it.

11 chaptersCS 329Z
15a

Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena

GPT-4 agrees with human experts on 85% of decided votes, yet swapping the two answers can flip its verdict.

10 chaptersCS 329Z
15b

AutoMetrics: Automatically Generated Evaluators

From under 100 thumbs up or down, generate metrics, retrieve more, and fit one weighted evaluator that tracks human judgment.

10 chaptersCS 329Z
16a

SWE-bench: Can Language Models Resolve Real-World GitHub Issues?

A real issue, a real repository, and its own tests as the judge. In the first results the best model resolved 1.96% of 2,294 tasks.

10 chaptersCS 329Z
17

Agent Safety and Risks

One agent with three tools has three ways to cause harm: accidents, attacks and misuse. No single defense cuts all three.

11 chaptersCS 329Z
17a

PrivacyLens: Privacy Norm Awareness in Action

A model can say a flow of information is wrong, then leak it when it acts with tools. One seed, three levels, one gap.

10 chaptersCS 329Z
17b

Searching for Privacy Risks in LLM Agents via Simulation

A search improves the attacker, then the defender, in turn. The leak climbs to 76.0%, then falls to 7.1% by the last round.

10 chaptersCS 329Z
17c

Agentic LLMs as Powerful Deanonymizers

A few harmless details narrow a crowd to one person. What the paper measured on an anonymized release, and what a publisher should do.

8 chaptersCS 329Z
HW1

HW1: Build an Agent Harness (Lesson + Workbook)

The 17 problems of Assignment 1, explained part by part, each with exercises on toy data: pipelines, BM25, tools, the loop, compaction, memory.

11 chaptersCS 329Z
HW2

HW2: Build an Evaluation Task (Lesson + Workbook)

What a task is, how a verifier lies in both directions, and how to design a task that is hard for the right reason. With exercises.

10 chaptersCS 329Z
Machine Learning with Graphs19
Lec 1

Introduction to Graph ML

Why graphs? Node/edge/graph-level tasks. AlphaFold, PinSage, drug interactions, antibiotic discovery.

10 chaptersCS224W
Lec 2

Node Embeddings

Encoder-decoder framework, DeepWalk, node2vec (biased walks with p,q), negative sampling, matrix factorization view.

10 chaptersCS224W
Lec 3

Graph Neural Networks

Message passing, computation graphs, GCN (mean aggregation), GNNs generalize CNNs, transformers as GNNs.

10 chaptersCS224W
Lec 4

GNN Design Space

Message + aggregation framework. GCN vs GraphSAGE vs GAT. Multi-head attention. Skip connections, over-smoothing.

10 chaptersCS224W
Lec 5

GNN Augmentation & Training

Feature/structure augmentation, virtual nodes, neighbor sampling, prediction heads, loss functions, dataset splitting.

10 chaptersCS224W
Lec 6

Theory of GNNs

How powerful are GNNs? WL test, multiset injectivity, why GCN/GraphSAGE fail, GIN achieves maximum expressiveness.

10 chaptersCS224W
Lec 7

Powerful Graph Encoders

Beyond WL: Laplacian eigenvectors, structural features, position-aware GNNs, anchor sets, higher-order k-WL.

10 chaptersCS224W
Lec 8

Graph Transformers

Self-attention on graphs, positional encodings (Laplacian, random walk), Graphormer, GPS hybrid architecture.

10 chaptersCS224W
Lec 9

Heterogeneous Graphs

Multiple node/edge types. RGCN (relation-specific weights), basis decomposition, HGT, metapaths.

10 chaptersCS224W
Lec 10

Knowledge Graphs

TransE, TransR, DistMult, ComplEx, RotatE. Relation patterns: symmetry, composition, 1-to-N. KG completion.

10 chaptersCS224W
Lec 11

GNNs for RecSys

Bipartite graphs, NGCF, LightGCN, BPR loss, PinSage scalability, cold start, GNN vs LLM.

10 chaptersCS224W
Lec 12

Relational Deep Learning

Databases ARE graphs. Foreign keys as edges, GNNs on relational data, RelBench, vs XGBoost.

10 chaptersCS224W
Lec 13

Advanced RDL

Temporal message passing, multi-hop aggregation, Griffin universal encoder, schema-specific vs universal.

10 chaptersCS224W
Lec 14

Advanced GNN Topics

Graph foundation models, pre-training, explainability, equivariant GNNs, dynamic graphs, practical tips.

10 chaptersCS224W
Lec 15

KG Foundation Models

Inductive KG reasoning, ULTRA, cross-schema transfer, foundation models for knowledge graphs.

10 chaptersCS224W
Lec 16

LLM + GNN

LLMs as feature encoders, GNNs as structure encoders, joint pipelines, graph-augmented LLMs.

10 chaptersCS224W
Lec 17

Agents + Graphs

ReAct, Reflexion, graph-grounded agents traversing KGs step by step. Tool use, PPO/DPO optimization, STaRK benchmarks.

10 chaptersCS224W
Lec 18

Deep Generative Models for Graphs

GraphRNN two-RNN sequential generation, GCPN RL-guided design, JT-VAE motifs, diffusion on graphs, molecular benchmarks.

10 chaptersCS224W
Lec 19

Conclusion & The Road Ahead

Full arc from node embeddings to graph foundation models. Open problems, research frontiers, practical advice for GNN practitioners.

8 chaptersCS224W
Deep Learning for Computer Vision28
A2 · Forge

CS 231n A2 — Neural Networks & ConvNets

Build a neural-net library from modular layers up to ConvNets: affine/ReLU, softmax, the optimizers, BatchNorm, Dropout, convolution and pooling — every function yourself, with live gradient checks.

11 chaptersforge studio
A3 · Forge

CS 231n A3 — Sequences, Attention & Generative Models

RNN and LSTM captioning, multi-head attention, saliency and fooling images, GANs, and the SimCLR contrastive loss — build every function yourself on live instruments.

12 chaptersforge studio
28

Image Classification

k-NN, L1/L2 distance, hyperparameter tuning, cross-validation.

10 chapters
29

Linear Classification

Score function Wx+b, hinge loss, cross-entropy, regularization.

10 chapters
30

Loss Functions

MSE, cross-entropy, KL divergence, Huber, contrastive, triplet, InfoNCE — every loss derived from scratch with interactive comparisons.

10 chapters12+ sims
30

Optimization & Backprop

Gradients, SGD, chain rule, computation graphs, gate patterns.

10 chapters
31

Neural Networks: Architecture

Neurons, activation functions, layers, representational power.

10 chapters
32

Neural Networks: Setup

Data preprocessing, weight init, batch norm, dropout.

10 chapters
33

Neural Networks: Training

Loss curves, learning rates, momentum, Adam, hyperparameter search.

10 chapters
34

NN Case Study: Spirals

Build a 2-layer net from scratch. Live training visualization.

10 chapters
35

Convolutional Networks

Convolution, filters, pooling, LeNet to ResNet.

10 chapters
36

Transfer Learning

Feature extraction vs fine-tuning, freezing layers.

9 chapters
37

Recurrent Networks

RNNs, LSTM, BPTT, vanishing gradients, char-level LM.

9 chapters
38

Robot Learning

Perception-action loop, model-based planning, imitation learning, diffusion policies, VLAs & foundation models.

10 chapters
38

The Full-Body Robot

Two arms, a torso and wheels driven by one learned policy: the action vector, chunks, many steps and the data loop.

12 chapters13 sims
38

The Deployment Flywheel

How a robot fleet logs, labels and curates its own failures; Dyna reports 35 napkins an hour rising to 95.

12 chapters14 sims
39

Multi-Modal Foundation Models

CLIP, LLaVA, Flamingo, Molmo, SAM — contrastive learning, VLMs, promptable segmentation, model chaining.

10 chapters
40

3D Vision

Point clouds, meshes, SDFs, PointNet, NeRF, 3D Gaussian Splatting — from representations to neural rendering.

10 chapters
38

Regularization & Optimization

L1/L2, cross-entropy, SGD, momentum, Adam, learning rate schedules, weight initialization.

10 chapters
39

Neural Networks & Backprop

Computational graphs, chain rule, gate patterns, Jacobians — backprop from first principles.

10 chapters
40

CNNs for Classification

Convolution operation, stride, padding, pooling, receptive field, depthwise separable convolutions.

10 chapters
41

CNN Training & Architectures

Data augmentation, batch norm, dropout, AlexNet → VGG → ResNet → EfficientNet → ConvNeXt.

10 chapters
42

Recurrent Networks (2025)

Vanilla RNN, BPTT, vanishing gradients, LSTM gates, GRU, char-level LM, image captioning.

10 chapters
39

Attention & Transformers

Bahdanau attention, self-attention, multi-head, transformer blocks, positional encoding, ViT.

10 chapters
40

Detection & Segmentation

FCN, U-Net, R-CNN family, YOLO, Mask R-CNN, GradCAM, adversarial examples.

10 chapters
10

Scene Classification

Naming the whole place, not the parts: Places365, holistic context, CNN→ViT→InternImage, top-1 vs top-5.

10 chapters
10

Conv-Transformer Mobile Hybrids

Conv locality + attention globality on a phone: MobileViT, FastViT reparameterization, EfficientViT, the latency-accuracy Pareto.

10 chapters
10

Remote-Sensing Scene Classification

Land-use from orbit: multispectral tiles, NDVI, SatMAE/SpectralGPT foundation models, and the multi-label sigmoid shift.

10 chapters
10

RGB-D Scene Classification

Indoor scenes with depth: SUN RGB-D, why geometry disambiguates layout, two-stream RGB+depth fusion.

10 chapters
10

Vision & VLM Scaling Laws

How accuracy scales with params, data, compute: power laws, ViT-G, compute-optimal, the label-noise ceiling.

10 chapters
10

Mobile & NAS Backbones

Vision on a phone: depthwise-separable conv, inverted residuals, SE, compound scaling, hardware-aware NAS.

10 chapters
10

CRF & HSMM Temporal Smoothing

Kill the flicker: linear-chain CRF, Viterbi, HSMM durations, smoothing frame-level predictions into stable segments.

10 chapters
10

CNN+GNN Scene Fusion

Two-branch scenes: a holistic CNN fused with an object-relation GNN — the recipe that broke 90% on Indoor67.

10 chapters
41

Video Understanding

Two-stream networks, 3D convolutions, I3D, SlowFast, TSM, video transformers, VideoMAE.

10 chapters
42

Action Recognition

Single-frame to SlowFast to video transformers. Two-stream, 3D conv, skeleton-based, temporal detection.

10 chapters
43

Optical Flow

Brightness constancy, Lucas-Kanade, Horn-Schunck, FlowNet, RAFT. Dense motion estimation from zero.

10 chapters
44

Distributed Training

GPU hardware, data/pipeline/tensor parallelism, FSDP, ring all-reduce, 3D parallelism — training at scale.

10 chapters
43

Self-Supervised Learning

Pretext tasks, MAE, InfoNCE, SimCLR, MoCo, CPC, DINO — learning without labels.

10 chapters
44

Generative Models I

Density functions, MLE, autoregressive models, PixelCNN, autoencoders, VAEs — the full ELBO derivation.

10 chapters
45

Generative Models II

GANs, rectified flow, classifier-free guidance, latent diffusion, DiT, text-to-image & video generation.

10 chapters
System Design5

Research-backed system design lessons. Real architectures, real numbers, real tradeoffs — with interactive Canvas simulations that trace requests, visualize scale, and simulate failures.

Inference Engineering4

From first token to production fleet — how vLLM, SGLang, and TensorRT-LLM turn a memory-bound GPU into a shared, scheduled, paged production system. Every mechanism derived from worked arithmetic, not vendor slides.

Distributed Systems16

Practical distributed systems engineering — networking, consensus, CRDTs, transactions, caching, load balancing, resiliency patterns, observability, and deployment. Interview-grade depth with interactive simulations.

Part I

Network Foundations

TCP, TLS, flow control, congestion control, QUIC — the networking layer.

10 chapters8 sims
Part I

Service Communication

DNS, REST APIs, gRPC, idempotency — how services find and talk to each other.

10 chapters8 sims
Part II

Failure & Time

Failure detection, physical/logical/vector clocks, HLC — time in distributed systems.

10 chapters9 sims
Part II

Consensus & Replication

Raft, state machine replication, consistency models, chain replication.

10 chapters10 sims
Part II

Coordination Avoidance

CRDTs, gossip protocols, Dynamo, CALM theorem, causal consistency.

10 chapters10 sims
Part II

Distributed Transactions

ACID, isolation levels, 2PC, sagas, outbox pattern.

10 chapters10 sims
Part III

Caching & CDNs

HTTP caching, reverse proxies, CDN architecture, cache invalidation.

10 chapters10 sims
Part III

Partitioning & Storage

Range/hash partitioning, consistent hashing, blob storage.

10 chapters10 sims
Part III

Load Balancing

DNS, L4, L7 load balancing — distributing traffic across servers.

10 chapters9 sims
Part III

Data Storage & Caching

Replication, NoSQL taxonomy, caching patterns, eviction policies.

10 chapters9 sims
Part III

Service Architecture

Microservices, API gateways, service mesh, control/data planes.

10 chapters9 sims
Part III

Messaging & Events

Message queues, pub/sub, Kafka, exactly-once, backpressure.

10 chapters9 sims
Part IV

Failure Modes & Isolation

Cascading failures, redundancy, shuffle sharding, cellular architecture.

10 chapters9 sims
Part IV

Resiliency Patterns

Timeouts, retries, circuit breakers, rate limiting, load shedding.

10 chapters9 sims
Part V

Testing & Deployment

Test pyramid, chaos engineering, CI/CD, canary deploys, rollbacks.

10 chapters9 sims
Part V

Observability & Operations

Metrics, SLIs/SLOs, alerting, logs, distributed tracing, dashboards.

10 chapters9 sims
Seminal Papers2

Deep interactive lessons from foundational distributed systems papers. Every definition derived, every algorithm implemented, every proof traced.

Introduction to Algorithms32

Chapter-by-chapter deep dive into the classic algorithms textbook. Each chapter is a standalone interactive lesson with interview-grade depth, Canvas simulations, coding drills, and mastery challenges.

Chapter 2

Getting Started

Insertion sort, merge sort, algorithm analysis — the foundations of algorithmic thinking.

10 chapters10 sims
Chapter 3

Growth of Functions

Big-O, Omega, Theta — the language of algorithm efficiency.

10 chapters10 sims
Chapter 4

Divide & Conquer

Max subarray, Strassen, Master theorem — breaking problems into pieces.

10 chapters10 sims
Chapter 6

Heapsort & Priority Queues

Binary heaps, heapsort, priority queues — scheduling and selection.

10 chapters10 sims
Chapter 7

Quicksort

Partition, randomize, conquer — the fastest practical sorting algorithm.

10 chapters9 sims
Chapter 8

Sorting in Linear Time

Counting sort, radix sort, bucket sort — breaking the O(n log n) barrier.

10 chapters8 sims
Chapter 11

Hash Tables

Hashing, chaining, open addressing, perfect hashing — O(1) lookup.

10 chapters10 sims
Chapter 12

Binary Search Trees

Search, insert, delete, traverse — ordered data made fast.

10 chapters9 sims
Chapter 13

Red-Black Trees

Self-balancing BSTs — guaranteed O(log n) with coloring rules.

10 chapters9 sims
Chapter 15

Dynamic Programming

Rod cutting, LCS, edit distance, knapsack — the paradigm that dominates interviews.

11 chapters9 sims
Chapter 16

Greedy Algorithms

Activity selection, Huffman, fractional knapsack — locally optimal = globally optimal.

10 chapters9 sims
Chapter 17

Amortized Analysis

Aggregate, accounting, potential — the true cost of operation sequences.

10 chapters9 sims
Chapter 22

Graph Algorithms

BFS, DFS, topological sort, SCCs — the foundation of every graph question.

11 chapters9 sims
Chapter 23

Minimum Spanning Trees

Kruskal, Prim, Union-Find — connecting everything at minimum cost.

10 chapters9 sims
Chapter 24

Shortest Paths

Dijkstra, Bellman-Ford, DAG shortest paths — optimal routes through graphs.

10 chapters11 sims
Chapter 26

Maximum Flow

Ford-Fulkerson, max-flow min-cut, bipartite matching — optimizing network flow.

10 chapters9 sims
Chapter 9

Medians & Order Statistics

Quickselect, median of medians — finding the k-th element in linear time.

10 chapters9 sims
Chapter 18

B-Trees

Disk-optimized search trees — billions of keys with just 2-3 disk reads.

10 chapters8 sims
Chapter 19

Fibonacci Heaps

Amortized O(1) decrease-key — the theoretical champion for graph algorithms.

10 chapters9 sims
Chapter 20

van Emde Boas Trees

O(log log u) predecessor queries — when the universe is your friend.

10 chapters8 sims
Chapter 21

Disjoint Sets

Union-Find — nearly O(1) connected component queries with path compression.

10 chapters10 sims
Chapter 25

All-Pairs Shortest Paths

Floyd-Warshall, Johnson's — shortest paths between every pair of vertices.

10 chapters9 sims
Chapter 27

Multithreaded Algorithms

Fork-join, work/span, parallel merge sort — harnessing multiple cores.

10 chapters8 sims
Chapter 28

Matrix Operations

LU decomposition, least squares, Cholesky — the linear algebra engine.

10 chapters9 sims
Chapter 29

Linear Programming

Simplex, duality, LP reductions — the universal optimization framework.

10 chapters8 sims
Chapter 30

Polynomials & the FFT

DFT, FFT, convolution — O(n log n) polynomial multiplication.

10 chapters12 sims
Chapter 31

Number-Theoretic Algorithms

GCD, modular arithmetic, RSA, primality — the math behind cryptography.

10 chapters8 sims
Chapter 32

String Matching

KMP, Rabin-Karp, finite automata — finding patterns in text efficiently.

10 chapters8 sims
Chapter 33

Computational Geometry

Convex hull, closest pair, line intersection — algorithms in 2D space.

10 chapters8 sims
Chapter 34

NP-Completeness

P vs NP, reductions, SAT, TSP — the limits of efficient computation.

11 chapters11 sims
Chapter 35

Approximation Algorithms

Vertex cover, TSP, set cover — good-enough solutions with guarantees.

10 chapters9 sims
Capstone

Algorithms in Modern CS

Databases, ML, compilers, networking, crypto, graphics — where every CLRS chapter shows up.

12 chapters11 sims
Designing Data-Intensive Applications13

Chapter-by-chapter deep dive into Martin Kleppmann's DDIA. Each chapter is a standalone interactive lesson with interview-grade depth, Canvas simulations, design challenges, debug scenarios, and mastery components.

Chapter 1

Trade-Offs in Data Systems

Reliability, scalability, maintainability — the vocabulary of systems design interviews.

11 chapters9 sims
Chapter 2

Nonfunctional Requirements

SLAs, percentiles, capacity planning, load testing — quantifying system quality.

9 chapters7 sims
Chapter 3

Data Models & Query Languages

Relational, document, graph — choosing how to structure and query your data.

11 chapters10 sims
Chapter 4

Storage & Retrieval

B-trees, LSM-trees, column stores — how databases actually store and find your data.

11 chapters9 sims
Chapter 5

Encoding & Evolution

JSON, Protobuf, Avro, schema evolution — how data survives change.

11 chapters9 sims
Chapter 6

Database Replication

Leader-follower, multi-leader, leaderless — keeping copies consistent across machines.

11 chapters9 sims
Chapter 7

Data Sharding

Hash partitioning, range partitioning, rebalancing — splitting data across machines.

11 chapters9 sims
Chapter 8

Database Transactions

ACID, isolation levels, MVCC, serializability — the guarantees that keep your data correct.

11 chapters11 sims
Chapter 9

The Trouble with Distributed Systems

Network faults, clock drift, process pauses — everything that can go wrong, will.

11 chapters9 sims
Chapter 10

Consistency & Consensus

Linearizability, Raft, Paxos — how distributed nodes agree on the truth.

11 chapters11 sims
Chapter 11

Batch Processing

MapReduce, Spark, dataflow engines — processing massive datasets efficiently.

11 chapters10 sims
Chapter 12

Stream Processing

Kafka, Flink, event sourcing, windowing — processing data as it arrives.

11 chapters9 sims
Chapters 13-14

Philosophy & Ethics

Streaming philosophy, bias, privacy, responsibility — the human side of data systems.

8 chapters6 sims
Exercises & Workbooks28
WORKBOOK

CS336: Build a Language Model From Scratch

Tokenization, FLOP/memory accounting, architecture, MoE, GPUs, parallelism, scaling laws, inference, alignment — derive every number.

10 chapters51 exercises
WORKBOOK

TinyML & Efficient Deep Learning

70 exercises over the whole course: MACs, pruning, quantization, NAS, distillation, MCU memory, LLMs, diffusion, distributed training.

17 sections70 exercises
WORKBOOK

Visual Navigation Workbook

SE(3), camera projection, features, epipolar geometry, RANSAC, Gauss-Newton, manifold retraction, VIO drift, BoW, robust SLAM.

10 chapters50 exercises
WORKBOOK

Scaling Book Workbook: Interactive Exercises

54 hands-on exercises covering scaling laws, chinchilla, compute-optimal training, loss prediction, data mixing, emergent abilities.

12 chapters54 exercises
WORKBOOK

Transformer Math Workbook

52 exercises across 5 modes: derive, trace, build, design, debug. Parameter counts, attention FLOPs, memory budgets, KV caches, throughput estimation.

10 chapters52 exercises5 exercise types
WORKBOOK

Training & Backprop Workbook

Chain rule by hand, gradient shapes, cross-entropy, Adam optimizer, batch norm, learning rate schedules, mixed precision, training diagnostics.

10 chapters54 exercises
WORKBOOK

Probability & Bayes Workbook

Bayes rule, distributions, MLE, MAP estimation, Kalman filter math, HMM forward/Viterbi, information theory, sensor fusion.

10 chapters57 exercises
WORKBOOK

RL Fundamentals Workbook

Bellman equations, value iteration, Q-learning updates, policy gradients, advantage estimation, PPO clipping, exploration strategies.

10 chapters56 exercises
WORKBOOK

Diffusion & Flow Matching Workbook

Forward process, noise schedules, DDPM loss, score functions, sampling, classifier-free guidance, latent diffusion, flow matching, ODE/SDE.

10 chapters55 exercises
WORKBOOK

Systems & Serving Workbook

Tensor/pipeline/data parallelism, continuous batching, PagedAttention, speculative decoding, quantization, cost optimization.

10 chapters58 exercises
WORKBOOK

Robotics Math Workbook

Rotation matrices, homogeneous transforms, EKF predict/update, SLAM graphs, inverse kinematics, Jacobians, PID control.

10 chapters56 exercises
WORKBOOK

Code from Scratch Workbook

Implement softmax, linear layers, attention, layer norm, positional encoding, BPE tokenizer, cross-entropy, Adam, KV cache, sampling.

10 chapters52 exercises
WORKBOOK

CLRS Algorithms Workbook

Asymptotic analysis, recurrences, sorting, hash tables, BSTs, dynamic programming, greedy, graph algorithms, shortest paths, MST.

10 chapters56 exercises
WORKBOOK

State Estimation (Advanced) Workbook

Multi-dimensional KF, EKF Jacobians, range-bearing updates, UKF sigma points, particle filters, sensor fusion, observability, noise tuning.

10 chapters56 exercises
WORKBOOK

SLAM & Navigation Workbook

EKF-SLAM, landmark observation, data association, loop closure, graph SLAM, visual odometry, RANSAC, factor graphs, occupancy grids.

10 chapters58 exercises
WORKBOOK

Graph Neural Networks Workbook

Graph basics, node embeddings, GCN/SAGE/GAT, over-smoothing, spectral theory, knowledge graphs, link prediction, graph generation.

10 chapters56 exercises
WORKBOOK

NLP Fundamentals Workbook

Word vectors, Word2Vec gradients, dependency parsing, perplexity, attention, subword tokenization, pretraining, PEFT, evaluation metrics.

10 chapters57 exercises
WORKBOOK

Signal Processing Workbook

Discrete signals, DFT by hand, quantization, Lloyd-Max, STFT, wavelets, MFCC pipeline, Bayes classifiers, SVM margins.

10 chapters60 exercises
WORKBOOK

Distributed Training Workbook

Ring AllReduce, ZeRO stages, gradient accumulation, LR scaling, pipeline parallelism, tensor parallelism, checkpointing, mixed precision.

10 chapters58 exercises
WORKBOOK

Computer Vision Workbook

Convolution math, receptive fields, pooling, anchors/IoU, NMS, ResNet, segmentation, stereo vision, homography.

10 chapters53 exercises
WORKBOOK

Linear Algebra for ML Workbook

Matrix operations, Gaussian elimination, eigenvalues, SVD, PCA, matrix calculus, least squares, norms, positive definiteness.

10 chapters59 exercises
WORKBOOK

Numerical Methods Workbook

Floating point, catastrophic cancellation, condition numbers, iterative methods, Newton's method, gradient descent, integration, sparse matrices.

10 chapters55 exercises
WORKBOOK

Information Theory Workbook

Entropy, joint/conditional entropy, KL divergence, cross-entropy loss, source coding, channel capacity, rate-distortion, VAE connection.

10 chapters59 exercises
WORKBOOK

Optimization Theory Workbook

Convexity, gradient descent, SGD variants, constrained optimization, KKT conditions, duality, proximal operators, convergence rates, Newton's method.

10 chapters57 exercises
WORKBOOK

RL Theory (CS224R) Workbook

Reward modeling, RLHF objective, PPO for RLHF, DPO loss, CQL, IQL, model-based RL, reward shaping, multi-agent RL.

10 chapters57 exercises
WORKBOOK

Deep RL Exam Prep Workbook

Mode collapse, flow matching arithmetic, REINFORCE credit assignment, actor-critic n-step returns, Q-learning TD targets, offline RL, IQL expectile loss, goal-conditioned RL.

10 chapters50 exercises
WORKBOOK

Decision Making Under Uncertainty Workbook

Bayesian networks, Dirichlet inference, value of information, Bellman backups, kernel smoothing, MCTS/UCB1, policy gradients, POMDPs, alpha vectors.

10 chapters52 exercises
WORKBOOK

Model Compression Workbook

Quantization (PTQ, QAT, STE), pruning (magnitude, structured, lottery ticket), knowledge distillation, LoRA, mixed precision, compression pipelines.

10 chapters58 exercises
Day In The Life of an Engineer15

Deep-dive lessons built around real engineering roles. Classical foundations, modern tools, real papers, interactive sims. Built for interview prep with real depth.

Role Guide

Forward Deployed Engineer

Scope a customer deployment in numbers, map their data, evaluate on their documents, budget cost and latency, roll out in steps.

10 chapters10 sims
Role Guide

Applied AI Engineer

Choose a model by expected cost, budget the prompt, measure retrieval, put error bars on evals, stack checks, stream, cache and route.

10 chapters10 sims
Role Guide

Web-Scale AI & Search Engineer

BM25 and vector retrieval, staged ranking, fleet sizing, tail latency, caching, GPU batching, cost per request and A/B launches.

11 chapters11 sims
Role Guide

Backend & API Engineer at Scale

API contracts, retries and idempotency keys, pagination, indexes, caching, rate limits, connection pools, latency tails and SLOs.

11 chapters11 sims
Role Guide

Infrastructure & LLM Scaling Engineer

Requests in flight, pooled waits with Erlang C, KV cache sizing, decode limits, GPU scheduling, all-reduce cost, autoscaling, error budgets.

10 chapters10 sims
Role Guide

Developer Relations Engineer

Quickstarts and docs that get used, SDK errors, sample apps that keep working, activation and retention, A/B tests and feedback loops.

10 chapters10 sims
Role Guide

AI/GenAI Scrum Master

Sprints of experiments, velocity as a spread, Monte Carlo forecasts, eval noise, flow limits, data lead times and risk burndown.

11 chapters11 sims
Role Guide

Lead QE & Validation Engineer

Testing robot AI: pass rates as ranges, trial counts for A/B, flaky tests, regression gates, sim to real, hardware in the loop.

11 chapters11 sims
Role Guide

3D & Multi-View Geometry Engineer

Camera models, epipolar geometry, SfM, bundle adjustment, SLAM, dense reconstruction, point tracking, DUSt3R/VGGT — the full stack for robotics perception.

13 chapters8+ sims
Role Guide

ML Performance Optimization Engineer

GPU architecture, profiling, mixed precision, distributed training, model compression, TensorRT, serving at scale, real-time autonomous driving stacks.

12 chapters11 sims
Role Guide

Robotics Simulation & Software Engineer

Physics simulation, contact models, MuJoCo/Isaac Sim, kinematics, motion planning, control, sim-to-real, RL, ROS2 — the full robotics stack.

13 chapters13 sims
Role Guide

ML Inference & Performance Engineer

On-vehicle perception inference: latency budgets, the edge roofline, bandwidth, multi-camera BEV, INT8 calibration, fusion and heat.

10 chapters10 sims
Role Guide

Software Testing & Reliability

The confidence chain from simulation to the real robot: scenario coverage, flaky tests, regression gates, log replay, timing, safety metrics.

11 chapters11 sims
Role Guide

Agentic Engineer

The agent loop, tool design, step success that compounds, evals for agents, cost and latency budgets, layered guardrails, memory.

10 chapters10 sims
Role Guide

Frontier Lab Engineer

AI research infrastructure: compute budgets, scaling laws, memory, parallelism, rooflines, keeping runs alive, MoE, quantization, serving.

11 chapters11 sims
Robotics Engineering10

The working engineer's robotics stack, from first principles: frames, time, uncertainty, sensors, SLAM, real-time, ROS 2. Every chapter derives it, architects around it, implements it, and debugs it — and every lesson adds a Studio practice room alongside the usual modes.

ROBOTICS 01

Frames & Rigid-Body Math

The frame bugs that eat a week: composition order, quaternion double cover, REP-103 conventions.

9 chapters3 code labs
ROBOTICS 02

Time, Clocks & Sensor Alignment

Capture time vs receive time — the bug class that only appears once the robot moves fast.

6 chapters3 code labs
ROBOTICS 03

Uncertainty, Least Squares & Robust Costs

Covariance propagation, the one derivation behind LS/WLS/MAP, and what Huber does to the normal equations.

6 chapters3 code labs
ROBOTICS 04

The Sensor Suite & Its Failure Modes

What every sensor physically lies about — shutter, disparity, LiDAR de-skew, IMU drift laws, RTK — and why fusion works.

9 chapters3 code labs
ROBOTICS 05

Calibration: Intrinsic, Extrinsic, Temporal

The silent multiplier on every metric number: Zhang's constraints, hand-eye, time offset as a state, fault symptoms.

7 chapters4 code labs
ROBOTICS 06

SLAM Frontend

Detection, matching, RANSAC derived from scratch, direct vs feature-based, ICP/NDT, and motion estimation.

9 chapters3 code labs
ROBOTICS 07

SLAM Backend

Why the field left filters for graphs: sparsity, marginalisation, Schur complement, solvers, IMU preintegration.

8 chapters3 code labs
ROBOTICS 08

Drift, Loop Closure & Relocalization

Where drift comes from, place recognition, rejecting false loops, what closing a loop actually fixes, and lifelong map reuse.

8 chapters3 code labs
ROBOTICS 09

Downstream Perception

The layer that turns a pose into a decision: occupancy grids via log-odds, TSDF surfaces, and the handoff to planning.

7 chapters4 code labs
ROBOTICS 10

The Real-Time Mental Model

Why the tail is where robots break: hard vs soft real-time, WCET, and why p99.9 matters more than the mean.

6 chapters3 code labs
AI Harness Engineering35

The practical toolkit for building with AI models. Embeddings, retrieval, RAG, agents, evals, safety — everything between "I have a model" and "I have a production app."

HARNESS 01

Vector Embeddings

What embeddings are, how they encode meaning, distance in high-D space, embedding models, multimodal embeddings.

10 chapters10 sims
HARNESS 02

Similarity Metrics

Cosine, dot product, Euclidean, Jaccard, learned metrics — measuring "how alike" in vector space.

9 chapters9 sims
HARNESS 03

Vector Databases

FAISS, HNSW, IVF, product quantization — storing and searching millions of vectors in milliseconds.

10 chapters10 sims
HARNESS 04

Fast Embeddings on GPUs

The GPU side is already solved. Perplexity found a three times win on the host: CUDA graphs, LazyTensor, scheduling, a Rust gateway.

12 chapters14 sims
HARNESS 05

Text Chunking Strategies

Fixed, sentence, recursive, semantic, structure-aware — how to split documents for embedding and retrieval.

9 chapters9 sims
HARNESS 06

RAG

The full pipeline: chunk → embed → store → retrieve → rerank → generate. Eval, failure modes, advanced patterns.

11 chapters11 sims
HARNESS 07

Multimodal RAG

Images, tables, PDFs in RAG. Vision embeddings, ColPali, document parsing, hybrid retrieval.

9 chapters9 sims
HARNESS 08

MCP (Model Context Protocol)

USB-C for AI: tools, resources, prompts. Build MCP servers and clients. The standard for AI integrations.

10 chapters10 sims
HARNESS 09

Prompt Engineering

System prompts, few-shot, chain-of-thought, structured output, testing — systematic, not vibes-based.

10 chapters10 sims
HARNESS 10

Evaluation & Evals

LLM-as-judge, human eval, automated metrics, regression detection, A/B testing for AI systems.

10 chapters10 sims
HARNESS 11

AI Safety & Guardrails

Content filtering, jailbreak prevention, PII detection, output validation, red teaming, defense in depth.

10 chapters10 sims
HARNESS 12

Fine-Tuning in Practice

When to fine-tune vs prompt, data prep, LoRA/QLoRA, eval pipelines, deployment, cost analysis.

10 chapters10 sims
HARNESS 13

Agents & Tool Use

Function calling, ReAct, multi-step agents, state management, error recovery, guardrails for agents.

10 chapters10 sims
HARNESS 14

Agent Skills

Teach Claude a workflow in a folder of Markdown: SKILL.md, progressive disclosure, triggering descriptions, the five patterns. Build one live.

10 chapters9 sims
HARNESS 15

Agent Architectures

Single agents to multi-agent orchestration: the workflow-vs-agent divide, sequential/parallel/evaluator patterns, hierarchical vs swarm, and an interactive chooser for picking the right one.

10 chapters10 sims
HARNESS 16

Enterprise AI Transformation

The adoption playbook behind the systems you build — coalition, governance, pilot selection, metrics, scaling, and a readiness calculator. Engineer's lens, real case studies (L'Oréal, Shopify, Lotte).

10 chapters10 sims
HARNESS 17

Transcultural ML in Music

Most music AI assumes a piano. How DDSP serves Thai 7-tone tunings, Carnatic meend, and the Guqin — model vs dataset bias, and when not to ship a model at all.

9 chapters7 sims
HARNESS 18

The Founder's Playbook: AI-Native Startup

The four-stage startup lifecycle — Idea, MVP, Launch, Scale — read line by line. Interactive exit criteria, the Sean Ellis test, TAM/SAM/SOM and CAC/LTV calculators, the data-flywheel moat, and when to reach for Chat vs Cowork vs Code.

12 chapters11 sims
HARNESS 19

Loop Engineering

The fourth layer above the harness: stop prompting the agent, design the system that prompts it. The five moves of one turn, the six parts, the generator/evaluator "say no", the five failure modes, and the four silent costs.

11 chapters17 sims
HARNESS 20

Harness Engineering

The system around the model — three design patterns, a coding agent's tool belt, and why the deployment layer rivals raw intelligence.

10 chapters9 sims
HARNESS 21

Harness Optimization

From prompts to optimizer code: ACE playbooks, MCE bi-level skill evolution, Meta-Harness Pareto search, ADAS, and AFlow's MCTS.

10 chapters10 sims
HARNESS 22

Self-Improving Harnesses

STOP's improver improving itself, AlphaEvolve, the Darwin Gödel Machine, SIA — and seven bottlenecks on the road to RSI.

11 chapters11 sims
HARNESS 23

Buzz: The Agent-Native Workspace

Block's hive-mind workspace: humans and agent swarms as keypair equals on one signed event log — relay pipeline, ACP harness, workflows, hash-chain audit.

12 chapters10 sims
HARNESS 24

Embedding Benchmarks: MTEB, BEIR & Honest Evaluation

You took the top model on the leaderboard and search got worse. What MTEB and BEIR measure, every retrieval metric computed by hand, and the small honest eval that catches the regression before you ship.

10 chapters9 sims
HARNESS 25

High-Dimensional Geometry: JL, Concentration & Hubness

The geometry your vector database actually lives in: the thin shell, the near-orthogonal crowd, and the hub documents that match everything.

10 chapters8 sims
HARNESS 26

The Modality Gap

CLIP is sold as one shared space, but images and captions land on two islands that never touch. Where the gap comes from, and what to do.

10 chapters9 sims
HARNESS 27

Hyperbolic Embeddings

Two dimensions with the right curvature hold a tree that two hundred flat dimensions cannot. Curvature becomes a design knob, not a default.

10 chapters9 sims
HARNESS 28

On-Device Embeddings

Semantic search that never leaves the phone: distilled encoders, int8 plus matryoshka indexes, and a latency budget you compute by hand.

10 chapters6 sims
HARNESS 29

Embedding Ops: Drift, Migrations & Version Compatibility

Swap the embedding model and four million stored vectors become coordinates in a space that no longer exists. The migration runbook.

10 chapters6 sims
HARNESS 30

Semantic Caching

Two hundred questions asked a million ways, billed every time. Answer from embedding space, but only when you can prove the match.

10 chapters8 sims
HARNESS 31

Embedding Security: Inversion, Leakage & Poisoning

Storing vectors instead of text is not anonymisation. Inversion, membership inference, index poisoning, and defenses ranked honestly.

10 chapters6 sims
HARNESS 32

Jev & System One

Typed decisions under uncertainty: inspect Choice, Score, and Noul outputs, separate probabilities from confidence, test calibration, and build a cost-aware routing harness.

12 chaptersinteractive labs
HARNESS 33

Learning on the Job

AI that keeps learning after deployment: what changes, what teaches it, what it costs, and a road map through seven lessons.

10 chapters10 sims
1

Supervised Fine-Tuning an Agent on Tool-Call Traces with TRL: From Absolute Zero to Mastery

A small model is fixing your code. It learned by copying thousands of perfect runs. Then the test tool returns an error it has never seen. Press Run 2

11 chaptersGleam
5

Multi-Harness Async RL

Train an agent where it will run: inside its real harness, one sandbox per attempt, with generation and training on separate GPUs so neither waits. Ma

11 chaptersGleam
Computer Use & Multimodal Agents7

Agents that see a screen and act on it: grounding a click, the agent loop, the environments and sandbox fleets they train in, trajectory data, agentic RL and prompt injection. The Gleams behind the Computer Use & Multimodal Agents path.

Teaching Sessions1

Record yourself teaching on a whiteboard with optional camera. Export as MP4. The ultimate Feynman test: if you can teach it, you understand it.