AI Glossary · Cost and operations
What is KV cache?
key-value cache
A language model keeping in memory the intermediate calculations (keys and values) it has made for the text processed so far, so that it does not recompute the whole text for every new word. It grows as the context gets longer and takes up fast but expensive GPU memory. It should not be confused with a product's "memory" feature; it is only the working memory of the current session.
What it means in the field
For agents that work with long documents or proceed step by step, this memory often sets the limit on cost and on the number of concurrent users. When sizing hardware for an on-premises model, the calculation should be based not only on model size but on how many sessions will run at once and with how much context.