On this page
Ollama’s “model requires more system memory than is available” is a check Ollama runs before it loads anything. It compares what the model needs with the memory free right now, so a 32 GB machine with 20 GB in use can fail on a model that needs 14 GB. Fix it in this order: check the GPU is being used, unload other models, lower the context, then pick a smaller quant. If the model still needs more than your machine has, it’s too big for that machine.
Everything below comes from Ollama’s own docs and was checked on 16 November 2026.
Why it fails on a machine with “enough” RAM
Three things on Linux shrink the number Ollama sees:
- The GPU isn’t being used. When Ollama can’t use your NVIDIA or AMD card, the whole model has to sit in system RAM, so the requirement jumps.
- Other models are still loaded. Ollama keeps a model in memory for 5 minutes after the last request, and by default it can hold 3 models per GPU, or 3 on a CPU-only machine.
- A container limit. If Ollama runs in Docker or Podman with a memory limit, Ollama sees the limit, not the host’s RAM.
The context window counts too. Ollama’s docs say a larger context needs more memory, and RAM grows with OLLAMA_NUM_PARALLEL times the context length.
Step 1: Check the GPU is in use
Run:
ollama ps
The PROCESSOR column says 100% GPU, 100% CPU or a split such as 48%/52% CPU/GPU. If you have a supported card and it says 100% CPU, fix the GPU first, since that’s what’s inflating the RAM requirement.
What Ollama supports, from its GPU docs:
| Card | Requirement |
|---|---|
| NVIDIA | Compute capability 5.0 or newer, driver 550 or newer (cards rated 5.0 to 6.2 need driver 570 or newer) |
| AMD | The ROCm v7 driver on Linux |
| Other cards | Vulkan is used when the Vulkan backend is installed |
If the NVIDIA card isn’t found, Ollama’s troubleshooting page suggests making sure the uvm driver is loaded with sudo nvidia-modprobe -u, reloading the nvidia_uvm module, or rebooting after a driver update. Read the logs with:
journalctl -u ollama --no-pager --follow --pager-end
Step 2: Unload what you don’t need
ollama ps
ollama stop <model>
Stop every model you aren’t using. To stop Ollama holding several at once, set OLLAMA_MAX_LOADED_MODELS=1. Then check free -h to see how much is really available. If your browser, an IDE or a build is holding most of it, close them before loading the model.
Step 3: Lower the context length
On cards under 24 GB of VRAM, and on CPU-only machines, Ollama defaults to a 4096-token context. If you raised it, bring it back down. On Linux with systemd:
sudo systemctl edit ollama.service
Add under [Service]:
Environment="OLLAMA_CONTEXT_LENGTH=4096"
Environment="OLLAMA_KV_CACHE_TYPE=q8_0"
Environment="OLLAMA_NUM_PARALLEL=1"
Then:
sudo systemctl daemon-reload
sudo systemctl restart ollama
OLLAMA_KV_CACHE_TYPE=q8_0 stores the conversation cache in about half the memory of the default f16, per Ollama’s FAQ. It needs Flash Attention, which Ollama turns on when your hardware supports it. It applies to every model.
For a one-off test inside ollama run, type /set parameter num_ctx 4096.
Step 4: Fix a container limit
If you run Ollama in Docker, check the container’s limit:
docker stats --no-stream
If MEM USAGE / LIMIT shows a cap well below your host’s RAM, raise or remove the --memory flag (or mem_limit in Compose) and recreate the container. Read the container’s logs with docker logs <container-name>.
Step 5: Pick a smaller quant or model
If the model needs more than the machine has, nothing above will make it fit. Try the Q4 tag of the same model instead of Q8, or the next size down. A rough guide: a 4-bit GGUF is about 0.6 GB per billion parameters on disk, and it needs more than that once it’s running.
Symptom, check, fix
| Symptom | Check | Fix |
|---|---|---|
| Error on a machine with lots of RAM | free -h, ollama ps |
Stop other models, close apps |
100% CPU with a GPU installed |
journalctl -u ollama for GPU discovery |
Update the driver, reload nvidia_uvm, reboot |
| Fails only in Docker | docker stats limit |
Raise the container memory limit |
| Fails after raising context | OLLAMA_CONTEXT_LENGTH |
Lower it, add OLLAMA_KV_CACHE_TYPE=q8_0 |
| Still fails at 4096 context with nothing else loaded | Model size vs RAM | Smaller quant or smaller model |
A desktop app that warns you first
If you’d rather see the problem before the download, Off Grid AI Desktop is a free app with a Linux build (x64 AppImage and amd64 .deb). It runs GGUF models with llama.cpp on CUDA, Vulkan or CPU. The Models screen shows memory guidance per model and marks models that are Tight on RAM or Won’t fit, and you can set the context window per model. Settings → AI activity shows which backend and model each request used, and any error.
Need the full-size model?
Some models just don’t fit a desktop, however you tune them. Off Grid AI Boost is an API for open models on our GPUs, at one flat price from $4.99 a month for the first cohort (regular price $9.99, plans up to $199.99). It names Qwen 3.8 and DeepSeek V4.1 Flash, uses one API key for every model, and we don’t store your prompts or train on them. The full privacy policy comes with launch.
It’s a pre-order: Boost starts in January; pre-order to lock in half price. Usage limits for each plan aren’t published yet. Run what fits on your own box, and call Boost for the model that doesn’t.
FAQ
Does Ollama check total RAM or free RAM? Free RAM. Closing apps and stopping other models changes the result.
Will swap stop the error? Don’t rely on it. Even when a model loads into swap, replies get very slow. Lower the context or use a smaller quant instead.
How do I make Ollama use my GPU on Linux?
Install a supported driver (NVIDIA 550 or newer, or ROCm v7 for AMD), restart Ollama and check ollama ps shows GPU. If not, read journalctl -u ollama for the discovery error.
Why does the error happen only when two people use the server?
OLLAMA_NUM_PARALLEL and a second loaded model both add memory. Set parallel to 1 and limit loaded models to 1.
Is there a way to force Ollama to load anyway? Free memory or shrink what the model needs. Forcing a model that doesn’t fit leads to swapping or the kernel killing the process.
Start with ollama ps and free -h. Those two commands tell you which of the five steps you need.