LLM VRAM Calculator: GPU Memory for GGUF, Q4/Q8 & BF16
Last verified: · Official sources only for model facts; estimates labelled as such
Free LLM VRAM calculator for planning local LLM runs, including Qwen3.8-27B and a planning estimate for the unreleased Qwen4-27B. Pick a quantization (BF16 / Q8 / Q5_K / Q4_K GGUF-style), context length and your GPU VRAM to see an estimated memory budget. Now also covers PrismML Bonsai 2 (phone / thin-laptop ternary packs), Nemotron 3.5 Lightning, Kimi K3, DeepSeek V4, GLM 5.3 and Gemma 4, plus a GPU VRAM list for RTX 50/40 cards.
How to use this LLM VRAM calculator
Pick a model from the dropdown (Qwen4-27B for planning, or a released stand-in such as Qwen3.8-27B, Gemma 4, Bonsai 2, Nemotron 3.5 Lightning). Choose a quantization — BF16 for full precision, Q8 / Q5_K / Q4_K for GGUF-style smaller footprints — then set the context length you actually need. Optionally type your GPU VRAM (or click a row in the GeForce table below) to get a can-it-run verdict. The four tiles show weights from the formula, an estimated KV cache when the architecture allows it, a flat ~1.5 GB runtime overhead, and the total.
Treat every total as a planning estimate, not a lab measurement. MoE models still load all experts even when only a fraction activate. Hybrid / Mamba attention often has no simple per-token KV figure on the model card, so those rows mark KV as n/a — leave headroom yourself for long context. Official ternary packs (PrismML Bonsai 2) are smaller than the conventional Q4 formula; prefer the pack sizes in the notes when you are targeting a phone or thin laptop.
Worked example: Qwen3.8-27B on an RTX 4090 (24 GB)
Goal: run the official open-weight Qwen3.8-27B locally on a 24 GB GeForce RTX 4090. Select Qwen3.8-27B, set quantization to Q4_K, context to 8,192, and click the RTX 4090 row (or type 24). Weights ≈ 27 × 0.5 = 13.5 GB; with this page’s KV estimate and ~1.5 GB overhead the total often lands in the high teens — usually a “comfortable” or “tight” verdict depending on exact KV. If the verdict turns red, drop context to 4,096 or try Q5 only if you have spare VRAM after a short-context test.
Same card at BF16 needs ~54 GB for weights alone, so a single 24 GB GPU will not hold the full-precision checkpoint — you would need multi-GPU, CPU/disk offload, or a much smaller model (Gemma 4 12B Q4 is a common 12–16 GB alternative on this calculator). For Qwen4-27B specifically, remember weights are not released yet; use the same 27B planning assumption and revisit when Alibaba publishes the model card. After you pick an engine, read DeepInfer vs vLLM for serving trade-offs.
GPU VRAM quick lookup (desktop GeForce)
Standard Memory Config from NVIDIA compare specs (verified 2026-10-15). Laptop SKUs often differ; check your exact model. Click a row to fill “Your GPU VRAM” above.
| GPU | VRAM | Memory type |
|---|---|---|
| GeForce RTX 5090 | 32 GB | GDDR7 |
| GeForce RTX 5080 | 16 GB | GDDR7 |
| GeForce RTX 5070 Ti | 16 GB | GDDR7 |
| GeForce RTX 5070 | 12 GB | GDDR7 |
| GeForce RTX 5060 Ti | 16 GB / 8 GB | GDDR7 |
| GeForce RTX 5060 | 8 GB | GDDR7 |
| GeForce RTX 5050 | 8 GB | GDDR6 |
| GeForce RTX 4090 | 24 GB | GDDR6X |
| GeForce RTX 4080 SUPER | 16 GB | GDDR6X |
| GeForce RTX 4080 | 16 GB | GDDR6X |
| GeForce RTX 4070 Ti SUPER | 16 GB | GDDR6X |
| GeForce RTX 4070 Ti | 12 GB | GDDR6X |
| GeForce RTX 4070 SUPER | 12 GB | GDDR6X |
| GeForce RTX 4070 | 12 GB | GDDR6 / GDDR6X |
| GeForce RTX 4060 Ti | 16 GB / 8 GB | GDDR6 |
| GeForce RTX 4060 | 8 GB | GDDR6 |
Verified lookup & formula
| Item | Value | Source |
|---|---|---|
| Qwen 4 status | Currently in training; no public weights | Alibaba Cloud press room (2026-10-15) |
| Qwen3.8-27B parameters | 27B (language model); HF reports ~28B with vision | Hugging Face model card (2026-10-15) |
| Qwen3.8-27B attention layout | 64 layers; 16× full gated attention (4 KV heads × 256); rest Gated DeltaNet | model card (2026-10-15) |
| Qwen3.8-27B context | 262,144 native (extensible) | model card (2026-10-15) |
| Kimi K3 parameters | 2.8T total, 104B activated, 1M context | Hugging Face model card (2026-10-15) |
| DeepSeek V4 Flash parameters | 284B total, 13B activated, 1M context; FP4+FP8 mixed | Hugging Face model card (2026-10-15) |
| DeepSeek V4 Pro parameters | 1.6T total, 49B activated, 1M context; FP4+FP8 mixed | Hugging Face model card (2026-10-15) |
| DeepSeek V4.1 Flash parameters | 552B backbone, 8B/16B activated, plus 196B Engram memory; up to 1M context | Hugging Face model card (2026-10-15) |
| GLM 5.3 parameters | Card does not state a total; HF safetensors metadata ≈753B (FP8) | Hugging Face model card (2026-10-15) |
| GLM 5.3 Flash parameters | 320B total, 18B active | Hugging Face model card (2026-10-15) |
| Gemma 4 E2B / E4B parameters | 2.3B / 4.5B effective (5.1B / 8B with embeddings), 128K context | Hugging Face model card (2026-10-15) |
| Gemma 4 12B / 31B parameters | 11.95B / 30.7B, 256K context | Hugging Face model card (2026-10-15) |
| Gemma 4 26B-A4B parameters | 25.2B total, 3.8B active, 256K context | Hugging Face model card (2026-10-15) |
| PrismML Bonsai 2 2B / 4B / 9B / 27B parameters | ~1.88B / ~4.21B / ~8.95B / 27.36B language (+ vision tower separate) | HF 27B, docs 4B, HF 2B, HF 9B (2026-10-16) |
| Bonsai 2 ternary GGUF deployed sizes (PTQ1_0 / PQ2_0) | 2B: 0.43 / 0.52 GB; 4B: 0.95 / 1.15 GB; 9B: 2.00 / 2.42 GB; 27B: 5.95 / 7.21 GB | PrismML download docs (2026-10-16) |
| Nemotron 3.5 Lightning parameters | 30B total, 3B active; BF16 fits 1× H100 80GB (official recipe) | Hugging Face model card (2026-10-16) |
| Weights formula | VRAMweights ≈ params_B × bytes/param (BF16/FP16=2, Q8≈1, Q5_K≈0.625, Q4_K≈0.5) | Common GGUF / weight-size rule of thumb; not an official Qwen table |
| Runtime overhead | +1.5 GB estimate (CUDA context, activations, fragmentation) | Estimate — adjust for your framework |
Example: Qwen3.8-27B at BF16 → 27×2 = 54 GB weights only. At Q4_K → 27×0.5 = 13.5 GB weights, plus KV and overhead.
Prefilled common-model VRAM needs (weights-only)
Quick reference using this page’s formula (params × bytes/param). Figures are weights only before KV cache and ~1.5 GB runtime overhead — use the calculator above for a full estimate. MoE models still load all experts. Official pack sizes (e.g. Bonsai ternary) can be smaller than the formula.
| Model | Params (card) | BF16 | Q8 ≈ | Q4_K ≈ | Typical fit (guide) |
|---|---|---|---|---|---|
| Gemma 4 E2B | 5.1B | ~10 GB | ~5 GB | ~2.6 GB | 8 GB GPU / phone-class when quantized |
| Gemma 4 12B | 11.95B | ~24 GB | ~12 GB | ~6 GB | 12–16 GB GPU at Q4–Q5 |
| Gemma 4 31B | 30.7B | ~61 GB | ~31 GB | ~15 GB | 24 GB+ GPU or 32 GB unified Mac at Q4 |
| Qwen3.8-27B | 27B LM | ~54 GB | ~27 GB | ~13.5 GB | 24 GB GPU often needs Q4 + short context |
| Qwen4-27B (planning) | ~27B assumed | ~54 GB | ~27 GB | ~13.5 GB | Weights not released — planning only |
| Nemotron 3.5 Lightning | 30B / 3B act. | ~60 GB | ~30 GB | ~15 GB | Official BF16 recipe: 1× H100/A100 80GB |
| Bonsai 2 4B (ternary pack) | ~4.21B | n/a* | n/a* | ~0.95–1.15 GB pack | Phone / thin laptop (official ternary) |
| Bonsai 2 27B (ternary pack) | 27.36B | n/a* | n/a* | ~5.95–7.21 GB pack | Apple Silicon laptop class |
| DeepSeek V4 Flash | 284B / 13B act. | ~568 GB | ~284 GB | ~142 GB | Multi-GPU server (MoE loads all experts) |
| DeepSeek V4.1 Flash | 552B backbone† | ~1.1 TB | ~552 GB | ~276 GB | Large cluster; Engram not included |
| GLM 5.3 Flash | 320B / 18B act. | ~640 GB | ~320 GB | ~160 GB | Multi-GPU |
| Kimi K3 | 2.8T / 104B act. | ~5.6 TB | ~2.8 TB | ~1.4 TB | Not a consumer GPU target |
* Prefer official ternary GGUF file sizes over BF16/Q4 formula for Bonsai 2. † V4.1 Flash Engram memory (~196B) excluded from these weight estimates. After you pick an engine, read DeepInfer vs vLLM for serving trade-offs.
FAQ
How much VRAM does Qwen4-27B need?
Alibaba has not published Qwen4 weights or VRAM requirements. As of this page's verified date, Alibaba only states that Qwen 4 is currently in training. Until the official model card appears, this calculator estimates a 27B-parameter model with the standard weights formula (params × bytes per parameter) plus an estimated KV cache and runtime overhead.
How much VRAM does Qwen3.8-27B need?
The official Hugging Face card lists 27B language-model parameters (HF also reports ~28B including the vision stack). BF16 weights alone are about 27 × 2 = 54 GB. At Q4 (~0.5 bytes/param) weights are about 13.5 GB before KV cache and runtime overhead. Exact fit depends on quantization, context length and framework.
What is the GGUF VRAM formula used here?
Weights VRAM ≈ parameter_count_billions × bytes_per_parameter. This page uses FP16/BF16=2, Q8≈1, Q5_K≈0.625, Q4_K≈0.5 bytes/param. Real GGUF file sizes vary slightly by quant variant (e.g. Q4_K_M vs Q4_0). KV cache and framework overhead are estimated separately and labelled as estimates.
Will Qwen4-27B run on a 24 GB GPU (RTX 4090)?
Unknown until official weights ship. If the released model is about 27B dense parameters, a Q4_K-class quant plus a short-to-moderate context often lands near or under 24 GB in this calculator's estimate — treat that as a planning guide only, not a guarantee.
Does context length change VRAM?
Yes. Model weights stay fixed; KV cache grows with context length (and batch size). Longer context needs more free VRAM after the weights are loaded.
Is this LLM VRAM calculator free?
Yes. It runs entirely in your browser, with no signup and no upload.
Can I run Kimi K3 locally?
Only on very large multi-GPU servers. Moonshot's Hugging Face card lists 2.8T total parameters (104B activated, MoE). Every expert must stay in memory, so with this page's formula even a ~4-bit quant needs roughly 2,800 × 0.5 ≈ 1,400 GB for weights alone (an earlier ~610 GB figure circulating online does not match the official parameter count). That is far beyond any single consumer GPU.
Kimi K3 VRAM requirements
Weights-only estimates from the official 2.8T parameter count: BF16 ≈ 5,600 GB, Q8 ≈ 2,800 GB, Q4 ≈ 1,400 GB, plus KV cache (1M-token context) and runtime overhead. These are formula estimates, not official Moonshot figures; Moonshot has not published a VRAM table.
How much VRAM do DeepSeek V4 Flash, V4 Pro and V4.1 Flash need?
Official cards: V4 Flash 284B total (13B activated), V4 Pro 1.6T (49B activated), V4.1 Flash 552B backbone plus 196B Engram memory. MoE models still load all experts, so weights-only at ~4-bit are about 142 GB, 800 GB and 276 GB respectively (formula estimates; V4.1 Flash Engram not included). The official checkpoints ship in mixed FP4+FP8.
How much VRAM do GLM 5.3 and GLM 5.3 Flash need?
GLM 5.3 Flash: 320B total, 18B active (official card) → ~160 GB weights at ~4-bit. GLM 5.3's card does not state a total; Hugging Face's file metadata reports about 753B parameters → ~377 GB at ~4-bit. Both are formula estimates before KV cache and overhead.
Can I run Gemma 4 locally / on Mac?
Yes for the smaller sizes. Per Google's model card: E2B (5.1B with embeddings) and E4B (8B) fit easily on 8 GB GPUs or Apple Silicon Macs when quantized; 12B (11.95B) is ~6 GB weights at Q4; 26B-A4B (25.2B total, 3.8B active) and 31B (30.7B) are ~13–15 GB at Q4, suited to 24 GB GPUs or Macs with 32 GB+ unified memory. On a Mac, unified memory is shared with the OS, so leave headroom. Figures are this page's formula estimates.
Can I run PrismML Bonsai 2 on a phone or thin laptop?
Yes for the smaller sizes. Official cards: Bonsai 2 2B (~1.88B LM) ternary packs are 0.43–0.52 GB; 4B (~4.21B) 0.95–1.15 GB; 9B (~8.95B) 2.00–2.42 GB; 27B (27.36B) 5.95–7.21 GB (PTQ1_0 / PQ2_0). PrismML positions 4B for phones and edge devices; 27B runs interactively on Apple Silicon laptops in their benches. Use PrismML's llama.cpp fork or supported MLX packs — stock llama.cpp only runs the Q2_0 packing. Formula VRAM below is an estimate for conventional quants; prefer official ternary file sizes.
How much VRAM does Nemotron 3.5 Lightning need?
Official NVIDIA card: 30B total / 3B active. The BF16 reference lists single-GPU deployment on 1× H100 80GB (or 1× A100 80GB). This page's formula estimate for 30B at Q4 is about 15 GB weights-only (estimate) — real MoE + Mamba hybrid footprints differ; use NVIDIA's NVFP4 card for optimized inference recipes. NVIDIA has not published a consumer GeForce VRAM table for Lightning 3.5 on the pages we checked.
How much VRAM does an RTX 5090 / 4090 have?
Per NVIDIA's compare-specs page (checked 2026-10-15): GeForce RTX 5090 has 32 GB GDDR7 and RTX 4090 has 24 GB GDDR6X. See the GPU VRAM table above for the rest of the RTX 50 and 40 series.
How should I pick context length vs VRAM?
Start with the shortest context that still fits your task (often 4k–8k for chat, higher for long documents). Weights stay fixed; KV grows with tokens. If the verdict is tight or red, cut context before you jump to a harsher quant — you usually lose less quality that way. After a successful short-context load, raise context in steps and watch for OOM.
Why does the calculator disagree with my llama.cpp / vLLM numbers?
Frameworks pack KV differently, use different CUDA allocators, and may offload layers to system RAM. This page uses a transparent weights formula plus labelled estimates for KV and a flat overhead. Use it to shortlist a GPU and quant; confirm with a real load of your exact GGUF or checkpoint. For serving engine choice see DeepInfer vs vLLM.
Sources
- https://www.alibabacloud.com/en/press-room/alibaba-unveils-roadmap-on-full-stack-ai-strategy (2026-10-15)
- https://huggingface.co/Qwen/Qwen3.8-27B (2026-10-15)
- https://huggingface.co/moonshotai/Kimi-K3 (2026-10-15)
- https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash (2026-10-15)
- https://huggingface.co/deepseek-ai/DeepSeek-V4-Pro (2026-10-15)
- https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash (2026-10-15)
- https://huggingface.co/zai-org/GLM-5.3 (2026-10-15)
- https://huggingface.co/zai-org/GLM-5.3-Flash (2026-10-15)
- https://huggingface.co/google/gemma-4-E2B (2026-10-15)
- https://huggingface.co/google/gemma-4-31B (2026-10-15)
- https://huggingface.co/google/gemma-4-26B-A4B (2026-10-15)
- https://huggingface.co/google/gemma-4-E4B (2026-10-15)
- https://huggingface.co/google/gemma-4-12B (2026-10-15)
- https://huggingface.co/prism-ml/Ternary-Bonsai-2-27B-gguf (2026-10-16)
- https://huggingface.co/prism-ml/Ternary-Bonsai-2-2B-gguf (2026-10-16)
- https://huggingface.co/prism-ml/Ternary-Bonsai-2-9B-gguf (2026-10-16)
- https://docs.prismml.com/models/bonsai-2-4b (2026-10-16)
- https://docs.prismml.com/download/models (2026-10-16)
- https://huggingface.co/nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16 (2026-10-16)
- https://www.nvidia.com/en-us/geforce/graphics-cards/compare/?section=compare-specs (2026-10-15)
Related
Last verified 2026-10-25. DreamCavy is not affiliated with Alibaba or the Qwen team. Estimates are for planning only.
