Module 0 · optional math toolkit
Read the mathematics, then return to the mechanism
A shape declaration such as X ∈ ℝ^(T × d_model) tells you what kind of object you have. A formula tells you what to do with it. Learn to separate these two jobs, then read the equations behind attention.
Use the part you need
This toolkit is optional. You can enter from an attention equation, practice a specific skill, and return immediately. Nothing here blocks Modules 1 or 2; exercises have explanations and no score.
- 0.1 · The grammar of mathematical notation
Read declarations, functions, fractions and transpose.
- 0.2 · Indices, sums and maxima
Identify free and bound indices; translate a reduction into a loop.
- 0.3 · Dimensions and transpose
Infer compatible shapes and diagnose impossible products.
- 0.4 · Softmax and numerical stability
Read stable softmax and distinguish an identity from its floating-point implementation.
- 0.5 · Transformer equations in context
Trace projections, weights, values and raw cache bytes.
- 0.6 · Write equations and read a paper
Write equations from pseudocode and decode an unfamiliar excerpt.
Try before revealing
Read one worked example, hide the explanation, and translate the next expression into words. Check the reference only after making a prediction. The final transfer prompt deliberately uses different symbols.
No calculus is required. Familiarity with arrays and simple loops is useful; each lesson states its own prerequisites. All numerical examples are invented teaching examples.