LLM VRAM calculator
Pick a model, a precision and how much context you need. See the GPU memory it takes, which GPU fits and what that costs per hour. Free, and no account needed.
GPU memory needed
7.7 GB
- Weights
- 5.0 GB
- Cache
- 1.2 GB
- Runtime
- 1.5 GB
Cheapest BitsRun GPU that fits
NVIDIA L4, 24 GB
$0.95 per hour, billed per second
Longest context there: 40,960 tokens per request. Speed: about 36 tokens a second for one request (estimate).
- NVIDIA L4Fits
- NVIDIA L40SFits
- 4x NVIDIA L4Fits
How the memory adds up
A model needs GPU memory for three things:
- Weights: the model itself. Parameters times bits per weight, divided by 8. An 8B model at Q4_K_M (about 4.9 bits) is about 5 GB, and at 16-bit it is about 16 GB.
- KV cache: the working memory for the text the model is reading. Per token it is 2 x layers x KV heads x head size x 2 bytes. Qwen3 8B uses 147,456 bytes a token, so 32,768 tokens take about 4.8 GB.
- Runtime: about 1.2 GB for llama.cpp, or 2 GB plus a safety margin for vLLM.
The calculator uses the same rules as the BitsRun model sizer. For a full walk-through, read How much VRAM do you need to run an LLM.
Common models at a glance
| Model (Ollama, Q4) | Memory needed | GPU and price |
|---|---|---|
| Qwen3 8B | 7.9 GB | NVIDIA L4, $0.95/h |
| Qwen3 14B | 13 GB | NVIDIA L4, $0.95/h |
| Qwen3 32B | 26 GB | NVIDIA L40S, $3.20/h |
| Qwen3 30B A3B | 24 GB | NVIDIA L4, $0.95/h |
| Qwen2.5 Coder 7B Instruct | 7.2 GB | NVIDIA L4, $0.95/h |
| Qwen2.5 Coder 32B Instruct | 25 GB | NVIDIA L40S, $3.20/h |
| Llama 3.1 8B Instruct | 7.5 GB | NVIDIA L4, $0.95/h |
| Llama 3.3 70B Instruct | 53 GB | 4x NVIDIA L4, $8.52/h |
More in the model list.
Frequently asked questions
- How do I calculate the VRAM an LLM needs?
- Add the weights (parameters times bits per weight, divided by 8), the KV cache (2 x layers x KV heads x head size x 2 bytes, for every token of context and every request at once) and about 1 to 2 GB for the runtime.
- How much VRAM does an 8B model need?
- About 5 GB of weights at Q4_K_M, so roughly 7 to 8 GB in total with a normal context. At full 16-bit precision the weights alone are about 16 GB.
- Why does context length change the memory needed?
- The model keeps a cache of every token it has read. The cache grows in step with the context and with the number of requests served at once, and at long contexts it can be larger than the weights.
- Is this the exact number BitsRun uses?
- It uses the same rules as the model sizer, which reads the real file sizes. Run Check model in the dashboard or bitsrun size <model> for the exact answer before you deploy.
Try it on your own model
Sign up with your email, add $10 of credit and deploy from an Ollama name or a Hugging Face repo. An L4 costs $0.95 an hour, billed per second only while your model is awake. Waking up is never billed, and credit you buy does not expire.