How much VRAM do you need to run a large language model?
A practical rule of thumb for the VRAM needed to run LLMs, by parameter count and precision, and which GPU fits.
Short answer: multiply the number of parameters by the bytes per weight, then add 10 to 30 percent for the context cache and overhead. These are estimates; real use varies with the software and context length.
The rule of thumb
Bytes per parameter by precision:
- 16-bit (FP16/BF16): 2 bytes
- 8-bit: 1 byte
- 4-bit: about 0.5 byte
So a 7-billion-parameter model needs about 14 GB at 16-bit, 7 GB at 8-bit and 4 to 5 GB at 4-bit, plus overhead.
Common sizes
- 7B to 8B: about 14 to 16 GB at 16-bit, 5 to 6 GB at 4-bit.
- 13B: about 26 GB at 16-bit, 8 to 9 GB at 4-bit.
- 30B to 34B: about 17 to 20 GB at 4-bit.
- 70B: about 140 GB at 16-bit, 35 to 42 GB at 4-bit.
The context cache grows with length
A long context uses extra VRAM for the key-value cache. A model that fits at a short context can run out of memory at a long one.
Which card fits
- 24 GB (RTX 4090): models up to roughly 30B at 4-bit.
- 32 GB (RTX 5090): more headroom for 30B-class models and longer contexts.
- 80 GB (A100 or H100): 70B models at 8-bit or 4-bit, or large batch sizes.
- Multiple GPUs: split a larger model across cards.
See GPU servers, the RTX 4090, RTX 5090, A100 and H100 pages.
Private inference
Running a model on your own server keeps prompts and data out of third-party APIs. Pair it with an offshore GPU server paid in crypto if privacy matters.