New B200 spot capacity is live in US East from $1.69 per GPU-hour. See availability →
Meta · Dense model · released July 2024

Llama 3.1 405B GPU requirements: 203 GB at 4-bit, 812 GB at BF16

Llama 3.1 405B needs 812 GB of GPU memory for its weights at BF16, 406 GB at FP8 and 203 GB at 4-bit, plus 16.9 GB of KV cache for a 32K context. The cheapest node that runs it here is 4× A100 PCIe 80GB at 4-bit, for $0.36 an hour on spot.

Architecture read from the model's config.json on Hugging Face, 26 October 2026 · prices from the live catalogue · all 47 GPUs

Cheapest node · 32K context per node-hour, spot
4-bit4× A100 PCIe 80GB · 220 GB needed $0.36$0.76 on-demand
FP88× RTX PRO 6000 Blackwell · 423 GB needed $1.52$3.12 on-demand
BF164× MI325X · 829 GB needed $4.36$6.36 on-demand

Weights plus a 32K 16-bit KV cache, with 10% of the node's memory kept free. Billed per minute.

Parameters
405BDense
Weights, 4-bit
203 GBBF16: 812 GB
KV cache, 32K
16.9 GBOne sequence, 16-bit cache
Context window
128KNative
Memory by format

How much VRAM Llama 3.1 405B needs, format by format.

Weights are parameters × bytes per parameter. Each context column adds the KV cache of one sequence of that length.

GPUs by memory
Format Weights + 8Kcontext+ 32Kcontext+ 128Kcontext Cheapest node, 32K
BF16Published weights, fine-tuning 812 GB 816 GB829 GB879 GB 4× MI325X · $4.36/h
FP8Hopper, Ada, Blackwell, MI300 406 GB 410 GB423 GB473 GB 8× RTX PRO 6000 Blackwell · $1.52/h
4-bitAWQ, GPTQ, GGUF Q4 203 GB 207 GB220 GB271 GB 4× A100 PCIe 80GB · $0.36/h
Arithmetic on published facts, not a benchmark.

The serving engine adds its own buffers, and an 8-bit KV cache halves the context columns. We keep 10% of a node's memory free when we say a model fits. Speed is a separate question: it follows memory bandwidth and, for a mixture of experts, the active parameters.

Where it runs

GPUs that run Llama 3.1 405B, cheapest first.

For each format, the smallest node of each GPU model that holds the weights and a 32K context, sorted by spot price. One row per GPU model; larger nodes of the same GPU work too.

All prices
Format GPU GPU memory Spot On-demand 730 h spot Action
4-bit 4× A100 PCIe 80GBAmpere · 220 GB needed 320 GB $0.36 $0.76 $262.80 Deploy
4-bit 8× A40Ampere · 220 GB needed 384 GB $0.48 $0.72 $350.40 Deploy
4-bit 8× A100 40GBAmpere · 220 GB needed 320 GB $0.72 $1.36 $525.60 Deploy
4-bit 8× L40Ada Lovelace · 220 GB needed 384 GB $0.72 $1.52 $525.60 Deploy
FP8 8× RTX PRO 6000 BlackwellBlackwell · 423 GB needed 768 GB $1.52 $3.12 $1,109.60 Deploy
FP8 2× MI325XCDNA 3 · 423 GB needed 512 GB $2.18 $3.18 $1,591.40 Deploy
FP8 4× H200 NVLHopper · 423 GB needed 564 GB $2.76 $3.96 $2,014.80 Deploy
FP8 4× H200 SXMHopper · 423 GB needed 564 GB $3.00 $4.36 $2,190.00 Deploy
BF16 4× MI325XCDNA 3 · 829 GB needed 1024 GB $4.36 $6.36 $3,182.80 Deploy
BF16 8× H200 NVLHopper · 829 GB needed 1128 GB $5.52 $7.92 $4,029.60 Deploy
BF16 8× H200 SXMHopper · 829 GB needed 1128 GB $6.00 $8.72 $4,380.00 Deploy
BF16 8× MI300XCDNA 3 · 829 GB needed 1536 GB $7.92 $11.60 $5,781.60 Deploy

