Model sizing
Estimate the GPU memory (VRAM) a language model needs and choose a suitable quantisation.
1. Model
An MoE loads all its experts into memory.
Check these values in the model’s config.json file before any purchase.
2. Usage
Reduces context memory, with a possible slight loss.
3. Hardware and priority
Share of VRAM left free. We keep 30 to 40%: a spike in context or requests must not bring the service down.
Order of magnitude, to be confirmed by a test on your hardware.
The calculations run in your browser. Nothing is sent to our servers.
Breakdown
Model weights…
KV cache (context)…
Runtime overhead…
Estimated total…
VRAM with margin…
Minimum GPU…
All formats
| Format | Verdict | Bits / weight | Weights (GB) | Total (GB) | With margin (GB) | Minimum GPU |
|---|
Formulas
Where the figures come from.
Weights = parameters × bytes per parameter
KV cache = 2 × layers × KV heads × head dimension × bytes × context × concurrent requests
Overhead = 3 GB + 10% of the weights (18% for an MoE)
VRAM with margin = total ÷ (1 - margin)
“Balance” priority: in production FP8/INT8 then 4 bits, locally Q6_K, Q5_K_M then Q4_K_M. “Maximum quality”: the least compressed format that fits. “Minimum memory”: the most compact, excluding formats below 4 bits.
KV cache = 2 × layers × KV heads × head dimension × bytes × context × concurrent requests
Overhead = 3 GB + 10% of the weights (18% for an MoE)
VRAM with margin = total ÷ (1 - margin)
“Balance” priority: in production FP8/INT8 then 4 bits, locally Q6_K, Q5_K_M then Q4_K_M. “Maximum quality”: the least compressed format that fits. “Minimum memory”: the most compact, excluding formats below 4 bits.
Limitations
- Orders of magnitude: actual consumption depends on the inference engine, its version and optimisations.
- The architectures offered should be checked in the config.json file of the exact model you will use.
- The bits per weight of quantised formats are approximate averages.
- The quality loss of a quantisation is measured on your tasks, not in a table.
- The calculation says nothing about throughput or latency: only a test reveals them.
- The 2 × 80 GB option is treated as a single 160 GB memory. In reality the model is split across two GPUs, with an overhead per GPU.
Frequently asked questions
What is quantisation?
It stores the model’s weights with fewer bits to reduce memory. The more you compress, the higher the risk of quality loss.
Why a 30 to 40% margin?
The actual context and number of requests vary. Without a margin, a spike causes memory saturation and a service interruption.
Why does an MoE use as much memory as a large model?
Only some of the experts work on each token, which speeds up computation. But all the experts must stay loaded in memory.
Choose and install the right hardware.
We size, test and operate the AI infrastructure with you.