The goal E University
Build a transformer from scratch
Implement self-attention, multi-head attention and positional encoding yourself, and put them together into a working small transformer.
- Knowledge nodes
- 49
- From zero
- about 40 h
- Labs
- 6
See what you already know — no account
The diagnostic removes what you already know, so your path is usually much shorter.
What you can do afterwards
Labs along the way
You write the code. Tests you cannot see decide whether it holds up.
Project 3: Dissect a language modelEa sandbox · about 180 minLab: a neural network in pure NumPy — forward, backprop, gradient checkDa sandbox · about 75 minLab: dot product, norm and cosine similarityDin the browser · about 40 minLab: gradient descent from scratchDin the browser · about 50 minLab: matrix multiplication and one layer of a neural networkDin the browser · about 45 minLab: scaled dot-product attention with a causal maskDa sandbox · about 60 min
The whole path
Everything the goal builds on, grouped by level and in the order it builds on itself. Show on the map
AExplorer2 knowledge nodes
BInvestigator5 knowledge nodes
CBuilder9 knowledge nodes
- Functions and coordinate systems
- Distance calculation and Pythagoras' theorem
- Programming logic — variables, conditions, loops
- Python — the basics
- Python — lists, loops and dictionaries
- Statistics — mean, median and spread
- Probability — the basics
- Linear regression: fitting a straight line to data
- Neural networks — the intuition
DAI developer19 knowledge nodes
- Derivatives and optimisation
- Time complexity and big-O notation
- Python — functions, scope and exceptions
- Python — classes and objects
- Probability distributions
- The normal distribution and standardisation
- Tokenisation
- Gradient descent
- Trigonometry — the basics
- Vectors
- Matrices and matrix multiplication
- Neural networks — the forward pass with matrices
- Activation functions
- Backpropagation
- Embeddings — words as vectors
- Attention
- PyTorch — tensors and autograd
- Train a neural network in PyTorch
- Transformers — the architecture