Llama-3.1-70B-Instruct: how much VRAM does it need?
This page was written and translated automatically by AI and checked by software against its sources, with no human editing. Specifications come from the sources listed; memory requirements and speeds are estimates calculated with published formulas. How we use AI
Llama-3.1-70B-Instruct has 70.6B parameters. At Q4_K_M with a context of 8,192 tokens, a single GPU needs 45.0 GiB of available memory for the result to be “Fits”.
File sizes are the real files on Hugging Face. The other columns give X, the available memory one GPU needs for the result to be “Fits” (largest buffer estimate ÷ 0.95 + 1 GiB), with llama.cpp, Flash Attention, F16 KV cache, 4 parallel sequences and micro-batch 512. They do not depend on any particular GPU.
Quantization
File size
X at 4,096 context
X at 8,192 context
X at 32,768 context
X at 131,072 context
Q8_0
69.83 GiB (2 files)
75.0 GiB
76.3 GiB
84.3 GiB
116.0 GiB
Q6_K
53.91 GiB (2 files)
58.5 GiB
59.8 GiB
67.8 GiB
99.5 GiB
Q5_K_M
46.52 GiB (2 files)
50.8 GiB
52.2 GiB
60.1 GiB
91.9 GiB
Q4_K_M
39.60 GiB
43.7 GiB
45.0 GiB
53.0 GiB
84.7 GiB
IQ4_XS
35.30 GiB
39.2 GiB
40.5 GiB
48.5 GiB
80.2 GiB
Q3_K_M
31.91 GiB
35.7 GiB
37.1 GiB
45.0 GiB
76.8 GiB
Q2_K
24.56 GiB
28.1 GiB
29.4 GiB
37.4 GiB
69.1 GiB
IQ2_M
22.46 GiB
25.8 GiB
27.1 GiB
35.1 GiB
66.8 GiB
IQ2_XXS
17.79 GiB
21.0 GiB
22.3 GiB
30.2 GiB
62.0 GiB
Smallest GPU for each quantization
For each quantization: the listed GPU with the least memory whose estimate is “Fits” on one card at 8,192 tokens of context. GPUs whose result is “Unknown” (no runtime profile, workstation and data-center cards, unified memory) are not considered.
Quantization
Smallest GPU that fits (one card)
Memory
Q8_0
No listed GPU fits on one card. For several cards, use the Calculator
—
Q6_K
No listed GPU fits on one card. For several cards, use the Calculator
—
Q5_K_M
No listed GPU fits on one card. For several cards, use the Calculator
—
Q4_K_M
No listed GPU fits on one card. For several cards, use the Calculator
—
IQ4_XS
No listed GPU fits on one card. For several cards, use the Calculator
—
Q3_K_M
No listed GPU fits on one card. For several cards, use the Calculator
—
Q2_K
No listed GPU fits on one card. For several cards, use the Calculator
“Fits” means llama.cpp's default --fit load check would place all layers on the GPU: our estimate of llama.cpp's buffers, plus its error margin, plus llama.cpp's 1 GiB per-card reserve, is within the memory counted as available. It does not promise that peak memory while generating fits. How results are decided
Context 8,192 tokens. Highest quantization that fits on one card, its longest context and the speed ceiling.
Unknown: memory configuration not established for this GPU; only “Doesn’t fit” would be shown.
Unknown
CUDA (NVIDIA): llama.cpp, CUDA back end (NVIDIA discrete GPU), all layers on the GPU, Flash Attention on, micro-batch (-ub) 512, F16 KV cache, context (-c) as shown; “Fits” is judged with llama-server’s default 4 parallel sequences (-np auto, unified KV cache) and “Doesn’t fit” with 1 sequence; idle GPU with no other programs using its memory.
ROCm on Linux (AMD): llama.cpp, ROCm back end on Linux (AMD discrete GPU), all layers on the GPU, Flash Attention on, micro-batch (-ub) 512, F16 KV cache, context (-c) as shown; “Fits” is judged with llama-server’s default 4 parallel sequences (-np auto, unified KV cache) and “Doesn’t fit” with 1 sequence; idle GPU with no other programs using its memory.
The speed ceiling is memory bandwidth divided by the bytes read per generated token. It is a theoretical upper bound; public llama.cpp benchmarks typically reach about half to four-fifths of it, and small models and mixture-of-experts models often less. Public benchmarks
Original weights
The model’s original weight files (safetensors, counted as described in the methodology) total 131.4 GiB. They are listed for reference only; every estimate on this page is for the GGUF files above, run with llama.cpp. meta-llama/Llama-3.1-70B-Instruct · Methodology