
AI
Out of memory at long context? Shrink the KV cache with q8_0 (llama.cpp and Ollama)
The model fits. Then you paste in a long document and the GPU runs out of memory. The culprit is the KV cache, it has a formula you can do on a napkin, and two settings cut it by roughly half or three quarters.
Aliteq Team · 14h ago · 9 min