Context calculator
How much VRAM does a long chat need? Choose the model, quantization, and context length — with real architecture data.
- Model – GB
- Context (KV cache) – GB
- Buffer 0,5 GB
- your card – GB
| Context | KV-Cache | Total |
|---|
What's the context?
Context is everything the model currently has “in mind”: your chat history, inserted documents, and its own responses. To keep the model from having to recalculate everything, it stores intermediate results in VRAM, the so-called KV cache. The longer the chat, the bigger it gets.
Modern models save a lot here: some only look at the last few hundred tokens in most layers (sliding window), while others have layers with no cache at all. That is why models of the same size can differ a lot. The values come from the manufacturers' architecture data (config.json on Hugging Face). In practice, programs often need a bit more; Ollama and LM Studio set the context length themselves, in LM Studio under “Context Length”.