piapia123
en

LLM VRAM Estimator

Web

Everything runs locally in your browser — nothing is uploaded

Output

The question that blocks most deployments is “will this fit on the cards I have, and how much concurrency do I get?”. This tool splits memory into three parts: Weights = parameters × bytes per parameter (FP16 = 2, INT8 = 1, INT4 = 0.5). Note that “B” means 10⁹, not 2³⁰ — 7B in FP16 is exactly 14 GB; treating B as 2³⁰ gives 15.03 GB, and that ~1 GB is precisely what decides whether it fits on an 80 GB card. KV cache = 2 × layers × KV heads × head dim × sequence length × batch × bytes per element. With GQA the KV head count drops to 1/N, and so does the KV cache — this is what decides whether long context and high concurrency can coexist. Activations and framework overhead is a rule of thumb: a 0.5 GB floor plus about 10% of weights and KV. It is an estimate; the true figure depends on kernels, parallelism and the CUDA version. GB (10⁹ bytes) and GiB (2³⁰ bytes) differ by about 7.4%, so both are shown. Everything runs in your browser, with no network access.

Features

  • Weight memory: parameters × bytes per parameter (FP32 / TF32 / BF16 / FP16 / FP8 / INT8 / INT4 / INT2)
  • KV cache: 2 × layers × KV heads × head dim × sequence × batch × bytes per element
  • GQA support: set KV heads independently, and KV cache falls by the same 1/N factor
  • Activations and framework overhead estimated from a stated rule of thumb
  • Reports both GB (10⁹) and GiB (2³⁰), never conflating the two
  • Parameters from 0.5B to 671B, or set your own
  • Per-tier card counts for 8 / 12 / 16 / 24 / 40 / 48 / 80 / 141 GB

How to use

  1. Pick the parameter count (or a custom value) and weight precision
  2. Set context length and batch size
  3. Enter the model’s layers, hidden size, attention heads and KV heads
  4. Read weights, KV, overhead and total, then check the card tiers

FAQ

Why is 7B in FP16 equal to 14 GB?
7B is 7 × 10⁹ parameters, and FP16 uses 2 bytes each, so 7 × 10⁹ × 2 = 14 × 10⁹ bytes = 14 GB. Here “B” is 10⁹, not 2³⁰ — using 2³⁰ would give 15.03 GB, about 1 GB more.
Is there a difference between GB and GiB?
Yes. GB is 10⁹ bytes; GiB is 2³⁰ (about 1.074 × 10⁹) bytes, roughly 7.4% larger. Card marketing, cloud billing and `nvidia-smi` do not all use the same unit, so both are shown — otherwise you might compute in one and compare in the other.
How much does GQA save?
A lot. The KV cache is proportional to the KV head count: 32 attention heads with 8 KV heads hold a quarter of the KV cache of full multi-head attention. That is what decides whether long context and high concurrency can coexist.
Why is the activation overhead an estimate?
It depends on the specific kernels, the parallelism strategy (tensor / pipeline), and the CUDA and framework versions — there is no universal exact formula. The tool uses a 0.5 GB floor plus about 10% of weights and KV, a common rule of thumb; measure your real deployment for a precise number.

Related tools