A model page on HuggingFace will tell you a model has eight billion parameters. It will not tell you that the same model needs under five gigabytes at four-bit and thirty at full precision, that the cache holding your conversation can outgrow the weights themselves at long context, or that the 128 GB machine on your desk will only hand about 96 of them to the GPU. Those three numbers decide whether it runs. None of them are on the page.
This calculator works them out. Where the answer can be measured it is measured — for a GGUF repository it reads the real byte size of every quantisation file rather than estimating from a table. The request goes straight from your browser to HuggingFace; nothing is sent to us, and there is nothing to sign in to.
The speed column is an upper bound from published memory bandwidth, not a benchmark: the memory system cannot deliver the bytes faster than that, and real throughput lands below it. Measured rates are here.
Three things occupy memory while a model is running, and only the first is the one everybody quotes.
The KV cache is where calculators diverge. The textbook formula — two, for keys and values, times layers, times key-value heads, times head dimension, times context — is correct for a plain transformer and wrong for most of the interesting models of the last two years. DeepSeek compresses keys and values into a single latent vector, so there is no factor of two and the head count does not enter at all. Gemma 3 makes five layers out of every six look at a 1,024-token window instead of the whole context. Qwen3-Next gives only every fourth layer a cache at all. Each of those is a different formula, and using the textbook one anyway does not produce a conservative answer — it produces a useless one.
Each of these was measured against the public HuggingFace API on 2026-08-31. The endpoints are open, so any of it can be re-run.
| The shortcut | What it produces | Measured |
|---|---|---|
| Read bits-per-weight off the format table: Q2_K is 2.63 bits. | The file is reported about a fifth smaller than it is. | 3.17–3.24 bpw across Llama 3.1 8B, Qwen3 8B, Gemma 3 12B — llama.cpp keeps selected tensors at higher precision, so the block format is not the file |
| One KV formula for every model. | DeepSeek V3.1 at 128k context reads as 488 GB of cache. | 8.6 GB — 57× smaller latent attention: kv_lora_rank 512 plus a 64-wide rope part, stored once, not twice, and the 128 key-value heads do not enter the sum at all |
| Every layer caches the whole context. | Gemma 3 and Qwen3-Next look far larger than they are. | 5.2× and 4× Gemma 3 caps 40 of its 48 layers at a 1,024-token window — 5.2× over at 32k context, 5.8× at 128k. Qwen3-Next gives only 12 of 48 layers a cache at all |
| A repository-level total is the model size. | The same 12B model reads as 1.14 TB, or as 186 GB — depending on which repository total you take. | 6.8 GB one file. The API reports usedStorage of 1.14 TB and the file listing sums to 186 GB, because the repository holds 29 quantisations and you download exactly one of them. The vision projector is a further 0.80 GB, in a file of its own |
There is a fifth, quieter one. HuggingFace publishes a per-datatype parameter breakdown, and it counts elements rather than bytes: gpt-oss-120b lists 2.2 billion sixteen-bit values and 114.7 billion eight-bit ones. Multiplying those out gives 110.8 GB, while the repository’s actual weight files come to 121.5 GB — close enough to look right, wrong enough to matter on a machine with 128. It is a parameter census, not a download size. Where a file exists, the file is the answer.
The second half of the question is what the machine will actually give you, and it is never the number on the box. Three different mechanisms take a share, and they behave differently enough that one rule of thumb cannot cover them.
iogpu.wired_limit_mbThis is why a table of nominal capacities is not much use. A 32 GB Mac mini and a 32 GB RTX 5090 hold very different models: the Mac hands its GPU about 21 of those gigabytes, the card about 31. The calculator above uses the usable figure throughout, and says which mechanism produced it.
| Measured | Quantisation file sizes, wherever the repository ships GGUF files — the real bytes, read live. Parameter counts, from HuggingFace's own index. Every architecture field: layers, key-value heads, head dimension, window sizes, expert counts. |
|---|---|
| Computed exactly | The KV cache. It is arithmetic on published architecture fields, with a separate formula for each of the four attention designs, and no rounding beyond the display. |
| Estimated | Sizes for quantisations no repository ships, from bits-per-weight measured on three real GGUF repositories rather than the nominal format figures. Runtime overhead, which depends on the runner, the batch size and the driver — it is editable for that reason. The active share of a mixture-of-experts model, from the layer decomposition. |
| Borrowed | Device memory, bandwidth and allocation ceilings are vendor specifications and published figures, read 2026-08-31. Prices are a coarse indicative band and enter no calculation. The Mac Studio M5 rows are flagged as announced rather than shipped. |
| Out of scope | Training and fine-tuning, which add optimiser states and gradients and are a different calculation entirely. Multi-GPU splits beyond a simple memory sum. Speculative decoding and prefix caching, both of which change the picture at serving scale. |
Gated repositories — Llama and Gemma among them — answer 401 to an anonymous request for their configuration, so their architecture cannot be read live. 45 current models therefore ship with the page, read from their configurations while they were public, and a gated model falls back to that table or to a community mirror that republishes the same file. There is no token field and there never will be: a page that asks strangers to paste a credential has taught them the wrong habit, whatever it does with it.
→ How fast that feels → What it costs to run → Have it sized for your workload
The AI news that matters — in your inbox by 07:30 CET. Free, no spam.