CALC-04 · LOCAL AI MEMORY & THROUGHPUT SIZING

Local LLM VRAM & GPU Calculator

Calculate GGUF weight footprint, GQA KV cache growth across context lengths, runtime overhead, and feasible RTX GPU vs Apple Silicon unified memory tiers before buying hardware.

PRESETS:

Model & Inference Parameters

GQA + GGUF
TOTAL ESTIMATED VRAMFITS CONSUMER HARDWARE
22.0 GB
Model weights
18.35 GB
KV cache
2.00 GB
Runtime overhead
1.67 GB

Lowest GPU tier: Single 24 GB GPU (RTX 3090 / 4090) (~31–40 tok/s)

Lowest Mac tier: Mac 32 GB Unified (M4 Pro / Max) (~9–11 tok/s)

Single 16 GB GPU (RTX 4060 Ti / 5060 Ti)Needs 6.8 GB more usable VRAM
OOM
Single 24 GB GPU (RTX 3090 / 4090)1.2 GB free · est. 31–40 tok/s
TIGHT
Single 32 GB GPU (RTX 5090)9.0 GB free · est. 55–72 tok/s
PASS
Dual 24 GB GPUs (2× RTX 3090 / 4090)24.0 GB free · est. 27–35 tok/s
PASS
Mac 32 GB Unified (M4 Pro / Max)3.0 GB free · est. 9–11 tok/s
PASS
Mac 64 GB Unified (M4 Max Studio / MBP)28.0 GB free · est. 17–23 tok/s
PASS
Mac 128 GB Unified (M4 Max Studio / MBP)76.0 GB free · est. 17–23 tok/s
PASS
Mac 192 GB Unified (M2 / M3 Ultra Studio)126.0 GB free · est. 25–33 tok/s
PASS
SINGLE 24 GB GPU TIER ($800–$1,800)

24 GB RTX 3090 / 4090 Class GPU (or 32 GB Mac Mini M4 Pro)

Unlocks 32B Q4_K_M models at full GPU memory bandwidth (~35–55 tok/s on 24 GB GDDR6X) without multi-GPU PCIe overhead.

REFERENCE MATRIX

Common Open-Weights LLM VRAM Budgets (GGUF + GQA)

Estimated single-user footprints using standard GGUF block overheads and typical CUDA/Metal runtime buffers.

ModelQuantWeightsKV CacheTotal VRAMRecommended Hardware Tier
Llama 3.1 / 3.3 8BQ8_0 (8.5 bpw)8.0 GB~1.0 GB (8k FP16)~10.1 GBSingle 16 GB GPU / 16–24 GB Mac
Qwen 2.5 / R1 14BQ4_K_M (4.85 bpw)8.3 GB~3.0 GB (16k FP16)~12.6 GBSingle 16 GB GPU / 24 GB Mac
Qwen 2.5 / R1 32BQ4_K_M (4.85 bpw)18.4 GB~2.0 GB (8k FP16)~22.0 GBSingle 24 GB GPU / 32 GB Mac
Qwen 2.5 / R1 32BQ8_0 (8.5 bpw)32.2 GB~4.0 GB (16k FP16)~38.5 GBDual 24 GB GPU / 64 GB Mac Studio
Llama 3.3 / R1 70BQ4_K_M (4.85 bpw)39.9 GB~2.7 GB (16k Q8)~45.2 GBDual 24 GB GPU / 64 GB Mac Studio
Mistral Large 2 123BQ4_K_M (4.85 bpw)69.4 GB~5.9 GB (32k Q8)~78.8 GB128 GB Mac Studio / 4× 24 GB GPU
ENGINEERING FAQ

VRAM, KV Cache & Throughput Questions

Why does a 32B Q4_K_M model need ~22 GB of VRAM instead of 16 GB?

Q4_K_M weights average ~4.85 bits per parameter including GGUF quantization block scales (~18.4 GB for 32.5B). On top of model weights, inference engines allocate KV cache for your context window plus ~1–2 GB of CUDA or Metal runtime buffers.

How much of Apple Silicon unified memory can macOS allocate to local LLMs?

By default, macOS reserves roughly 20–25% of unified RAM for the operating system and wired buffers. On a 64 GB Mac Studio, expect ~48–50 GB of usable GPU memory without triggering swap.

When should I quantize the KV cache to Q8_0 or Q4_0?

At 4k–8k context, FP16 KV cache is modest on modern GQA models (Llama 3, Qwen 2.5). Once you push to 32k–128k context or multi-stream batching, switching KV cache to Q8_0 cuts KV VRAM nearly in half with minimal accuracy impact.

Why is token generation speed estimated from memory bandwidth instead of TFLOPS?

Single-user autoregressive token generation (decode) is memory-bandwidth bound: each generated token requires streaming the entire active model weights from VRAM. Higher memory bandwidth (e.g., 1008 GB/s on RTX 4090 or 546 GB/s on M4 Max) directly raises tok/s.