Key Cache
What is Key Cache?
In one sentence: The key cache is the part of the KV cache that stores the keys for all previous tokens.
What does Key Cache look like?
When writing token 1,001, the model checks its query against 1,000 cached keys.
Why does Key Cache matter?
It is half of the memory cost of the KV cache.
Last updated · Fact-checked by The AI Math
Linking to this page from a lesson or article? <a href="https://getaimath.com/dictionary/key-cache/">Key Cache, explained simply</a> (The AI Math Dictionary)