Ollama Out of Memory Fix: Context Length, Quants & Cache Guide
Quick Fix Checklist: Run ollama ps to inspect loaded memory. Then (1) unload idle background models with keep_alive: 0, (2) cap your context window (PARAMETER num_ctx 4096) to shrink the KV cache, and (3) switch from Q8/Q5 weights to a Q4_K_M model. Hitting an Ollama out of memory (or CUDA out of memory / model … Read more