Attention, grown up: RoPE, GQA, FlashAttention and Mamba
Attention and the Transformer · Open board
The attention board shows every word looking back at every earlier word. This lesson is what happened to that picture when people tried to feed it a whole book.
Before you start. From Mixture of Experts (a big brain with a cheap forward pass): a model has a bill in time, set by the numbers one word touches, and a rent in memory, set by every number it stores. From Serve 01: The KV Cache: the KV cache is the model’s saved notes on every earlier word, and for a 7-billion model it costs 512 KB per word. From The GPU (thousands of cores, and the memory that feeds them): a card has a huge slow store (HBM, high-bandwidth memory) and a tiny fast table (shared memory), and the road between them is the limit. From Attention & the Transformer: every word asks a question (a query), every earlier word shows a label (a key) and hands over content (a value), and a head is one such asking.
Lesson 71 of 83 in AI
The rest of this lesson is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.