Index of concepts
This index lists the notebooks, foundation pages, standalone notes and sources on the site, and arranges the notebooks in 12 topics, from linear algebra to LLM systems. Search finds a concept by name. The curriculum presents the same notebooks in teaching order.
Search the notebooks, foundations, standalone notes and sources by name.
New to attention? Start here
How do comparisons become a mixture?
Follow the calculation: vectors → compare → normalize → mix
Follow one query through attention. Aim to explain how scores become weights, and how those weights carry information from values into an output.
One query attending to three tokens, with no mask. The worked example is open; no prediction is required first.
Vectors
Query, keys, values
Give the query and each key matching coordinates. Keep the values as the information to carry.
Read Vector SpacesQuery + keys → comparisons
Compare
Scaled scores
Multiply matching query–key coordinates, add, then divide by the square root of the key dimension.
Read Dot ProductScores → normalization
Normalize
Attention weights
Softmax turns the score row into nonnegative weights whose sum is one.
Inspect Weights in the notebookWeights + values → mixture
Mix
Output vector
Multiply each value by its weight, then add those contributions. The output lives in value space.
Inspect Mixture in the notebookOne weighted output
Normalize and Mix open the same notebook. Select Weights or Mixture there; these are views of one calculation, not separate lessons. Query and key vectors share a dimension; values may have a different dimension.
Need a foundation? Review just the missing idea
Optional reading, not a required course or a readiness test. Each concept page lists its own prerequisites.
- What can I add and scale?Vector Spaces
- How do two vectors become a score?Dot Product
- What does a total weight of one mean?Probability Basics
The notebook also offers Practice and transfer and Advanced demonstrations; choose them inside the notebook. Opening a route here does not record progress or establish mastery.
By topic
56 notebooks · 12 topics · 100 foundations · 4 standalone notes · 54 sources
Linear Algebra
Vectors, matrices, and linear maps: the language of representations, optimization, and modern deep learning. Open the topic.
Calculus
Rates of change and how they combine: derivatives, the chain rule, Jacobians and Taylor approximation, and the reverse-mode differentiation that makes backpropagation efficient. Open the topic.
Optimization
How neural networks are trained: gradient steps, learning rates and schedules, curvature and sharpness, and adaptive optimizers such as Adam. Open the topic.
Probability
Events, random variables, expectations and the distributions used in machine learning. Open the topic.
Information Theory
How information and the mismatch between distributions are measured: entropy, cross-entropy and KL divergence, and why they appear throughout machine learning. Open the topic.
Attention & Transformers
The transformer architecture: tokenization, self-attention, positional encodings and transformer blocks, with calculations of attention and its memory cost at long context. Open the topic.
Representation Learning
How models represent inputs as vectors: similarity and normalization, contrastive training, and sparse autoencoders for reading features out of activations. Open the topic.
Generative Models
How generative models are built and trained: latent-variable models and the ELBO, normalizing flows, diffusion and score-based models, and flow matching. Open the topic.
Scaling
How loss and capability change with parameters, data and compute; how to allocate a training budget; why some abilities seem to appear suddenly at scale; and how to spend compute at inference time. Open the topic.
Alignment
Training language models from human feedback: reward models fit to comparisons, KL-regularized fine-tuning, direct preference methods, step-level verifiers, and what goes wrong when a learned proxy is optimized too hard. Open the topic.
Efficiency
Ways to make models cheaper to train and serve: quantization, distillation, low-rank adapters, pruning and sparse experts, and the memory, latency and accuracy each one trades. Open the topic.
LLM Systems
How language models are served: prefill and decode, KV-cache memory, batching and scheduling, decoding rules, and techniques such as speculative decoding that cut latency. Open the topic.
Standalone notes
Foundations
100 earlier pages, written before the notebooks, on topics from the mathematics of training to alignment and interpretability. They also have their own index.
Open one when a notebook relies on an idea you want to look up. They do not need to be read in order.
A row marked Newer notebook opens the earlier page; a newer notebook on the same topic is listed above, under its topic.
Areas
Five overview pages, each following one theme across several topics.
Source shelf
Books, courses, papers, notebooks, code and visual explanations that the curriculum draws on or points to. They are external references, not material copied here and not endorsements.
Each row says how the site uses the source. A link does not grant permission to copy, redistribute, train on, or adapt the source; reusing any part of it means checking its license first.