Skip to content

0.1 How this course works

ready≈ 5 hoursNeeds: nothingUnlocks: 0.2, 0.3
  1. 1 Learn
  2. 2 Bridge & derive
  3. 3 Explore (Course map)
  4. 4 Do
  5. 5 Check

Glassbox does not try to out-explain the best teachers. Prince’s Understanding Deep Learning (UDL), Mathematics for Machine Learning (MML), Karpathy’s videos and the Stanford and MIT courses already do that well. What none of them gives you is one ordered path (the course map) with feedback at every step. That is this site’s job.

Every module has the same five steps, and the numbered headings on each page follow them:

  1. Learn. Read or watch exactly the listed sections (the Learn list above is an example). Nothing more is assumed.
  2. Bridge. A short note (400 words at most) connects the source to this course: what to focus on, notation differences, and one key derivation you step through line by line. Each line has a why? button that names the rule used.
  3. Explore. An interactive widget, placed right before the task it prepares you for. Drag, slide and step until the math stops being symbols.
  4. Do. Implement the idea from scratch. Automated tests tell you, per test, what is right. Run them in the page or locally with mlc check. Hints come in three levels (a nudge, the approach, then partial code). Use them in that order.
  5. Check. A short quiz. Pass with 80% and mark the module complete. If you miss it, that is the retry loop: go back to the sources for what you missed.

Why tests? You can’t vet an explanation you are still learning, so everything here is built to be checkable. Tests pass or fail. Every derivation is confirmed numerically. Widget math is unit-tested against NumPy. Every bridge note cites its sources. The quality page shows each module’s checks.

Your progress lives in this browser: no account needed. Back it up from the progress page, which also imports results from the command line.

When something is wrong or confusing, use Report an issue at the bottom of every page (how issues are handled). As the first learner, log your time and confusions in the learner log at the end of each module: each one becomes a fix.

Course map

Where you are and what each module needs

Static view on small screens. Open this page on a laptop to interact.

