the kitchen 🍜
-
attention is all you need, part 5: inference and the KV cache
how a trained Transformer writes fast: the KV cache drawn row by row, multi-query and grouped-query attention, the attention patterns models use, and what it all costs in memory
-
attention is all you need, part 4: the decoder, masking and training
how the Transformer's decoder writes one word at a time, why it needs a mask, how it reads the encoder through cross-attention, and how the whole model is trained
-
attention is all you need, part 3: one encoder block
residual connections, layer normalisation and the feed-forward network, the parts that turn one attention layer into a Transformer encoder block
-
attention is all you need, part 2: multi-head attention and positions
how the Transformer learns word order from sine waves, and why it runs several attention heads side by side
-
attention is all you need, part 1: self-attention from scratch
a scroll-through, step-by-step walk through scaled dot-product attention, with every multiplication drawn and every number real