Don’t know which model to look up? Start from your graphics card instead: see what LLM your GPU can run. Check my GPU →

VRAM calculator

VRAM Calculator for Local LLMs

0.0GB Memory it needs
WEIGHTS0.0 GB
KV CACHE0.0 GB
RUNTIME0.0 GB

Cards that hold it

How this is calculated

Runs on old mining cards too. Keep YOUR tool updated and accurate.ETH vramcalculator.eth 0x786f…1B09

Domain for sale: voxllm.com

Got your number? Now see it the other way round: what your GPU can run →

How much VRAM do I need to run an LLM?

Three things, added together: the model's weights, the KV cache for your context, and what the inference engine keeps for itself. This VRAM calculator adds them for the model, quantization, context length and backend you pick above, shows each part on its own line, and names the smallest single card that holds the total. For a mid-size model at 4-bit and a moderate context, the weights are most of the bill; push the context toward the model's full window and the cache can overtake them.

I test those totals on real cards, with a prompt that fills the context while the card's memory is sampled, because a model that loads empty can still fail on the first long request. The calculator is built to land at or just above what the card really uses, so a miss means a setup it called too tight that squeezed in, not one it promised that crashed. The VRAM calculator accuracy record lists every run, misses included.

  • Weights are the model file. Where a published GGUF file's size is on record, the calculator uses that measured size instead of an estimate from the parameter count, because the two can differ by a lot at low bit widths. For every other model it multiplies parameters by bits per weight. llama.cpp keeps the token embedding table in system RAM unless the model ties it to the output, so on the card the weights come to a little less than the file.
  • The KV cache is the memory that holds your conversation, and it grows with every token of context. It is usually what decides whether a card that fits the model also fits the chat. Architecture matters as much as size here: sliding-window attention, compressed attention and recurrent layers can cut the cache to a fraction of what a plain full-attention model of the same size needs.
  • Runtime is what the engine keeps for itself: a fixed base and a small share of the total, plus a little per token of context on llama.cpp, each measured on real cards for llama.cpp, Ollama, LM Studio and vLLM, with vLLM's total kept inside its default share of each card. ExLlamaV2 is not in the list: it loads EXL2 files, and the calculator sizes GGUF builds. A single card then keeps a margin free, because filling one to the last megabyte fails in practice. On a consumer card that margin covers the desktop, which takes 1 to 1.5 GB at 1080p; workstation and server cards keep a smaller one.

Have a GGUF file already? Pick Custom architecture at the end of the model list, open the file in its GGUF reader, and it reads the model's header in your browser. Nothing uploads. It works as a GGUF VRAM calculator for files that are not in the list yet.

Start from the other side if you know your card and not your model: the GPU checker lists what your graphics card can run, the Mac checker does the same for Apple Silicon, and the speed checker estimates tokens per second once it fits.

Why these numbers are not a guess

Most VRAM calculators multiply the parameter count by a rule of thumb. This one reads what the engine actually allocates. A rule of thumb that treats every model as full attention can budget several times the KV cache a hybrid model really uses, enough to rule out a card that runs the model.

  • Built from the engines' own code. The Strata calculator and the Project Maya calculator port each engine's own placement rules and are re-read at every release, then checked against real runs of the engine.
  • Checked by people outside this site. Owners of Radeon, Strix Halo and NVIDIA machines have posted their engines' startup logs, and those logs are how the figures here get corrected. When a lab or a quantizer publishes its own memory table, the calculator is held to it.
  • It models what simple calculators skip: experts kept in RAM or read from the SSD, two or more different cards, unified memory on Strix Halo, DGX Spark and Mac, the draft model's memory, and speed checked against measured runs.
  • Outside figures are credited to the person who ran them, by name, with a link.

The tools are free, with no sign-in and no ads.

FAQ

How do I calculate VRAM for an LLM?

Add the weights (the model file size, or parameters times bits per weight divided by 8), the KV cache for your context length, and the engine's overhead, then keep a margin spare: more on a consumer card that also drives your display, less on a workstation or server card. This LLM GPU memory calculator does all three and shows each part separately.

How much VRAM does a 27B model need?

It depends on the model's attention design, so pick yours above. A 27B model at Q4_K_M is a file of roughly 16 to 17 GB, and the cache for a long conversation comes on top. Plan on a 20 GB or 24 GB card. A 16 GB card only works with a short context and nothing else on it, such as a card with no screen attached, and the calculator flags that as tight.

Does context length change how much VRAM I need?

Yes. The weights stay the same size, but the KV cache grows with every token you keep, and on a model with full attention at its longest window the cache can be larger than the weights. Set the context window to the length you actually use before you trust the total.

How accurate is this VRAM calculator?

It is tested rather than asserted: every round of real runs on llama.cpp, with a prompt filling the context, is published with the calculator's prediction beside the card's measured peak. It is built to sit at or just above the real figure, so its misses fall on the safe side. The full table is in the VRAM calculator accuracy record.

Does this VRAM calculator upload my GGUF file?

No. The calculation runs in your browser, and the GGUF reader opens only the file's header on your machine, so the file never leaves it. There is no signup.

Hear about notable models when they reach the calculator

Sent by hand, only when a model worth running is added here, with the VRAM it needs at common quantizations. No schedule and no spam.

Subscription Form (#3)