Total Memory (GB) ≈ (Parameters in Billions × Bits per Weight) / 8 + KV Cache + 0.5–1 GB Runtime Overhead. As a quick rule of thumb, 4-bit quantized models need ~0.6 GB per 1 billion parameters for weights alone—plus headroom for your OS and context length.Understanding LLM RAM requirements prevents the most frustrating beginner error: assuming a 4.5 GB model file fits inside 4.5 GB of free memory. Total runtime memory consists of three distinct parts that must coexist in RAM or VRAM while you chat.

The 3 Components of Local LLM Memory
- Model Weights: Determined by parameter count and quantization precision. Uncompressed 16-bit weights (FP16) take 2 bytes per parameter (~14 GB for a 7B model). Compressing to 4-bit (
Q4_K_M, ~0.55–0.6 GB per billion parameters) drops that same 7B model to ~4.4 GB. - KV Cache (Active Context Window): Every token in your system prompt, chat history, and pasted source code is stored in the Key-Value cache. Expanding context from 4,096 tokens to 32,768 or 128,000 tokens can consume multiple gigabytes of extra VRAM/RAM independent of model weights.
- Runtime & Operating System Overhead: CUDA/Vulkan/CPU runtime buffers require ~0.5–1.0 GB (or a 15–20% multiplier), and Windows/Linux desktops consume 2–3 GB before you launch a terminal.
Quick Reference: RAM & VRAM by Parameter Size
| Model Parameters | FP16 (16-bit) | Q8_0 (8-bit) | Q4_K_M (4-bit) | Recommended Hardware Tier |
|---|---|---|---|---|
| 1.5B – 4B | 3–8 GB | 2–4.5 GB | ~1.2–2.6 GB | 8 GB RAM laptop (CPU or integrated GPU) |
| 7B – 9B | 14–18 GB | 7.5–9.5 GB | ~4.4–5.8 GB | 16 GB RAM laptop or 8 GB+ VRAM GPU |
| 12B – 14B | 24–28 GB | 13–15 GB | ~7.5–9.0 GB | 16 GB Unified / 12–16 GB VRAM |
| 20B – 34B | 40–68 GB | 22–36 GB | ~12–22 GB | 24 GB VRAM or 32 GB Mac Unified RAM |
| 70B – 72B | 140+ GB | 72–76 GB | ~40–45 GB | 48+ GB VRAM or 64 GB+ Workstation RAM |
Worked Example: Why 8 GB Laptops Prefer 3B Models Over 7B
Suppose you own an 8 GB RAM Windows laptop:
- Windows + browser/terminal overhead: ~3.2 GB used (leaving ~4.8 GB free).
- If you pull a 7B
Q4_K_Mmodel (~4.4 GB weights + ~0.8 GB KV cache/runtime = ~5.2 GB), you overflow free RAM and force disk swapping. - If you pull a 3B
Q4_K_Mmodel (~2.0 GB weights + ~0.6 GB KV cache/runtime = ~2.6 GB), the entire model stays safely in fast RAM with ~2.2 GB spare headroom.
How Context Length Multiplies Memory Usage
Many users notice an 8B model works fine for short chat questions yet crashes as soon as they paste a long code file or PDF. That happens because KV-cache allocation grows linearly with active context length (num_ctx) and parallel batch size (OLLAMA_NUM_PARALLEL). On tight 8 GB–16 GB laptops, keep num_ctx capped at 4096 unless you explicitly verify spare headroom.
What Happens During Partial CPU/GPU Offloading?
If your GPU has 6 GB VRAM and a model requires 7.5 GB, runtimes like Ollama and llama.cpp can split layers between VRAM and system RAM. While this prevents a hard crash, every token pass must wait on system RAM bandwidth, slowing output significantly. Whenever possible, keep the entire model + KV cache inside either VRAM or available RAM.
Frequently Asked Questions
How much RAM do I need for a 7B parameter LLM?
In 4-bit quantization (Q4_K_M), a 7B model needs roughly 4.4 GB for weights plus 1–2 GB for KV cache and runtime overhead—meaning at least 8 GB VRAM or a 16 GB system RAM laptop is recommended for comfortable use.
Does SSD speed affect local LLM performance?
SSD speed only impacts initial model loading time if everything fits inside RAM/VRAM. Once loaded, generation speed depends entirely on RAM/VRAM capacity and bandwidth—unless you run out of memory and hit disk swapping.
What free tools check if my PC can run a specific model?
You can calculate weights manually using our 0.6 GB-per-billion-parameters Q4 shortcut above or inspect active loaded sizes directly inside Ollama using the ollama ps command.