Skip to content
llm-speed
Home/Tools/vram-fit

Free tool

LLM VRAM calculator

Pick a model, quantization, and rig. For a unified-memory machine, enter its installed memory. We estimate whether it fits in your VRAM or unified memory (weights + KV cache + overhead). Compare the estimate with submitted speed measurements for the model and hardware family where available; the run's quantization, context and runtime may differ.

Use the memory installed in your machine. Blank uses the catalog ceiling of 96 GB. The estimate reserves about 20% for the OS and other applications.

Measured memory, not estimates. On one RTX 5090 (32 GB) with llama.cpp 9725a31 and a 16,384-token context configured, Qwen3.8-27B Q4_K_M (18.97 GB file) loaded all 65/65 layers on the GPU and the runtime reported 18.62 GiB allocated for model, context and compute buffers (runs r_c3ps9wjygi9, r_dz5a3lzxhrj, r_7mod38qsldj). Gemma 4 12B IT QAT Q4_0 (6.98 GB file) loaded 49/49 layers with 7.75 GiB allocated (runs r_c2podhe9qwc, r_8xmm65n1fhq, r_v5arqmazf31). These are runtime-log allocations, not peak device memory; the calculator above is an estimate for other models and contexts.

Pick a model and a rig above. Or browse the cheatsheet of every measured (model × hardware) cell, or the tok/s predictor.

Which GGUF file should I download?

Start with a file your runtime supports, then check memory at your intended context length. These two files were tested on our RTX 5090 on September 5, 2026. They are concrete starting points for comparison, not a quality ranking or a complete list of current models.

Qwen3.8-27B · Q4_K_M

Qwen3.8-27B-Q4_K_M.gguf

18.97 GB file on disk. Our runtime reported 18.62 GiB for model, context and compute buffers in the tested configuration.

View exact Q4_K_M file

gemma-4-12b-it-qat · Q4_0

gemma-4-12b-it-qat-q4_0.gguf

6.98 GB file on disk. Our runtime reported 7.75 GiB for model, context and compute buffers in the tested configuration.

View exact Q4_0 file

File size is not the memory needed to run a model. Our text-only test used llama.cpp CUDA, a 16K configured context and one active request; the actual prompts were shorter. Runtime allocation is not peak whole-device memory. Different context, vision inputs, concurrency, tensor precision or runtime can change requirements. We have not measured these files on a Mac.

Compare measured speed and full settings · Download the benchmark data

For a Mac, enter your installed unified memory in the calculator. Leaving that field blank uses the family's catalog maximum. The estimate reserves about 20% for the OS and other applications; check the exact file, runtime and workload before buying.

How the estimate works

Memory ≈ weights + FP16 KV cache + a fixed runtime allowance. Source-backed model profiles use attention dimensions and exact file sizes where shown; other selections use parameter-count and quantization heuristics. A file size is a planning input, not resident VRAM. All values are decimal GB and 1K means 1,000 tokens. Context includes input and generated tokens for one sequence. For mixture-of-experts models the total parameter count drives memory — all experts must be resident — even though only a few billion are active per token (which is why they decode fast). Apple unified memory reserves ~20% for the OS. These are estimates, not guaranteed upper bounds. Recurrent state, runtime buffers, tensor precision and vision components can change memory use. Allow extra memory for other applications and simultaneous requests. The submitted tok/s describes the linked run, not a speed guarantee for your selected settings. Read the full methodology.

VRAM questions, answered from measured runs

How much VRAM does a 27B model need?

Measured: Qwen3.8-27B at Q4_K_M used 18.62 GiB of runtime GPU allocation on an RTX 5090 with a 16,384-token context configured (all 65 layers on GPU). Longer contexts need more; use the calculator for your context length.

Will Qwen3.8-27B fit on a 24 GB GPU?

We have not measured it on a 24 GB card yet. The measured 18.62 GiB allocation at 16K context on a 32 GB RTX 5090 suggests it can load, but context headroom on 24 GB is untested. Check your context in the calculator.

How much VRAM does Gemma 4 12B need?

Measured: Gemma 4 12B IT QAT Q4_0 used 7.75 GiB of runtime GPU allocation (6.98 GB file, all 49 layers on GPU) on an RTX 5090 with a 16,384-token context configured.

What uses VRAM besides the model file?

The KV cache (grows with context length), compute buffers and runtime overhead. In our measured Qwen3.8-27B run the 18.97 GB file became 18.62 GiB of allocation including context and buffers at 16K configured context.

Is this calculator's number a measurement?

No. The calculator estimates weights + KV cache + overhead. Measured allocations are shown only where we have signed runs, each linked to its run IDs.

LLM VRAM calculator: will a model fit your GPU? · llm-speed