Ollama Model Sizes 2026: How Much RAM Does Each Model Really Need
Pulling a model too big for your machine is the classic local-LLM failure. This covers the size math, quantization levels, real footprints of common models, and how much context window costs.
📜 Table of Contents
Ollama Model Sizes 2026: How Much RAM Each Model Really Needs
Local LLMs fail in one predictable way: you pull a model that looks impressive, it starts loading, and the machine locks up. The model isn't broken — the arithmetic wasn't done. Here is the math, the quantization levels, and a table to work backwards from your hardware.
1. The size formula is one line
Parameters × bits per weight ÷ 8.
- 7B at 16-bit: 7 × 10⁹ × 2 bytes ≈ 14GB
- 7B at 4-bit: ≈ 3.5GB, and real files land around 4GB because a few layers stay at higher precision
That is the whole point of quantization: trade a little accuracy for three quarters of the size. Most people cannot hear the difference in chat; code and math tasks show it.
2. Reading quantization tags
| Tag | Bits | Size | Quality | When |
|---|---|---|---|---|
q2_K |
2–3 | smallest | noticeably worse | last resort |
q4_0 |
4 | small | fair | legacy |
q4_K_M |
4 mixed | small | good | default choice |
q5_K_M |
5 mixed | medium | better | spare RAM |
q8_0 |
8 | ~2× | near original | quality first |
f16 |
16 | ~4× | original | fine-tuning, evals |
3. Real footprints at 4-bit
| Model | Approx size | Use | RAM |
|---|---|---|---|
qwen2.5:1.5b |
~1GB | completion, classification | 4GB |
llama3.2:3b |
~2GB | light chat, summaries | 6GB |
qwen2.5:7b |
4–5GB | Chinese daily driver | 16GB |
llama3.1:8b |
4–5GB | English general | 16GB |
gemma2:9b |
5–6GB | English comprehension | 16GB |
qwen2.5:14b |
~9GB | code, long writing | 32GB |
qwen2.5:32b |
~20GB | near-production local | 64GB or 24GB VRAM |
llama3.1:70b |
~40GB | workstation/server | 96GB+ |
Check each model page at ollama.com for exact numbers. The right question is not "what is the largest I can load" but "how much headroom is left".
4. Context window is the hidden cost
Weights are the fixed cost; the KV cache grows with context length. Going from 4K to 32K context is roughly 8× the cache. A 7B model using 5GB of an 8GB card leaves room for only a few thousand tokens; push context higher and Ollama offloads layers to the CPU, and speed drops by an order of magnitude.
ollama run qwen2.5:7b --context-length 8192
Or pin it in a Modelfile with PARAMETER num_ctx 8192.
5. Working backwards from hardware
| Machine | Safe model size | Fits |
|---|---|---|
| 8GB laptop | ≤4GB | 1.5B–3B, 7B slow |
| 16GB RAM | 7–9GB | 7B/8B comfortably |
| 32GB RAM | 16–20GB | 14B comfortably, 32B workable |
| 8GB VRAM | 5–6GB | 7B fully on GPU |
| 16GB VRAM | 12GB | 14B fully on GPU |
| 24GB VRAM | 20GB | 32B fully on GPU |
| 64GB unified (Apple) | 40GB | 70B at 4-bit |
Rule of thumb: RAM ≥ 2× model size. The extra factor covers the OS and the context cache.
6. Check before downloading
ollama list shows installed sizes, ollama show <model> --modelfile shows layers and parameters, and ollama ps shows the runtime footprint — that last number includes context cache and is the one that matters.
7. VRAM vs RAM
Fully on GPU is fast (tens of tokens/sec). Fully on CPU is slow (a few tokens/sec) but fine for background summarising. Mixed offload works but speed scales with how much got pushed off. For CPU-only machines, more RAM beats a new GPU; with an 8GB card, moving to 16GB VRAM beats more RAM.
FAQ
File says 4.7GB, ollama ps shows 6GB? That gap is the KV cache and runtime overhead; it widens with context length.
q4_K_M vs q4_0? Similar size, but mixed precision protects sensitive layers, so quality is usually better. No reason to prefer q4_0.
Can I load only part of a model? Ollama offloads layers it cannot fit, but the goal is "runs", not "runs fast". If it crawls, use a smaller model.
Does it store two copies? No. Blobs are content-addressed, so shared weights are stored once.
❓ FAQ
Why did my PC freeze?
The model + overhead exceeded RAM and the OS swapped to disk - hard. Reduce model size or context.
What does q4 vs q8 mean for quality?
q8 is closer to full precision (better quality, 2x size); q4 is the standard tradeoff.
Can I run a 70B on 16GB?
Only heavily quantized (q2-q3) and slowly - not recommended.
Does context length affect memory?
Yes - KV cache grows with context; 128k context on a small machine will OOM. Keep it modest.
Written by our editorial team; tools listed here are tested or verified against public sources. Links point to official sites or GitHub repos for reference only — no paid placements.