Everyday Tools

Will This AI Model Fit My GPU? VRAM and Speed Explained

How to estimate GPU memory for running a language model locally: weight precision, quantisation, KV cache, batch size and the bandwidth limit on speed.

Saizul Amin
Saizul Amin30 Oct 2026 · 3 min read
Will This AI Model Fit My GPU? VRAM and Speed Explained

Will This AI Model Fit My GPU? VRAM and Speed Explained

Downloading an open-weights model is easy. Finding out it does not fit on your graphics card after a 15 GB download is less fun. A few multiplications tell you in advance, and the LLM VRAM calculator does them for every common precision at once.

Where the memory goes

Three things share the GPU's memory while a model generates text.

Weights. Every parameter is stored as a number. At 16-bit precision each takes 2 bytes, at 8-bit 1 byte and at 4-bit half a byte. An 8-billion-parameter model is therefore about 16 GB at 16-bit and about 4 GB at 4-bit.

KV cache. To avoid recomputing the past, the model keeps keys and values for every earlier token in every layer. Its size is 2 × layers × KV heads × head dimension × tokens × batch × bytes per value. With 32 layers, 8 KV heads, 128-dimensional heads and 8,192 tokens at 16-bit, that is about 1.07 GB for one conversation.

Overhead. Activations, the GPU runtime and framework buffers take more. The calculator adds 10%, a reasonable middle figure.

Why grouped-query attention matters

Older designs gave every attention head its own keys and values. Most recent open models share them across groups of heads, so a model with 32 attention heads may have only 8 KV heads. That cuts the cache by four. Look for "num_key_value_heads" in the model's configuration file and enter it exactly.

Context and batch can outgrow the weights

Doubling the context doubles the cache; serving eight users at once multiplies it by eight. A 4-bit model that needs 5.6 GB for one 8k conversation could need over 12 GB for eight. This is why servers that handle many users care so much about cache size and why some frameworks store the cache at 8 bits.

How fast will it run?

For a single user, generation speed is limited mainly by memory bandwidth rather than raw compute. Producing each token means reading every weight once, so the ceiling is:

tokens per second ≈ bandwidth ÷ bytes of weights

A card with 1,000 GB/s running a 4 GB quantised model tops out near 250 tokens per second in theory, and the tool reports a slightly lower bound after counting cache reads. Real speeds are often half to two thirds of the ceiling. Batching serves several users per pass, so total throughput rises even though each user's stream does not get faster.

Choosing a precision

  • 16-bit keeps full quality and is the reference.
  • 8-bit halves memory with very small quality loss in most tests.
  • 4-bit quarters memory; good quantisation methods keep results close for chat and coding, though fine details can suffer.

The table in the calculator shows the total for each precision against your card, so you can see the best quality that still fits.

Reading the model card

Everything the calculator needs is in the model's configuration file on its download page: the parameter count, "num_hidden_layers", "num_key_value_heads" and "head_dim" (or hidden size divided by attention heads). Copy those numbers rather than guessing from the model's name, because two models with the same headline size can have very different cache sizes.

Practical tips

Leave headroom: the estimate is a minimum, and the desktop, browser and other programs may already use some VRAM. Close them or use a second GPU for display. If the model will not fit, try a shorter context first; it costs nothing in quality for short tasks.

These figures are engineering estimates, not vendor specifications. Test with your own software before buying hardware.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages