Ollama · Ollama / Linux, macOS, Windows
Model requires more system memory
Error message
Error: model requires more system memory (X GiB) than is available (Y GiB)Why it happens
Ollama checks free RAM and VRAM before loading weights and the KV cache, and aborts if currently available memory is smaller than the model's total footprint.
How to fix it
- Unload idle models still cached in memory (default 5 minutes): run
ollama psand stop them withollama stop <model>. - Close memory-heavy background apps (browsers, IDEs, Docker containers) to increase immediately available RAM.
- Pull a smaller parameter count or lower quantization tag (for example
q4_K_Minstead ofq8_0orfp16). - Lower the context window (
num_ctx) in Ollama Settings -> Context length or viaOLLAMA_CONTEXT_LENGTH=4096to shrink KV cache usage. - Set
OLLAMA_MAX_LOADED_MODELS=1so multiple models do not stay loaded concurrently.
ollama psSeeing a different message? Paste it into the Error Code Fixer
Related errors
- Connection refused on port 11434
- PyTorch CUDA Out of Memory
- PyTorch Cannot Detect CUDA GPU
- PyTorch Installed Without CUDA
Fixes are reviewed by ComputerTech against current documentation, and software changes fast. If a step differs on your version, tell us. Back up important data before changing drivers, BIOS or system files.