How Many GPUs Do You Need for LLM Training? Complete Calculator (2026)
How to Calculate GPU Requirements for LLM Training
Training an LLM is expensive, and the biggest question is always how many GPUs you'll actually need. The answer depends on model size, precision, optimizer choice, batch size, and whether you're training from scratch or fine-tuning.
This guide breaks down the exact math behind LLM GPU requirements, provides a working interactive calculator you can use right now, and walks through real-world examples so you can size your setup with confidence. Whether you are trying to figure out how to train a 70B model or simply need an LLM VRAM calculator for a small fine-tuning project, the same formulas apply.
Jump straight to the interactive calculator below, or read through the methodology first. Every estimate follows the same formula used by NVIDIA, Hugging Face, and major AI research labs.
If you're planning a deployment, start by estimating total VRAM instead of GPU count. Memory is the real constraint. Once you know your memory requirement, choosing the right number of GPUs becomes straightforward. Whether you're sizing AI server platforms or a cluster built around networking & interconnects, the same math applies.
The Core Formula: What Actually Eats VRAM
Training memory has four main components. Almost every miscalculation comes from forgetting one of them:
- Model weights — the parameters themselves (2 bytes per param in fp16)
- Gradients — one value per parameter, computed during backpropagation (2 bytes per param in fp16)
- Optimizer states — Adam stores two extra values per parameter (momentum and variance), adding 8 bytes per parameter in fp32
- Activations — intermediate outputs stored for the backward pass, scaling with batch size and sequence length
For mixed-precision training with the Adam optimizer, the standard rule of thumb is ~16-20 bytes of VRAM per parameter: 2 bytes (fp16 weights) + 2 bytes (fp16 gradients) + 4 bytes (fp32 master weights) + 4 bytes (fp32 momentum) + 4 bytes (fp32 variance) = 16 bytes minimum. Add activation memory, and real-world figures land closer to 18-20 bytes per parameter for typical batch sizes.
Training VRAM = (Model Parameters x Bytes per Parameter) + Activation Memory
Where:
Bytes per Parameter = 16-20 (mixed precision + Adam)
Activation Memory = Parameters x 0.1 x Batch Size x (Seq Len / 1024)How We Estimated These Numbers
Our estimates assume FP16 mixed precision training with the Adam optimizer and a standard transformer architecture. We do not assume optimizer sharding, and activation checkpointing is disabled by default. The calculator below lets you toggle each variable independently.
- FP16 mixed precision (weights and gradients in half precision, optimizer states in full precision)
- Adam optimizer (stores momentum and variance in fp32)
- Typical transformer decoder-only architecture
- No optimizer sharding enabled (ZeRO stage 1 disabled by default)
- Standard activation checkpointing disabled (toggle available in calculator)
Your actual requirements will vary depending on DeepSpeed ZeRO stages, FSDP sharding, LoRA adapters, QLoRA quantization, sequence length, batch size, and framework overhead. Always benchmark with your specific setup before committing to hardware.
Interactive GPU Calculator for LLM Training
Use the calculator below to estimate total VRAM, GPU count, and training cost for any model size. Adjust the sliders and dropdowns to match your specific setup:
The LLM GPU calculator above gives you a baseline. In practice, teams often add extra GPUs for parallelism efficiency, checkpointing, or larger batch sizes. Use the result as your minimum starting point.
LLM GPU Requirements Reference Table
Here is a quick-reference table for common model sizes. These figures assume FP16 mixed precision, Adam optimizer, and a batch size of 1 with 2048-token sequences:
| Model Size | Training VRAM | Inference VRAM | 80 GB GPUs (Training) | 24 GB GPUs (Training) |
|---|---|---|---|---|
| 7B | 112-140 GB | 14-16 GB | 2 | 5-6 |
| 13B | 208-260 GB | 26-30 GB | 4 | 11-13 |
| 30B | 480-600 GB | 60-70 GB | 8 | 25-30 |
| 70B | 1.1-1.4 TB | 140-160 GB | 16-20 | 55-70 |
| 175B | 2.8-3.5 TB | 350-400 GB | 40-50 | 140-175 |
Notice the 8-10x gap between training and inference. This is the single biggest source of confusion for anyone searching for an LLM inference VRAM size calculator versus a training calculator. Inference only needs to hold the weights (roughly 2 bytes per parameter in fp16, or even less with quantization), while training needs gradients and optimizer states on top.
How to Calculate Total VRAM Needed
Take your model’s parameter count and multiply by the bytes-per-parameter figure for your training setup. Here is the formula broken down step by step:
Parameter Memory (GB) = (Params x Bytes per Param) / 1,000,000,000
Example (13B model, mixed precision + Adam):
Weights: 13B x 2 bytes = 26 GB
Gradients: 13B x 2 bytes = 26 GB
Optimizer: 13B x 12 bytes = 156 GB (master weights + momentum + variance)
Total: 13B x 16 bytes = 208 GBNow add activation memory, which depends on your batch size and sequence length:
Activation Memory (GB) = (Params x Bytes x 0.1 x Batch Size x SeqLen/1024) / 1,000,000,000
Example (13B, batch 4, seq 2048):
= (13B x 2 x 0.1 x 4 x 2) / 1B
= 20.8 GB
With gradient checkpointing (~85% savings):
= 20.8 x 0.15 = 3.1 GBA 13-billion-parameter model needs roughly 234 GB of VRAM for full fine-tuning with Adam at batch size 4, well beyond what a single consumer or even most single enterprise GPUs can hold.
How to Estimate GPU Count
Once you know total VRAM required, divide by the usable VRAM per GPU. Always leave 10-15% headroom for framework overhead:
GPUs Needed = Total VRAM / (GPU VRAM x 0.85)
Example (13B, 80 GB GPUs):
= 234 GB / (80 x 0.85)
= 234 / 68
= 3.4 -{'>'} round up to 4 GPUsThis gives you the minimum number of GPUs. For production training, most teams add 1-2 additional GPUs for tensor parallelism, pipeline parallelism, or larger batch sizes.
Real-World GPU Requirements by Use Case
Here is how the math translates to actual hardware recommendations for common scenarios:
| Use Case | Model | Min VRAM | Recommended GPUs | Approx. Cost |
|---|---|---|---|---|
| LoRA Fine-tuning | 7B | 24 GB | 1x RTX 4090 | ~$2K |
| Full Fine-tuning | 7B | 120 GB | 2x A100 80GB | ~$30K |
| Full Fine-tuning | 13B | 234 GB | 4x A100 80GB | ~$60K |
| Full Fine-tuning | 30B | 540 GB | 8x A100 80GB | ~$120K |
| Training from Scratch | 70B | 1.3 TB | 16-20x H100 80GB | ~$500K+ |
| Training from Scratch | 175B | 3.2 TB | 40-50x H100 80GB | ~$1.5M+ |
For training large models from scratch, cloud GPU instances almost always make more financial sense than purchasing hardware outright. A single H100 can cost $30,000+, while cloud rental is $1.50-3.00/hour.
Memory Optimization Techniques That Reduce GPU Requirements
Before you buy hardware based on the raw formula, know that several techniques can shrink your actual GPU requirement significantly. These are the most effective methods for reducing both peak VRAM and total GPU count:
- LoRA / QLoRA: Freezes most of the model and trains small adapter layers, cutting VRAM needs by 70-90% for fine-tuning tasks. A 7B model can be fine-tuned on a single 24 GB GPU.
- Gradient checkpointing: Trades compute time for memory by recomputing activations instead of storing them, saving 30-40% of activation memory with minimal speed impact.
- ZeRO optimizer sharding (DeepSpeed / FSDP): Splits optimizer states, gradients, and even weights across multiple GPUs. ZeRO-3 can train a 70B model on 8x A100 80GB instead of 16+.
- Quantization (8-bit, 4-bit): Reduces weight precision for inference and increasingly for training, cutting memory needs by 50-75% at a small accuracy cost.
Consumer vs Enterprise GPUs for LLM Training
Not all GPUs are equal for LLM training. Here is how consumer and enterprise cards compare for AI workloads:
| Category | GPU | VRAM | Memory BW | NVLink | Best For |
|---|---|---|---|---|---|
| Consumer | RTX 4090 | 24 GB | 1 TB/s | No | LoRA, 7B inference |
| Consumer | RTX 5090 | 32 GB | 1.8 TB/s | No | LoRA, small fine-tuning |
| Enterprise | L40S | 48 GB | 864 GB/s | No | Inference, mid training |
| Enterprise | A100 80GB | 80 GB | 2 TB/s | Yes | Full fine-tuning, 13B-30B |
| Enterprise | H100 SXM | 80 GB | 3.35 TB/s | Yes | Training large models |
| Enterprise | H200 SXM | 141 GB | 4.8 TB/s | Yes | 70B training, large batches |
| Enterprise | B200 SXM | 192 GB | 8 TB/s | Yes | Frontier-scale training |
Consumer GPUs like the RTX 4090 are excellent for experimentation, fine-tuning with LoRA, and running inference on mid-sized models. Enterprise GPUs like the NVIDIA H100 Tensor Core GPU, the NVIDIA H200 Tensor Core GPU, and the NVIDIA GB200 Grace Blackwell Superchip offer higher memory bandwidth, NVLink for fast inter-GPU communication, and much larger VRAM pools, making them essential for full training runs and large-scale deployments. For turnkey systems, Supermicro GPU servers are a popular choice.
Training vs Inference Memory Comparison
Understanding the difference between training and inference memory requirements is critical for proper GPU cluster planning. Training typically requires 8-10x more memory than inference for the same model:
| Component | Training (per param) | Inference (per param) |
|---|---|---|
| Weights (fp16) | 2 bytes | 2 bytes |
| Gradients (fp16) | 2 bytes | 0 bytes |
| Master weights (fp32) | 4 bytes | 0 bytes |
| Momentum (fp32) | 4 bytes | 0 bytes |
| Variance (fp32) | 4 bytes | 0 bytes |
| Activations | ~2-4 bytes | ~0 bytes |
| Total | ~16-20 bytes | ~2 bytes |
If you are building an LLM inference server rather than a training cluster, your GPU memory requirements drop by roughly an order of magnitude. An LLM inference VRAM calculator will use a much simpler formula: parameters multiplied by precision bytes only.
Which GPU Should You Actually Buy?
Based on the GPU requirements for LLM training scenarios above, here is our practical buying guidance:
- Fine-tuning small-to-mid models (7B-13B) with LoRA: A single 24 GB consumer GPU is often enough, and with QLoRA even a 7B model fits comfortably.
- Full fine-tuning mid-sized models: Look at multi-GPU setups with 48 GB+ per card, or enterprise-class 80 GB cards like the A100 or H100.
- Training large models from scratch (30B+): This is cloud or cluster territory. Enterprise GPUs rented by the hour almost always make more financial sense than purchasing hardware outright.
- For inference-only workloads: A single A100 80GB or H100 80GB can serve most models up to 70B with quantization. Consider the L40S (48 GB) for cost-effective inference.
If your workload changes frequently, cloud GPU instances provide a more cost-effective option than buying dedicated hardware. Many teams start with cloud rentals and move to dedicated hardware only when their usage patterns stabilize.
Frequently Asked Questions
How to calculate GPU requirements for LLM?
Multiply your model’s parameter count by the bytes-per-parameter figure for your training setup (roughly 16-20 bytes for full fine-tuning with Adam, or as little as 2 bytes for inference-only). Add activation memory based on your batch size and sequence length, then divide the total by your GPU’s usable VRAM to get the number of GPUs needed. Use our interactive GPU calculator above for an instant estimate.
How much VRAM for LLM training?
Full fine-tuning with mixed precision and Adam needs 16-20 bytes of VRAM per parameter. A 7B model needs roughly 112-140 GB, a 13B model needs 208-260 GB, and a 70B model needs over 1 TB of total VRAM. Techniques like LoRA, gradient checkpointing, and ZeRO sharding can reduce these figures dramatically.
How many GPUs for a 7B model?
For LoRA fine-tuning, a single 24 GB consumer GPU like the RTX 4090 works for a 7B model. For full fine-tuning, you need 2-3 enterprise GPUs with 80 GB VRAM each, or 5-6 consumer 24 GB GPUs with ZeRO sharding enabled.
How many GPUs for a 13B model?
Full fine-tuning a 13B model requires approximately 234 GB of VRAM. On 80 GB enterprise GPUs, you need 4 GPUs. On 24 GB consumer GPUs, you need 11-13 cards with ZeRO-3 sharding. With LoRA, a single 24 GB GPU can handle 13B fine-tuning.
How many GPUs to train a 70B model?
Training a 70B model from scratch typically requires 16-32 high-memory GPUs (80 GB+ each), depending on desired throughput. With ZeRO-3 sharding and pipeline parallelism, 16 H100 80GB GPUs can train a 70B model, but 32 is more common for reasonable training times.
Which GPU for LLM training?
For small-scale fine-tuning with LoRA, a single 24 GB consumer GPU is often sufficient. For full fine-tuning of mid-sized models, look for GPUs with 48 GB or more. For large-scale training from scratch, enterprise-grade GPUs with 80 GB+ VRAM and high memory bandwidth, typically accessed through cloud providers, are the standard choice.
Final Takeaway: Start with VRAM, Not GPU Count
There is no single number for how many GPUs you need. It is a function of parameter count, precision, optimizer choice, and which memory-saving techniques you apply. The most common mistake is starting with GPU count rather than total VRAM.
Run the calculation with your specific model size before committing to hardware, and always check whether LoRA, quantization, or sharding could shrink your real-world requirement before buying more GPUs than you actually need.
If you are planning an LLM deployment, start by estimating total VRAM instead of GPU count. Memory is the real constraint. Once you know your memory requirement, choosing the right number of GPUs becomes straightforward. If your workload changes frequently, cloud GPU instances often provide a more cost-effective option than buying dedicated hardware. For a broader walkthrough of specs and pricing, follow our GPU buying guide.
Need help selecting the right GPUs for your specific workload? Servchip provides expert guidance on GPU procurement, from single-card setups to large-scale cluster deployments.
Servchip global availability
Enterprise NVIDIA, AMD and Intel hardware is available through Servchip across these regions. Browse local availability, delivery details and region-specific sourcing:
Related Articles
Continue exploring our technical library
AI Chip Market Trends 2026: NVIDIA, AMD, Intel, and Beyond
AI chip market trends 2026: NVIDIA, AMD, and Intel stock moves, semiconductor market forecasts, and what's next for the industry through 2030.
GPU Buying Guide 2026: How to Choose the Right AI Accelerator
Buying a GPU for AI in 2026 isn't as simple as picking the card with the biggest number on the box. This guide breaks down exactly how to think about the decision so you don't overspend or under-buy.
GPU Total Cost of Ownership: Cloud vs On-Premise Cost Analysis 2026
A full GPU Total Cost of Ownership analysis comparing cloud vs on-premise infrastructure. CAPEX, OPEX, performance, security, and real-world cost examples for AI teams in 2026.