Computed with the open FitLLM engine — accurate per-layer KV-cache modeling, not a naive estimate. Updated 2026-07-10.
Ranked by memory size (a proxy for cost and availability), not price. Every figure is computed by the engine — these are a floor, not a guarantee; leave headroom for your runtime and OS.
~4-bit ≈ Q4_K_M (GGUF, llama.cpp) on GPU / 4-bit (MLX) on Mac · ~8-bit ≈ Q8_0 / 8-bit · KV cache F16 · "full" = the model's max context (131K).
| Setup | Smallest GPU | Smallest Mac |
|---|---|---|
| ~4-bit · 8K ctx | ✅ RTX 3060 12GB · 8.5/12 GB | ✅ M5 Pro 48GB · 13.6/48 GB |
| ~4-bit · full (131K) | ✅ RTX 5090 · 29.4/32 GB | ✅ M5 Pro 48GB · 34.5/48 GB |
| ~8-bit · 33K ctx | ✅ RTX 3090 · 16.5/24 GB | ✅ M5 Pro 48GB · 21.9/48 GB |
| ~8-bit · full (131K) | — 🔴 | ✅ M5 Max 64GB · 38.7/64 GB |
| Hardware | Memory | Max context (~4-bit) | Used @8K |
|---|---|---|---|
| RTX 3060 12GB | 12 GB | ✅ up to 25K | 8.5 / 12 GB |
| RTX 4080 SUPER | 16 GB | ✅ up to 48K | 8.5 / 16 GB |
| RTX 5080 | 16 GB | ✅ up to 48K | 8.5 / 16 GB |
| RTX 3090 | 24 GB | ✅ up to 92K | 8.5 / 24 GB |
| RTX 4090 | 24 GB | ✅ up to 92K | 8.5 / 24 GB |
| RTX 5090 | 32 GB | ✅ up to 131K | 8.5 / 32 GB |
| M5 Pro 48GB | 48 GB | ✅ up to 131K | 13.6 / 48 GB |
| M5 Max 64GB | 64 GB | ✅ up to 131K | 13.6 / 64 GB |
| M5 Max 128GB | 128 GB | ✅ up to 131K | 13.6 / 128 GB |
Llama-3.1-8B-Instruct's KV cache is computed per layer with its real head_dim and grouped-query head count — not the uniform "all layers × full context" shortcut most calculators use. So Llama-3.1-8B-Instruct has no single fixed memory requirement — it shifts with quantization and context. See the full breakdown.
▶ Open the interactive calculatorAll numbers are computed by the open-source fitllm-engine (MIT) from official model config.json values — reproduce or audit them yourself. Estimates; real usage varies with runtime (llama.cpp / MLX / Ollama), driver and display. Found a mismatch? Report it. · FitLLM home