Magic Tools
Developer ToolsBy CooconAugust 3, 2026282 views5 min read

How Much VRAM Do I Need for a Local LLM? (2026 Guide with Calculator)

How Much VRAM Do I Need for a Local LLM? (2026 Guide with Calculator)

Every open-weight model release kicks off the same scramble: people open a Reddit thread, check the model card, and ask "will this run on my GPU?" The honest answer is almost never a clean yes or no — it depends on four things you have to multiply together: parameter count, quantization, context length, and runtime overhead. This guide walks through each one, gives you the rule of thumb, and points you at a calculator that does the exact math.

What Actually Determines VRAM Requirements for a Local LLM

VRAM requirements for local LLM inference come from four moving parts:

  1. Model weights — the parameters, stored at a precision determined by your quantization choice
  2. KV cache — keys and values for every token in the context, stored for every layer
  3. Runtime overhead — buffers, activations, and memory fragmentation (roughly 8% of weights with a 1.5 GB floor)
  4. Batch size — this guide assumes batch size 1 (single-user inference), which is what most local setups use

Too many calculators only count weights. At long context lengths, the KV cache can match or exceed the weights — skipping it badly underestimates what you actually need.

The Rule of Thumb: 0.6 GB per Billion Parameters at Q4_K_M

Quantization matters more than the model name. At Q4_K_M (~4.8 bits per weight), weights take roughly 0.6 GB per billion parameters:

  • 7–8B model → ~5 GB → fits on an 8 GB card
  • 13B model → ~8 GB → 12 GB card is comfortable
  • 30B-class model → ~18–20 GB → needs a 24 GB card
  • 70B model → ~42 GB → two 24 GB cards, or a 64 GB+ Mac
  • 671B model (DeepSeek R1 full) → ~380 GB → 5–6× H100 80GB

These numbers are weights only. Add the KV cache for your context length and overhead before trusting them.

Quantization: The Cheapest Way to Cut VRAM

Quantization shrinks the bytes per weight. FP16 stores 2 bytes per parameter; everything else is a trade of quality for memory:

Format Bytes per param vs FP16 Typical use
FP16 2.0 Reference, maximum quality
Q8_0 1.0 2× smaller Near-lossless GGUF
Q6_K ~0.8 2.5× smaller High-quality GGUF
Q5_K_M ~0.66 3× smaller Good quality / size balance
Q4_K_M ~0.6 3.3× smaller Community default
MXFP4 ~0.53 3.8× smaller Native format for Kimi K3, gpt-oss

A model that needs 140 GB of weights at FP16 drops to around 42 GB at Q4_K_M. That is the difference between renting a multi-GPU server and running it on a single 48 GB card.

Q4_K_M is the community default for good reason: modest quality loss, huge memory savings. Go Q5_K_M or Q6_K if you have headroom, Q8_0 for near-lossless, and only drop to Q3/Q2 when nothing else fits — quality degrades noticeably below 4 bits.

Context Length: The Part Everyone Forgets

The KV cache grows linearly with context length. For a dense 70B model at FP16, 128K tokens of context needs roughly 40 GB of KV cache — enough to double your total VRAM requirement on its own.

Two architectural notes:

  • MLA (Multi-head Latent Attention) models — DeepSeek and Kimi compress the KV cache dramatically. This is why a trillion-parameter MoE can have a smaller context footprint than a dense 70B.
  • FP8 KV cache halves the cache again on hardware that supports it (RTX 4090+).

MoE vs Dense: Parameter Count Isn't the Whole Story

Mixture-of-Experts models (Kimi K3, DeepSeek R1, Qwen3-MoE, gpt-oss) have enormous total parameter counts but activate only a fraction per token. That does not mean you can store fewer weights — the full parameter set still has to live in VRAM, because any expert can be routed to. What MoE does change is the KV cache and compute behavior, which is why an LLM VRAM calculator that treats every model as dense will mislead you on the new flagships.

Real-World Examples

Can I run DeepSeek R1 on a single GPU? Not the full 671B model. At Q4 quantization the weights alone are about 380 GB, needing roughly 5–6× H100 80GB. Single-GPU users should run distilled variants — R1-Distill-Qwen-32B fits on a 24 GB card at Q4_K_M.

Can I run Kimi K3 locally? No consumer hardware can. K3 is a 2.8-trillion-parameter MoE shipped in MXFP4 — weights alone are ~1.4 TB, so even at native quantization you need a multi-GPU server (around 8× H200 141GB depending on context). The practical way to use K3 is a hosted API.

