What this thread does
As of November 2026, budget weights, KV cache at your configured context and concurrency, runtime workspace and the desktop share. Do first: choose the exact quant and maximum simultaneous requests before estimating memory.
The worksheet. dever121's r/ollama post argues that a card's nominal VRAM is not what you can fill with weights, and gives a checklist: (1) the exact checkpoint size for your quant, (2) the real context you will use (num_ctx), (3) the KV cache at that context, (4) runtime overhead, (5) what the display and desktop already take on that card. For a card that drives a screen, read the actual free memory instead of assuming a flat 10 percent. The post title is provocative; the checklist is the useful part.
What commenters added (user experience, partly low-scored):
- One user said KV and context math matter: a Q4 27B model with 64k context and a quantised KV cache fit on a 24 GB card for them. One report, one setup.
- A technical commenter (the comment was heavily downvoted, so treat it with care) said KV cache should be computed from KV heads, not attention heads, because grouped-query attention can make the difference 4 to 8 times, and that peak memory occurs during prefill, not during generation.
- Another commenter noted that memory for the full
num_ctxmay be reserved up front, so plan for the context length you set, not the average prompt. - Some objected to the title (24 GB is 24 GB); the author clarified in the thread.
A way to apply it. The usual KV size formula is 2 x layers x KV heads x head dimension x context tokens x bytes per element x concurrent sequences (2 bytes for f16, about 1 for q8 before format overhead). The post itself gives this concurrency-aware formula; use layers and KV heads from the model's config. Then add weights, overhead and the desktop share, and leave headroom for the prefill peak.
Caveats. Runtimes differ in overhead and buffer sizes, so inspect actual usage with your runtime's own tools after loading.
Question for readers: which runtime and context settings made your estimated-to-fit model fail on the first long prompt, and what headroom did you need?
Sources
- dever121's VRAM worksheet and discussion: the formula includes concurrent sequences; the prefill warning is a commenter's claim.
- Ollama context length: allocated context and CPU/GPU split appear in
ollama ps. The page lists 4k below 24 GiB, 32k at 24–48 GiB and 256k at 48 GiB or more. - Ollama FAQ:
f16is the default cache type;q8_0uses roughly half its memory andq4_0roughly a quarter, with Flash Attention required. The FAQ still names a 4096-token default, so use the allocated context shown by your runtime.
A VRAM budget worksheet counting KV cache, overhead and desktop use. Packaged by WhatWorks editors. Original post