VRAM CALCULATOR
GPU VRAM calculator for LLMs
Enter a model size to see how much GPU memory it needs for inference or fine-tuning, which GPUs fit it today and what they cost per hour.
Popular models
Job
Weights
Context length
A 8B model needs about 21 GB of GPU memory (Inference). The cheapest GPU that fits today is 2× RTX 2060 at $0.26 per hour.
Memory needed
≈ 21 GB
Model weights
16 GB
Working memory
5 GB
Price per hour
$0.26
Memory figures are our estimates for inference; real use depends on resolution, batch size and context length. Speed is an estimate for one request at a time from the GPU's memory bandwidth; serving many requests at once raises total throughput and lowers the cost per token.
GPUs that fit today
| GPU | Memory | Per hour | 10 hours | Speed (est.) |
|---|---|---|---|---|
| 2× RTX 2060 | 24 GB | $0.26 | $2.60 | ≈ 23 tok/s · $3.09/1M |
| Tesla P40 | 24 GB | $0.27 | $2.70 | ≈ 12 tok/s · $6.19/1M |
| Tesla V100 | 32 GB | $0.31 | $3.10 | ≈ 34 tok/s · $2.53/1M |
| Q RTX 6000 | 24 GB | $0.32 | $3.20 | ≈ 23 tok/s · $3.88/1M |
| 2× GTX 1080 Ti | 22 GB | $0.34 | $3.40 | ≈ 30 tok/s · $3.17/1M |
| 2× RTX 3060 | 24 GB | $0.36 | $3.60 | ≈ 28 tok/s · $3.59/1M |
| Titan RTX | 24 GB | $0.37 | $3.70 | ≈ 23 tok/s · $4.48/1M |
| RTX 3090 | 24 GB | $0.38 | $3.80 | ≈ 35 tok/s · $3.00/1M |
How we calculate
- Inference: parameters × bytes per parameter (2 for FP16, 1 for FP8, about 0.6 for 4-bit), plus 20% working memory and 1 GB. Contexts longer than 8K tokens add KV cache memory.
- LoRA: 16-bit weights plus 20% and about 6 GB for adapters, gradients and activations. QLoRA does the same with 4-bit weights.
- Full fine-tuning with AdamW in mixed precision takes about 16 bytes per parameter for weights, gradients and optimizer state.
Questions
- How much VRAM do I need to run a 70B model?
- About 169 GB at FP16, so it needs several GPUs. With 4-bit quantization it needs about 52 GB.
- How much VRAM does an 8B model need?
- About 21 GB at FP16, 11 GB at FP8 and 7 GB with 4-bit quantization.
- How much VRAM do I need to fine-tune an 8B model?
- About 12 GB with QLoRA, 26 GB with LoRA and 128 GB for full fine-tuning.
- Does context length change the memory I need?
- Yes. The KV cache grows with every token in the context. For a 70B model, going from 8K to 128K tokens adds about 40 GB.