complete 0 started 0 ready to start 1 needs prerequisites 52
Part 0OrientationPart 1Math for MLPart 2Learning from dataPart 3Neural networksPart 4Sequences, attention, t…Part 5LLMs at scalePart 6Generative models and d…Part 7Doing research0.1How this course works0.1How this course works0.2NumPy and PyTorch tenso…0.2NumPy and PyTorch tensors Needs: 0.10.3Compute setup0.3Compute setup Needs: 0.11.1Vectors and matrices as…1.1Vectors and matrices as transformations Needs: 0.21.2Eigenvectors, SVD, PCA1.2Eigenvectors, SVD, PCA Needs: 1.11.3Gradients and matrix ca…1.3Gradients and matrix calculus Needs: 1.11.4Probability and statist…1.4Probability and statistics Needs: 0.21.5Information theory1.5Information theory Needs: 1.41.6Optimization1.6Optimization Needs: 1.32.1The learning setup: dat…2.1The learning setup: data, model, loss Needs: 1.4, 1.62.2Linear regression2.2Linear regression Needs: 2.1, 1.3, 1.12.3Perceptron and logistic…2.3Perceptron and logistic regression Needs: 2.22.4MLE, MAP and loss funct…2.4MLE, MAP and loss functions Needs: 2.3, 1.52.5Generalization and regu…2.5Generalization and regularization Needs: 2.22.6k-means, GMMs and EM2.6k-means, GMMs and EM Needs: 1.4, 2.13.1Shallow and deep networ…3.1Shallow and deep networks Needs: 2.33.2Backprop and autograd3.2Backprop and autograd Needs: 3.1, 1.33.3Optimizers3.3Optimizers Needs: 3.2, 1.63.4Initialization and norm…3.4Initialization and normalization Needs: 3.23.5Training in practice3.5Training in practice Needs: 3.3, 3.4, 2.53.6Convolutional networks3.6Convolutional networks Needs: 3.23.7Residual networks3.7Residual networks Needs: 3.6, 3.4, 0.33.8Neural language models3.8Neural language models Needs: 3.2, 2.44.1Tokenization4.1Tokenization Needs: 3.84.2Embeddings and language…4.2Embeddings and language modeling Needs: 4.14.3RNNs and their limits4.3RNNs and their limits Needs: 4.2, 3.34.4Attention4.4Attention Needs: 4.2, 0.24.5The transformer block4.5The transformer block Needs: 4.4, 3.4, 3.74.6Training a GPT4.6Training a GPT Needs: 4.5, 4.15.1GPUs and performance5.1GPUs and performance Needs: 4.65.2Kernels and FlashAttent…5.2Kernels and FlashAttention Needs: 5.1, 4.45.3Parallelism5.3Parallelism Needs: 5.15.4Scaling laws5.4Scaling laws Needs: 4.65.5Data5.5Data Needs: 4.15.6MoE and long context5.6MoE and long context Needs: 4.55.7Inference5.7Inference Needs: 4.6, 5.15.8Supervised fine-tuning5.8Supervised fine-tuning Needs: 4.65.9Preference learning: RL…5.9Preference learning: RLHF and DPO Needs: 5.8, 1.55.10RL for reasoning5.10RL for reasoning Needs: 5.95.11Specialization: LoRA an…5.11Specialization: LoRA and distillation Needs: 4.6, 1.25.12Evaluation5.12Evaluation Needs: 5.86.1Autoencoders6.1Autoencoders Needs: 3.6, 1.26.2Variational autoencoders6.2Variational autoencoders Needs: 6.1, 1.56.3GANs and normalizing fl…6.3GANs and normalizing flows (brief) Needs: 6.26.4ODEs and SDEs for gener…6.4ODEs and SDEs for generation Needs: 1.4, 1.66.5Diffusion and score mat…6.5Diffusion and score matching Needs: 6.4, 6.26.6Flow matching6.6Flow matching Needs: 6.56.7Guidance and conditioni…6.7Guidance and conditioning Needs: 6.66.8Latent diffusion and te…6.8Latent diffusion and text-to-image Needs: 6.7, 4.57.1Reading papers7.1Reading papers Needs: 4.67.2Experiments and ablatio…7.2Experiments and ablations Needs: 7.1, 4.67.3Introduction to interpr…7.3Introduction to interpretability Needs: 4.6, 1.27.4Reproducing a paper7.4Reproducing a paper Needs: 7.1, 7.2

Hover or Tab to a module to highlight what it needs and what it unlocks. Drag to pan; Ctrl/⌘ + scroll or the buttons zoom.

The course as a prerequisite graph: eight Parts as columns, arrows from what a module needs to what it unlocks. Keyboard: Tab moves between modules, Enter opens one; with the map focused, arrows pan and + / − zoom.

Set up the exercises locally. You need Python 3.11 or later and git.

Terminal window
git clone https://github.com/abhiraj2/glassbox.git
cd glassbox/exercises
python3 -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e .
mlc check 0.1 # fails: you haven't written anything yet

Open exercises/stubs/m0_1_welcome.py, implement the two functions, and run mlc check 0.1 again until every test passes. Or do it right here: the runner below uses the same stub and the same tests, running Python in your browser.

Pass your first test stubs/m0_1_welcome.py

Loading starter file…

Prefer your own editor? Edit exercises/stubs/m0_1_welcome.py and run mlc check 0.1. The tests are identical; import the results on the progress page.

Hints · mean 0/3 revealed

Then run mlc list to see every module with automated tasks.

1. Where do the core explanations in Glassbox come from?
2. A test fails and the message is unclear. What is the intended next step?
3. Where is your progress stored?
4. You finished the quiz with 60%. What does the module loop say to do?
  • not yet: All tests pass (0/?)
  • not yet: Checkpoint quiz ≥ 80%
Finish the items above first.
Learner log: time spent and points of confusion

Every confusion you note becomes a fix before the module is marked stable. Export it from the progress page and attach it to an issue.