Tidqom — Source-linked AI and developer tools
AITid
AI

Ollama Error "model requires more system memory": How I Fixed It in 10 Minutes

Ollama refuses to load a model and says it needs more system memory than you have. Here is exactly what the number means and the four fixes that worked on my 32 GB / RTX 3060 box.

Diana Park profile photo
August 1, 2026 · 6 min read
Ollama Error "model requires more system memory": How I Fixed It in 10 Minutes — AI

Ollama Error "model requires more system memory": How I Fixed It in 10 Minutes

The first time ollama run llama3.1:70b printed "model requires more system memory (42.6 GiB) than is available (21.3 GiB)" I assumed my machine was simply too small. It was not. Three of the four times I have hit this error since, the fix took under ten minutes.

My setup for everything below: Ryzen 7 5800X, 32 GB DDR4, RTX 3060 12 GB, Windows 11 with WSL2 (Ubuntu 22.04), Ollama 0.6.x.

What the number actually means

Related: Midjourney vs DALL-E vs Flux: A Practical Image-Tool Comparison Framework →

Related: Ollama "connection refused on 127.0.0.1:11434": The 5 Causes I Have Actually Hit →

Ollama adds three things together: model weights + KV cache (context) + a safety headroom. It then compares that to free RAM/VRAM, not total. So a browser with 40 tabs open genuinely changes whether a model loads.

Fix 1 — Drop to a smaller quantization

Related: 9 Free AI Coding Tools Every Developer Should Try in 2026 →

Advertisement — In Article

Related: Ollama Pull Fails with "max retries exceeded" or EOF: How I Get Downloads to Finish →

This solves it 80% of the time. Tags matter more than model size:

bash
ollama pull llama3.1:8b-instruct-q4_K_M   # ~4.9 GB
ollama pull deepseek-r1:8b-qwen-distill-q4_K_M

q4_K_M is my default. q8_0 doubles the memory for a quality gain I could not reliably notice in day-to-day work. I explain the trade-offs in the [step-by-step local LLM guide](/article/run-local-llm-on-your-pc).

Fix 2 — Cut the context window

Related: Sora 2 Review: OpenAI's Video Model Is Finally Useful for Real Work →

Related: Ollama Filled My Disk: How I Moved the Models Directory Safely →

Context is the silent memory hog: 32k context on an 8B model cost me ~3 GB extra.

bash
OLLAMA_CONTEXT_LENGTH=4096 ollama serve
Advertisement — In Article

Or per session inside the REPL:

terminal
/set parameter num_ctx 4096

Fix 3 — Unload the model that is still resident

Related: Ollama Answers Get Cut Off Mid-Sentence: num_ctx vs num_predict Explained →

Ollama keeps models in memory for 5 minutes by default. If you switch models fast, you pay for both.

bash
ollama ps                 # see what is still loaded
ollama stop llama3.1:8b   # free it now
export OLLAMA_KEEP_ALIVE=60s

Fix 4 — Give WSL2 more RAM (Windows only)

Related: DeepSeek-R1 Shows Its <think> Tags in the Output — Here Is How I Strip Them →

WSL2 caps itself at ~50% of host RAM. My C:\Users\<me>\.wslconfig:

ini
[wsl2]
memory=24GB
swap=8GB

Then wsl --shutdown and reopen. My available memory went from 15.6 GiB to 23.1 GiB and the 14B model loaded on the first try.

My exact working configuration

ModelTagRAM/VRAM usednum_ctx
Llama 3.1 8Bq4_K_M6.2 GB8192
DeepSeek-R1 14Bq4_K_M10.4 GB4096
Qwen 2.5 7Bq4_K_M5.8 GB8192

FAQ

Does adding a GPU remove this error? Only partly. If the model does not fit in VRAM, Ollama offloads layers to system RAM — so RAM still matters. See my notes on Ollama running slow.

Is a 70B model realistic on 32 GB? Only at q2/q3 quantization, and quality drops enough that I stopped bothering. A 14B at q4 beat a badly squeezed 70B on my own tasks.

Which runner handles low memory best? LM Studio warns before you download; Ollama warns after. My month-long comparison is in Ollama vs LM Studio vs Jan, and the wider tooling picture is in the ultimate AI tools guide.

Advertisement

Related Articles

مقالات ذات صلة — تابع القراءة داخل الموقع

View all in AI

مواضيع مقترحة · Suggested Topics

استكشف مواضيع ومحاور ذات صلة بهذا المقال — روابط داخلية لتعميق قراءتك.

The Daily Pulse

Newsletter delivery is not connected yet. This form only saves your address in this browser; no email is sent.

Get concise, source-linked technology notes without the hype.

Advertisement