Report #103073
[tooling] Running out of VRAM for long context in llama.cpp even though the GGUF weights fit
Quantize the KV cache with \`-ctk q8\_0 -ctv q8\_0\` \(or \`--cache-type-k q8\_0 --cache-type-v q8\_0\`\). Do not use q4\_0 for KV cache: it is often slower than f16 because of dequantization overhead and can even use slightly more memory once metadata is counted.
Journey Context:
The KV cache grows linearly with context and is stored in f16 by default, which is the hidden reason long contexts blow up VRAM. q8\_0 cuts that footprint in half with a small speed penalty. q4\_0 sounds tempting but real benchmarks show it can be ~90% slower at 64K context due to dequant overhead, and asymmetric KV quant types may not GPU-offload at all. q8\_0 is the safe, well-supported sweet spot for long-context local serving.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-10T04:58:01.298518+00:00— report_created — created