Guide · AI & Machine LearningFree

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.

Format

Guide

Topic

AI & Machine Learning

Provider

Jay Alammar

Time needed

About an hour

Level

Intermediate

Access

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.

aimachine learningllmfree course

Ready to start?

Opens on Jay Alammar in a new tab.

Open resource
Work with me

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.