Spot capacity can be reclaimed with a 2-minute notice; for a live endpoint, use on-demand. How spot works · serving a language model.

Context and the KV cache

What a long context costs in memory.

Grouped-query attention, 8 KV heads of 128 across 126 layers.

Context KV cache, 1 sequence 8 sequences
8K tokens 4.23 GB 33.8 GB
32K tokens 16.9 GB 135 GB
128K tokens 67.6 GB 541 GB

Serving several users

KV cache

Every concurrent request keeps its own cache, so memory for context grows with users × context length. A server batching 8 requests of 32K needs eight times the single-sequence figure — 135 GB here.

  • Recommended node4× A100 PCIe 80GB
  • Weights at 4-bit203 GB
  • Context that fits, 1 sequence128K

Paged attention (vLLM, SGLang) allocates the cache in blocks as requests grow, so a node holds more short requests than the worst case suggests.

Model facts

Llama 3.1 405B, as published.

Developer
MetaThe largest dense open model
Parameters
405B
Architecture
Dense model, 126 layersGrouped-query attention, 8 KV heads of 128 across 126 layers
Context window
131,072 tokensAs set in the published configuration
Published format
BF16, 812 GB
Licence
Llama 3.1 Community License
Released
23 July 2024
Source
meta-llama/Llama-3.1-405B-Instructconfig.json read 26 October 2026

Serve it with vLLM

template: vLLM

On 4× A100 PCIe 80GB, from the instance terminal:

terminal
$ vllm serve meta-llama/Llama-3.1-405B-Instruct \
    --tensor-parallel-size 4 \
    --max-model-len 32768

Very recent architectures need a recent vLLM; the model card gives the minimum version and any extra flags.

FAQ

Llama 3.1 405B on a GPU — the questions that come up

How much VRAM does Llama 3.1 405B need?

For the weights alone: 812 GB at BF16, 406 GB at FP8 and 203 GB at 4-bit. Add 16.9 GB of KV cache for one 32K-token context, or 67.6 GB at the full 128K window, and keep about 10% of the memory free for activations.

Can Llama 3.1 405B run on a single GPU?

One RTX 4090 (24 GB): no. One RTX 5090 (32 GB): no. One H100 SXM (80 GB): no. One H200 SXM (141 GB): no. One B200 SXM (180 GB): no. Those answers assume a 32K context and the widest format that still fits.

What is the cheapest way to run Llama 3.1 405B?

Here, 4× A100 PCIe 80GB at 4-bit: $0.36 per hour on spot and $0.76 on-demand, billed per minute — $262.80 for a 730-hour month on spot. That node has 320 GB of GPU memory for the 220 GB this setup needs.

How long a context fits on the recommended node?

With the weights at 4-bit on 4× A100 PCIe 80GB, the remaining memory holds a 16-bit KV cache for about 131,072 tokens of context for one sequence (128K). An 8-bit KV cache doubles that; serving several users at once divides it between them.

Which format should I run it in?

BF16 keeps the published weights untouched and is the format for fine-tuning. FP8 halves the memory and runs in hardware on Hopper, Ada, Blackwell and MI300-class GPUs. 4-bit quantisation (AWQ, GPTQ, GGUF) quarters it, at a quality cost that is larger on small models than on big ones; check it against your own evaluation before relying on it.

How do I deploy it?

Pick the node in the table above and launch it with the vLLM template; the model downloads from Hugging Face (meta-llama/Llama-3.1-405B-Instruct) on first start. Spread the weights over the node with --tensor-parallel-size equal to the GPU count, and set --max-model-len to the context you need. New architectures need a recent vLLM: check the model card for the minimum version.

Sizing another model? GPU requirements for 64 open models · serving a language model · fine-tuning.

Get started

Llama 3.1 405B on 4× A100 PCIe 80GB for $0.36 an hour.

Launch the node with the vLLM template, point it at meta-llama/Llama-3.1-405B-Instruct, stop it when you are done. Prepaid, billed by the minute.

Billed per minute from the moment the instance is reachable. Minimum credit $30, no subscription.