The Illustrated Transformer
The explanation of transformer architecture that finally makes attention click for most people, built almost entirely from diagrams. An hour here saves a great deal of confusion later.
Guide
AI & Machine Learning
Jay Alammar
About an hour
Intermediate
Free
What it is
A single long article explaining the transformer architecture visually, walking through self attention, multiple heads, positional encoding and the encoder and decoder stacks one diagram at a time.
Why it is the standard recommendation
The original paper is short and assumes a great deal. Most secondary explanations either restate the equations or hand wave. This one shows the actual shape of the data at each step, which is exactly the missing piece for people who think in structures rather than in linear algebra.
What to read after
The follow up article on large language models, then Karpathy's lecture where a transformer is built in code. Diagram, then implementation, is a very effective order.
Best for: anyone who has read that attention is all you need and did not come away knowing what attention is.
Ready to start?
Opens on Jay Alammar in a new tab.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Every session is free; a few slots open each week.
Follow along
New writing, resources and project ideas land here first.