Interview Prep/Agentic AI/LLM fundamentals

What is the KV cache?

IntermediateConceptLLM fundamentals
Answer

During generation the model stores attention keys and values for tokens it has already processed, so it does not recompute them for every new token. The KV cache makes generation fast but consumes GPU memory proportional to context length and concurrency, which is why long contexts limit how many requests a GPU can serve at once.

All Agentic AI questions Roadmap: LLM fundamentals & RAG

More on LLM fundamentals