transformer-explainer

Transformer Explainer

Watch a decoder think, one matrix at a time.

A graphical, interactive walk-through of the Transformer decoder. Type in tokens, then see every operation — embeddings, masked self-attention, FFN, layernorm, residuals, and final next-token sampling — execute on the server and visualised step-by-step in your browser.

For learners

Three layers — concept, maths, code — togglable per section, so you can stay at the level you find useful.

For code readers

The codebase is itself a teaching artefact. Browse the source on GitHub to see Next.js full-stack patterns alongside the maths.

Phase 0 placeholder · /learn and /playground come online in later phases.