Ollama Model Sizes 2026: How Much RAM Does Each Model Really Need

📘 Tutorials 2026-08-14 2 min read

Downloaded a model and your machine froze? Model file size vs RAM - here's the math that prevents the swap-death spiral.

💡 What You Will Learn

Downloaded a model and your machine froze? Model file size vs RAM - here's the math that prevents the swap-death spiral.

📜 Table of Contents

The Swap-Death Spiral

You pull a 40GB model on a 16GB machine, the OS starts swapping, and everything freezes - the classic local-LLM failure. The fix is a simple budget: model file size + runtime overhead must fit in RAM/VRAM, with headroom for your OS and apps.

The Size Math

A model's file size is roughly: parameters x bits per weight / 8. A 7B model at 4-bit quantization is ~4-5GB. At 8-bit (fp16-ish) it doubles. That's why quantization exists: q4 gives you a 4.9GB Llama 8B instead of 16GB.

The Practical Budget

Rule of thumb: your machine needs model_size + 1GB overhead, and ideally 2x RAM headroom total (OS + browser + editor still need memory).

Machine RAM Safe max model Examples
8GB 4-6GB file Gemma 2B, Qwen 7B q4
16GB 7-10GB file Llama 8B, Qwen 14B q4
32GB 16-24GB file Qwen 32B q4, Llama 70B q3
64GB 35-48GB file Llama 70B q4, Qwen 72B q4

How to Check Before You Pull

# show model file sizes without downloading
ollama show <model> --modelfile | head -20
# or check the library page: the 'size' shown is the q4 file
ollama list  # after pulling, shows installed sizes

VRAM vs System RAM

The Upgrades That Actually Help

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.

Related Articles
2026-08-05
Free Online AI OCR in 2026: PaddleOCR (87k Stars), Tesseract and EasyOCR Compared - Extract Text from Images and PDFs
2026-08-01
Microsoft Open-Sources a Free Linux Operating System, Yes, From Microsoft!
2026-08-13
Run LLM on Android 2026: 5 Ways to Get a Local Model on Your Phone

💬 Comments (0)

No comments yet. Be the first!

Login to comment