Llama · 405.9B parameters
Llama 3.1 405B: GPU memory requirements and which GPU to rent
The largest dense Llama: 405 billion parameters across 126 layers. Even at FP8 it needs about 406 GB for its weights — an 8-GPU node, or 4-bit quantisation on fewer cards.
- Weights at FP8406 GB812 GB at 16-bit · 223 GB at 4-bit
- FP8, 8k context, 1 sequence428 GBweights + KV cache + runtime
- Suggested here2× B300$7,580 a month · dedicated
Inference
How much GPU memory Llama 3.1 405B needs to serve
Total memory for one sequence at each context length, and for 16 concurrent sequences at 8k — weights, KV cache at 16-bit and runtime overhead included.
| Weights precision | Weights | 4k context | 32k context | 128k context | 8k × 16 sequences | Suggested here, 8k |
|---|---|---|---|---|---|---|
| 16-bit (BF16 / FP16) | 812 GB | 848 GB | 863 GB | 913 GB | 913 GB | 8× H200 · $10,990/mo |
| 8-bit (FP8 / INT8) | 406 GB | 426 GB | 441 GB | 491 GB | 491 GB | 2× B300 · $7,580/mo |
| 4-bit (GPTQ, AWQ, Q4) | 223 GB | 236 GB | 251 GB | 301 GB | 301 GB | 4× A100 · $2,596/mo |
GB are 109 bytes. Context lengths are shown for scale where the model supports them; an FP8 KV cache halves the cache part of each figure.
Hardware
GPU servers that run Llama 3.1 405B
For FP8 inference with an 8k context and one sequence: the configurations we would suggest, in order — one large card ahead of several small ones.
Fine-tuning Llama 3.1 405B
Memory for a 2k-token sequence and a micro-batch of 4, with gradient checkpointing. Full fine-tuning keeps gradients and Adam states for every parameter; LoRA and QLoRA train small adapters on a frozen base.
| Method | Memory | Suggested here |
|---|---|---|
| QLoRA, 4-bit base | 322 GB | 4× RTX PRO 6000 · $2,996/mo |
| LoRA, 16-bit base | 934 GB | 8× H200 · $10,990/mo |
| Full fine-tune, mixed precision | 6,596 GB | Multi-node |
Architecture at a glance
Grouped-query attention: every layer keeps keys and values for every token of the context. Figures from the model's published configuration; method on the calculator page.
Llama 3.1 405B hardware: questions answered
How much VRAM does Llama 3.1 405B need?
For the weights alone: about 812 GB at 16-bit, 406 GB at FP8 and 223 GB at 4-bit. Serving it at FP8 with an 8k-token context and one sequence takes about 428 GB in total once the KV cache and the runtime are counted; long contexts and many concurrent users add the KV cache on top — about 0.53 GB per 1,000 tokens at 16-bit.
Can Llama 3.1 405B run on a single GPU?
Not at FP8: the weights need more memory than any single GPU in our catalogue holds. otherwise the suggested setup is 2× B300 · $7,580/mo.
What is the cheapest GPU setup to run Llama 3.1 405B?
For FP8 inference with an 8k context and one sequence, the configuration we would suggest is 2× B300 · $7,580/mo; at 4-bit, 4× A100 · $2,596/mo. Suggestions favour one large card over several small ones: splitting a model across PCIe cards costs speed.
How much GPU memory do I need to fine-tune Llama 3.1 405B?
With a 2k-token sequence and a micro-batch of 4: about 322 GB for QLoRA on a 4-bit base, 934 GB for LoRA on a 16-bit base, and 6,596 GB for a full fine-tune with Adam in mixed precision. Gradient checkpointing is assumed; sharding the optimizer across GPUs spreads the full fine-tune over several cards.
Run Llama 3.1 405B on 2× B300 for $7,580 a month
Dedicated, single-tenant and live in under 10 minutes — with vLLM, the Hugging Face stack or Ollama preinstalled if you want. Paid in BTC, ETH or USDT, with no KYC.