Skip to content

Glossary: Transformers Basics

KV cache

Also written: key-value cache

Stored keys and values of earlier tokens, reused while generating so each step computes only the new token. It makes steps cheaper but uses memory that grows with the context.

Where the book teaches it

Related terms

Query, key, valueGrouped-query attention (GQA)