Each widget keeps its math in a small TypeScript core, separate from drawing. That core is unit-tested against NumPy reference outputs (references/gen_fixtures.py → widgets/fixtures/). Every widget has a text description, keyboard controls, light and dark themes, and a static fallback on phones. Each Part’s widgets are built along with that Part, flagship widgets (★) first.
Well-known visualizations elsewhere are linked under Go deeper rather than rebuilt: TensorFlow Playground, Brendan Bycroft’s LLM Visualization, Transformer Explainer, Distill and 3Blue1Brown.
Site-wide learning tools (10/14 built)
| Widget | What you do | What it teaches | Priority | Status |
|---|
| Course map | Zoomable prerequisite graph of all 53 modules, coloured by progress; click a node to open it | Where you are and what each module needs | P1 | ✓ built |
| Progress dashboard | Completion per Part, tests passed, quiz scores, estimated hours left | Pacing | P1 | ✓ built |
| In-browser code cells | Editable Python cells with NumPy that run in the page | Try ideas without installing anything | P1 | ✓ built |
| In-browser test runner | Run a CPU-sized task's tests in the page and see pass/fail per test | Tight feedback on your code | P1 | ✓ built |
| Notation hover cards | Hover any symbol for its meaning and the module that introduced it | One notation across all sources | P1 | ✓ built |
| Derivation stepper | Reveal a derivation one line at a time; a "why?" on each line shows the rule used | Deriving by hand | P1 | ✓ built |
| Progressive hints | Three levels per task: a nudge, the approach, then partial code | Getting unstuck without spoilers | P1 | ✓ built |
| Flashcard review | Spaced-repetition cards from each module's key ideas, stored in the browser | Retention | P2 | planned |
| Pipeline locator | Mini map of the LLM or diffusion pipeline, highlighting the current module | The big picture | P2 | planned |
| Tensor shape tracer | Annotates each line of an example with array shapes as it runs | Shape reasoning | P2 | ✓ built |
| Training-curve clinic | Real loss curves to diagnose: learning rate too high, overfitting, data bug | Debugging training | P2 | ✓ built |
| Spot-the-bug lab | Broken training code to fix; tests confirm the fix | Debugging code | P2 | planned |
| Paper reading guide | Follow three passes through Attention Is All You Need, then recompute its table 2 | Reading papers | P3 | ✓ built |
| Discussion | A comment thread per module through GitHub Discussions (Giscus) | Asking for help | P3 | planned |
Part 1 (9/9 built)
| Widget | What you do | What it teaches | Used in | Status |
|---|
| ★ Matrix transformer | Drag a 2×2 matrix's columns and watch the grid deform | Matrices as maps, determinant as area, eigenvectors as directions that don't turn | 1.1 | ✓ built |
| SVD image compressor | Slide the rank k | Low-rank approximation and reconstruction error | 1.2 | ✓ built |
| PCA point cloud | Stretch and rotate a 2D cloud | Principal axes are covariance eigenvectors | 1.2 | ✓ built |
| ★ Gradient field explorer | Drag a point over a contour plot | Gradient direction, magnitude and level sets | 1.3 | ✓ built |
| Jacobian lens | Move a small square through a nonlinear map | The Jacobian as a local linear map | 1.3 | ✓ built |
| Distribution playground | Tune parameters, draw samples | Common distributions, law of large numbers, CLT | 1.4 | ✓ built |
| Covariance ellipse | Edit covariance entries | Correlation and 2D Gaussians | 1.4 | ✓ built |
| Entropy and KL visualizer | Reshape two distributions | Entropy, cross-entropy, why KL is asymmetric | 1.5 | ✓ built |
| Step-size explorer | Change the learning rate on 1D and 2D functions | Convergence, oscillation, divergence | 1.6 | ✓ built |
Part 2 (6/6 built)
| Widget | What you do | What it teaches | Used in | Status |
|---|
| ★ Perceptron playground | Click to add points, step the update rule | How the boundary moves; why XOR fails | 2.3 | ✓ built |
| Regression fitter | Drag points; switch closed-form vs gradient descent | Least squares, with the loss surface beside the fit | 2.2 | ✓ built |
| Polynomial overfit lab | Degree and λ sliders | Overfitting, regularization, train vs test error | 2.1 | ✓ built |
| Bias–variance sampler | Resample datasets and refit | Variance across fits, bias of a model class | 2.5 | ✓ built |
| Logistic boundary | Adjust weights and bias | Probabilistic classification and log-loss | 2.3 | ✓ built |
| k-means / EM stepper | Step the E and M updates | Clustering, GMM ellipses, local optima | 2.6 | ✓ built |
Part 3 (11/11 built)
| Widget | What you do | What it teaches | Used in | Status |
|---|
| ★ Network playground | Choose layers and activations, train live | How depth bends decision regions | 3.1 | ✓ built |
| ReLU region viewer | Add hidden units | Networks as piecewise-linear functions | 3.1 | ✓ built |
| ★ Computation graph stepper | Step forward values, then gradients flowing backward | Backprop, chain rule, gradient accumulation | 3.2 | ✓ built |
| Activation histogram lab | Change init scale and depth; toggle BatchNorm / LayerNorm | Vanishing and exploding activations; why normalization helps | 3.4 | ✓ built |
| Optimizer race | Pick a surface, learning rate and betas | SGD vs momentum vs RMSProp vs Adam | 3.3 | ✓ built |
| LR schedule viewer | Warmup, cosine, step decay | How schedules shape the loss curve | 3.3 | ✓ built |
| ★ Convolution scanner | Move the kernel; set stride, padding, dilation | Feature maps, output sizes, receptive fields | 3.6 | ✓ built |
| Feature map viewer | Pick an image for a tiny CNN running in the browser | What each layer detects | 3.6 | ✓ built |
| Residual gradient flow | Toggle skip connections | Gradient size per layer, why ResNets train | 3.7 | ✓ built |
| Character language model | Train an MLP on names; change the context length and temperature | Learned character embeddings, bigram vs MLP, sampling | 3.8 | ✓ built |
| Dropout visualizer | Change the drop rate | Dropout as an implicit ensemble | 3.5 | ✓ built |
Part 4 (9/9 built)
| Widget | What you do | What it teaches | Used in | Status |
|---|
| ★ Tokenizer playground | Type any text | Tokens, IDs, how words, numbers and other scripts split | 4.1 | ✓ built |
| BPE merge stepper | Train BPE on a toy corpus, one merge at a time | Merge rules and vocabulary growth | 4.1 | ✓ built |
| Embedding explorer | Search words in a 2D/3D projection | Similarity, analogies, clusters | 4.2 | ✓ built |
| RNN unroller | Step through time, watch the gradient norm | Why RNNs forget | 4.3 | ✓ built |
| ★ Attention calculator | Step Q·Kᵀ, scale, mask, softmax, ×V with live matrices | Exactly what attention computes | 4.4 | ✓ built |
| Attention head viewer | Pick a layer and head of a tiny model on your text | What heads attend to | 4.6, 7.3 | ✓ built |
| Transformer block walkthrough | Follow one token through a block with shapes shown | Residual stream, norms, MLP | 4.5 | ✓ built |
| RoPE viewer | Change positions | Sinusoidal encodings and RoPE as rotation | 4.5 | ✓ built |
| Decoding playground | Temperature, top-k, top-p on a tiny model | How sampling shapes output | 4.6 | ✓ built |
Part 5 (16/16 built)
| Widget | What you do | What it teaches | Used in | Status |
|---|
| ★ GPU memory calculator | Set model size, batch, sequence length, precision, optimizer | Where memory goes: weights, gradients, optimizer states, activations, KV cache | 5.1 | ✓ built |
| Roofline explorer | Change arithmetic intensity | Compute-bound vs memory-bound kernels | 5.1 | ✓ built |
| FlashAttention tiling animation | Step through tiles | Why tiling avoids slow memory reads | 5.2 | ✓ built |
| Parallelism simulator | Split a model over N GPUs: data, tensor, pipeline | Communication cost and pipeline bubbles | 5.3 | ✓ built |
| Scaling-law explorer | Slide a compute budget | Compute-optimal model size and token count | 5.4 | ✓ built |
| Data pipeline explorer | Toggle filters on sample documents | Deduplication and quality filtering | 5.5 | ✓ built |
| MoE router | Route tokens; change top-k and capacity | Load balancing and dropped tokens | 5.6 | ✓ built |
| KV cache animation | Generate token by token | What the cache saves and how memory grows | 5.7 | ✓ built |
| Quantization explorer | Choose int8 / int4 and group size | Rounding error and outliers | 5.7 | ✓ built |
| Speculative decoding demo | Step draft and verify | Acceptance rate and speedup | 5.7 | ✓ built |
| Loss-mask viewer | Toggle which chat tokens count toward the loss | How SFT data is formatted | 5.8 | ✓ built |
| DPO explorer | Adjust β; compare chosen vs rejected log-probs | What preference optimization pushes | 5.9 | ✓ built |
| Policy-gradient bandit | Pull arms, watch the policy update | REINFORCE basics | 5.10 | ✓ built |
| ★ RL loop animation | Sample, verify, reward, update | How models learn from verifiable rewards (GRPO) | 5.10 | ✓ built |
| LoRA rank explorer | Slide the rank r | Low-rank updates and parameter count | 5.11 | ✓ built |
| How noisy is a benchmark? | Resample a benchmark; compare pass@k before and after RL | Confidence intervals, paired comparisons, pass@k | 5.12 | ✓ built |
Part 6 (9/9 built)
| Widget | What you do | What it teaches | Used in | Status |
|---|
| Autoencoder latent explorer | Drag through a 2D latent space of digits | Decoding latents into images | 6.1 | ✓ built |
| ELBO decomposition | Slide β | Reconstruction vs KL trade-off | 6.2 | ✓ built |
| Flow density warper | Stack invertible transforms | Change of variables | 6.3 | ✓ built |
| ODE/SDE particle simulator | Draw a vector field, add noise | Euler vs Euler–Maruyama sampling | 6.4 | ✓ built |
| Forward diffusion slider | Move t, change the noise schedule | How data becomes noise | 6.5 | ✓ built |
| Score-field viewer | Change the noise level on 2D data | Scores as denoising directions | 6.5 | ✓ built |
| ★ Flow-matching playground | Compare crossing training lines with the exact marginal flow on toy 2D data; watch particles flow | Conditional and marginal velocity fields, and ODE sampling | 6.6 | ✓ built |
| Guidance slider | Change the CFG scale | Fidelity vs diversity | 6.7 | ✓ built |
| Latent diffusion pipeline | Click through text encoder, denoiser, VAE decoder | How Stable Diffusion-style models fit together | 6.8 | ✓ built |
Part 7 (3/3 built)
| Widget | What you do | What it teaches | Used in | Status |
|---|
| Logit lens | Read the residual stream of a tiny GPT through its output layer after each block | When a prediction forms | 7.3 | ✓ built |
| Ablation planner | List factors, generate an ablation grid | Experiment design | 7.2 | ✓ built |
| Reproduction tracker | Log your runs against a paper's numbers | Systematic reproduction | 7.4 | ✓ built |