Llama 3.1 70B VRAM requirements

Llama 3.1 70B has 70.6B parameters. With an 8K-token context and one request it needs about 47.0 GB of GPU memory at Q4_K_M, 75.5 GB at FP8 and 148 GB at FP16/BF16. The published weights take 131 GB (BF16). It does not fit on a 24 GB card at Q4_K_M; the smallest single GPU that holds it with an 8K context is the 48 GB L40S / RTX 6000 Ada.

Open Llama 3.1 70B in the calculator

VRAM by quantization

Weights plus the KV cache for 8,192 tokens in FP16 and the runtime overhead (0.5 GB plus 10%). Each row opens the calculator with that setting. What the GGUF names mean.

PrecisionWeightsTotalSmallest setup
As published (BF16) 131 GB 148 GB B200
FP16 / BF16 131 GB 148 GB B200
FP8 / INT8 65.7 GB 75.5 GB A100 / H100 80GB
INT4 (AWQ / GPTQ) 34.9 GB 41.6 GB L40S / RTX 6000 Ada
GGUF Q8_0 69.8 GB 80.0 GB H200
GGUF Q6_K 53.9 GB 62.5 GB A100 / H100 80GB
GGUF Q5_K_M 46.6 GB 54.5 GB A100 / H100 80GB
GGUF Q4_K_M 39.8 GB 47.0 GB L40S / RTX 6000 Ada
GGUF Q3_K_M 32.1 GB 38.6 GB A100 40GB
GGUF Q2_K 27.5 GB 33.5 GB A100 40GB

KV cache at long context

All 80 layers use full attention. Each extra token of context adds 320 KB of FP16 cache per request. How the KV cache works.

ContextKV cache, FP16KV cache, FP8Total at Q4_K_M
4K tokens 1.25 GB 640 MB 45.6 GB
32K tokens 10.0 GB 5.00 GB 55.2 GB
128K tokens 40.0 GB 20.0 GB 88.2 GB

Which GPUs can run Llama 3.1 70B

With 8,192 tokens of context. Several GPUs means one tensor-parallel group of 2, 4 or 8 cards.

GPUMemoryQ4_K_MFP8
RTX 3060 12 GB Needs 8 Needs 8
RTX 4060 Ti 16GB 16 GB Needs 4 Needs 8
RTX 3090 / 4090 24 GB Needs 2 Needs 4
RTX 5090 32 GB Needs 2 Needs 4
A100 40GB 40 GB Needs 2 Needs 2
Mac, 64 GB unified memory about 75% of it is usable by the GPU by default 48 GB Fits on one Needs 2
L40S / RTX 6000 Ada 48 GB Fits on one Needs 2
A100 / H100 80GB 80 GB Fits on one Fits on one
Mac, 128 GB unified memory about 75% of it is usable by the GPU by default 96 GB Fits on one Fits on one
H200 141 GB Fits on one Fits on one
B200 180 GB Fits on one Fits on one

How fast Llama 3.1 70B writes

Tokens per second for one request with 8,192 tokens of context, estimated from memory bandwidth. A dash means it does not fit on one card. Try other settings in the speed calculator.

HardwareBandwidthQ4_K_MFP8
RTX 3060 12GB 360 GB/s — —
RTX 4090 1,008 GB/s — —
RTX 5090 1,792 GB/s — —
M4 Max Mac (128 GB) 546 GB/s 6.6–9.0 4.1–5.6
M3 Ultra Mac Studio (512 GB) 819 GB/s 9.8–13 6.1–8.4
H100 SXM 3,350 GB/s 38–54 24–34
H200 4,800 GB/s 54–76 34–48

Longest context on one GPU

How many tokens of context fit on a single card with one request and an FP16 KV cache. "Full" means the model's whole context window fits.

GPUMemoryQ4_K_MQ8_0FP8
RTX 3060 12 GB No No No
RTX 4060 Ti 16GB 16 GB No No No
RTX 3090 / 4090 24 GB No No No
RTX 5090 32 GB No No No
A100 40GB 40 GB No No No
Mac, 64 GB unified memory 48 GB 10K No No
L40S / RTX 6000 Ada 48 GB 10K No No
A100 / H100 80GB 80 GB 103K 7K 20K
Mac, 128 GB unified memory 96 GB 128K (full) 54K 67K
H200 141 GB 128K (full) 128K (full) 128K (full)
B200 180 GB 128K (full) 128K (full) 128K (full)

Model details

Parameters
70.6B (70,553,706,496)
Layers
All 80 layers use full attention
Attention cache
8 KV heads × 128
Context length
131,072 tokens
Published weights
131 GB (BF16)
On Hugging Face
meta-llama/Llama-3.1-70B-Instruct

Other models

Numbers read from the model files on Hugging Face on .