← Back to Troubleshooting
Troubleshooting

Ollama Says "Out of Memory" - Now What?

A model that should fit is failing to load or crashing mid-response. The fix depends on which kind of memory is actually the problem.

6 minute read
Last tested: August 2026 · Ollama 0.33.2

First, figure out which memory it means

"Out of memory" can mean two genuinely different things depending on your setup, and the fix is different for each:

GPU out of memory (CUDA error)

This means the model doesn't fit in VRAM at the quantization and context length you're running it at. The math is covered in Understanding VRAM, but the practical fixes, roughly in order of how much they help:

System RAM out of memory (CPU-only setup)

Same underlying cause as the GPU case - the model doesn't fit in the memory available to it - but on a CPU-only mini PC, this is exactly the "responses are painfully slow" or outright crash scenario covered in the mini PC guide's troubleshooting section. The fix is the same short list: a smaller or more quantized model, or more RAM if the machine supports it - see the RAM pick for what to check before buying a kit.

Either way, this isn't a bug to work around - it's the model genuinely not fitting in the memory you have. Choosing Your First Model covers matching a model's size to your actual hardware before you hit this in the first place.

Written from hands-on security operations experience. More about this site →