Ollama · Ollama / Linux, macOS, Windows

Model requires more system memory

Error messageError: 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

  1. Unload idle models still cached in memory (default 5 minutes): run ollama ps and stop them with ollama stop <model>.
  2. Close memory-heavy background apps (browsers, IDEs, Docker containers) to increase immediately available RAM.
  3. Pull a smaller parameter count or lower quantization tag (for example q4_K_M instead of q8_0 or fp16).
  4. Lower the context window (num_ctx) in Ollama Settings -> Context length or via OLLAMA_CONTEXT_LENGTH=4096 to shrink KV cache usage.
  5. Set OLLAMA_MAX_LOADED_MODELS=1 so multiple models do not stay loaded concurrently.
ollama ps

Seeing a different message? Paste it into the Error Code Fixer

Related errors

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.