Dense but never confusing. Every chapter builds cleanly on the last — you can feel the care in the structure.

Transformers: Theory, intuition, and Building from Scratch
The transformer, from intuition to code.
Attention, positional encoding, and the full transformer architecture built from first principles and illustrated.
Read on your Kindle or e-reader
Download the EPUB and read offline — perfect for the train. Works on Kindle, Kobo, Apple Books & more.
00Introduction and Motivation2 capsules
Introduction and Motivation — 2 chapters.
01Example/Motivationfree12 min02Course Introductionconceptfree10 min01Foundations of Attention2 capsules
Foundations of Attention — 2 chapters.
03Attention Example🔒12 min04Understanding Attention🔒12 min02Challenges with Traditional Models1 capsules
Challenges with Traditional Models — 1 chapters.
05Shortcomings of Sequence-to-Sequence Models🔒12 min03Introduction to Transformers2 capsules
Introduction to Transformers — 2 chapters.
06Word Embeddings🔒11 min07Transformer Model Introconcept🔒12 min04Positional Encoding4 capsules
Positional Encoding — 4 chapters.
08Other Positional Encodings🔒13 min09Sinusoidal Encoding🔒11 min10Approaching Positional Encoding🔒12 min11Why Do We Need Positional Encoding?🔒12 min05Attention Mechanisms in Transformers1 capsules
Attention Mechanisms in Transformers — 3 chapters.
12Multi-Head Attention🔒12 minRatings & reviews
1,421 readersPractical and rigorous at the same time. I went straight from reading a capsule to shipping it at work.
The hand-drawn diagrams make abstract ideas click instantly. Wish every technical book was written like this.
A few sections moved fast for me, but re-reading with the figures open made everything land. Highly recommend.