Can I run a 7B model on an 8 GB card? Yes, at Q4_K_M with a moderate context length. Weights are ~5 GB, leaving ~3 GB for KV cache and overhead — roughly 8K–32K context depending on the model's KV compression.

Use the Calculator Instead of Guessing

The rule of thumb gets you in the ballpark. When the decision is real — renting a GPU, buying a Mac for local inference, starting a 1 TB weight download — use the LLM VRAM Calculator to get an exact estimate: pick the model preset or enter parameters, choose your quantization and context length, and it returns weights + KV cache + overhead, plus a "will it fit" table across RTX 4090/5090, A100/H100/H200/B200, and Apple Silicon Macs.

The estimates are typically within ~10% of real usage at batch size 1. Actual numbers vary by runtime (llama.cpp offloads layers, vLLM pre-allocates KV blocks, MLX on Apple Silicon shares unified memory with the OS), so treat the output as a planning figure, not a guarantee.

FAQ

How much VRAM do I need for a local LLM? At Q4_K_M, roughly 0.6 GB per billion parameters for weights alone. An 8B model needs about 5 GB, a 70B model about 42 GB — before KV cache and overhead.

How much VRAM does quantization save? FP16 stores 2 bytes per parameter. Q8_0 halves it, Q4_K_M cuts it to ~0.6 bytes (3.3× smaller), and MXFP4 averages ~0.53 bytes. A 140 GB FP16 model becomes ~42 GB at Q4_K_M.

Does the estimate include the KV cache and overhead? Yes, in a full calculator. Total = weights + KV cache at your context length + runtime overhead (~8% of weights, 1.5 GB floor). Weight-only calculators badly underestimate long-context usage.

Which GGUF quantization should I choose? Q4_K_M is the community default. Q5_K_M / Q6_K if you have spare memory, Q8_0 for near-lossless, Q3/Q2 only when nothing else fits.

How does context length affect VRAM? The KV cache grows linearly with context. A dense 70B at FP16 needs ~40 GB of cache at 128K tokens — potentially doubling your total requirement. MLA models (DeepSeek, Kimi) compress this dramatically, and FP8 KV cache halves it again.

Is my data uploaded anywhere? No. The calculator runs entirely in your browser — model specs are bundled with the page and all math happens locally.

Related Articles

Dev Breakfast · 2026-09-18

Today's headline: AWS says some data in Middle East facilities can't be recovered: backup is harder than you think. Plus 7 more: Nvidia allows Rust to directly write GPU kernels, with two paths in parallel; 4B model-generated query plans are 81% faster than Postgres; and more.

daily-intelSep 18, 20269 min
31

Service Up, Ports Open, Certs Valid, VPN Dead for 4 Hours: Tailscale Took Over DNS and Left the Proxy Box With No Upstream

A Los Angeles VPS running sing-box (VLESS-REALITY + Hysteria2) lost its VPN the day after Tailscale was installed. systemctl, ports and certificates were all fine. The root cause was in /etc/resolv.conf: Tailscale manages DNS by default, the tailnet had no global nameservers, and when dhclient renewed its lease tailscaled read an empty resolv.conf and dropped its upstream list. From then on every public domain got SERVFAIL, and the REALITY handshake could not even resolve www.apple.com. Full timeline, the evidence for each step, three fixes, and the rules we added to CLAUDE.md so an AI assistant (Claude Code) does not walk into this again.

claude-codetroubleshooting+8
pitfallsSep 17, 20266 min
25

Dev Breakfast · 2026-09-17

Today's headline: Firefox 156 pushes 'Suggest' ads in the address bar, PDF starts up 45% faster. Plus 7 more: Karpathy's autoresearch six months later: Shopify uses it to improve 40+ metrics, rekursiv refreshes nanochat record in three days; Replacing actions/setup-go: Golang CI scaling actual test; and more.

daily-intelSep 17, 20266 min
64

Dev Breakfast · 2026-09-16

Today's headline: eBPF security agent overhead, an inode cache cuts it by 90%. Plus 4 more: Cloudflare reduced origin handshake guess error rate from 52% to 3.7%; Qwen3 voice dual models open-sourced: 63ms first-word latency, price is one-fifth of ElevenLabs; and more.

daily-intelSep 16, 20269 min
81

Published by Magic Tools