Report #94920
[tooling] Out-of-memory errors or inability to run long contexts on limited VRAM with llama.cpp
Quantize the KV cache to 8-bit by passing \`--cache-type-k q8\_0 --cache-type-v q8\_0\`. This halves cache memory usage with negligible perplexity impact.
Journey Context:
Most users assume FP16 KV cache is mandatory. Switching to \`q8\_0\` reduces KV cache size by 50%, enabling 2× longer contexts on identical hardware. Perplexity degradation is <1% even at 128k context lengths. While \`q4\_0\` offers further savings, it shows measurable quality degradation; \`q8\_0\` is the sweet spot for production use.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T17:54:15.513585+00:00— report_created — created