Index Ai Academy
Glossary · Phase 5 · Transformers

Multi-query attention

The extreme of grouped-query attention: every query head shares a single key head and value head, giving the smallest KV cache.

Try it now

Without a cache, every step redoes every earlier token, so the work grows with the square of the length.

Learn it properly

Inference and the KV cache · Why generation is fast after the first token. About 35 minutes.

Create a free account See what's in the lesson

Other terms from the same lesson

Never trained an AI?

Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account.

Teach it to write