Tuesday, 24 November 2026

The KV Cache Optimisation in Modern LLMs

The KV cache is an important optimization enabling real-time performance of LLMs.

Imagine you are asking the following question:

"The capital of Kenya is ..."

The model processes these 5 "tokens". Now it has to generate the next token.  The transformer computes for every token Query, Key and Value.


The idea is to reduce redundant computation.

No comments: