FR
← All models
Llama · Dense model · 2024-07

Llama 3.1 8B: how much VRAM?

In Q4_K_M with 8k tokens of context, Llama 3.1 8B needs about 6 GB of memory. The cheapest option: RTX 3060 12 GB (€1,180 for the complete machine).

Model sheet

Parameters8.0 B
Active / token8.0 B
Cache / 1k tok.128 MB
ollama run llama3.1:8b

Weights on Hugging Face: meta-llama/Llama-3.1-8B-Instruct

VRAM by precision and context

Precision4k8k32k128k
FP1618 GB18 GB21 GB33 GB
FP89 GB10 GB13 GB25 GB
Q8_010 GB10 GB13 GB25 GB
Q6_K8 GB8 GB11 GB23 GB
Q4_K_M6 GB6 GB9 GB21 GB
Q3_K_M5 GB6 GB9 GB21 GB

One user. Each simultaneous user adds their own context cache.

Frequently asked questions

How much VRAM does Llama 3.1 8B need?

With an 8k-token context and one user, Llama 3.1 8B needs about 6 GB in Q4, 10 GB in Q8 and 18 GB in FP16.

What is the cheapest hardware to run Llama 3.1 8B?

In Q4, the cheapest option in our catalogue to run Llama 3.1 8B is RTX 3060 12 GB, about €1,180 for the complete machine.

How fast does Llama 3.1 8B run?

Expect around 40 tokens per second for one user on RTX 3060 12 GB in Q4 (estimate based on memory bandwidth).

On which hardware?

HardwareCardsSpeedMachine
RTX 3060 12 GB1 is enough~40 tok/s€1,180
RTX 4060 Ti 16 GB1 is enough~32 tok/s€1,350
Radeon RX 7800 XT 16 GB1 is enough~69 tok/s€1,400
RTX 4070 12 GB1 is enough~56 tok/s€1,450
RTX 3090 24 GB (used)1 is enough~104 tok/s€1,650
RTX 4070 Ti SUPER 16 GB1 is enough~75 tok/s€1,750
Radeon RX 7900 XTX 24 GB1 is enough~107 tok/s€1,850
RTX 4080 SUPER 16 GB1 is enough~82 tok/s€1,950
RTX 5080 16 GB1 is enough~107 tok/s€2,100
Mini-PC Ryzen AI Max+ 395 128 GB1 is enough~28 tok/s€2,300
RTX 4090 24 GB1 is enough~112 tok/s€2,900
RTX 5090 32 GB1 is enough~199 tok/s€3,500
NVIDIA DGX Spark 128 GB1 is enough~30 tok/s€4,000
Mac Studio M4 Max 128 GB1 is enough~61 tok/s€4,400
RTX 6000 Ada 48 GB1 is enough~107 tok/s€7,900
RTX PRO 6000 Blackwell 96 GB1 is enough~199 tok/s€9,900
Mac Studio M3 Ultra 512 GB1 is enough~91 tok/s€11,500
L40S 48 GB1 is enough~96 tok/s€13,500
A100 80 GB1 is enough~227 tok/s€17,000
H100 80 GB1 is enough~372 tok/s€34,000
H200 141 GB1 is enough~533 tok/s€39,000
B200 192 GB1 is enough~889 tok/s€48,000

Estimated complete machine: cards + host PC (€900 for 1–2 consumer cards, €2,800 beyond, a €6,000 server for datacenter cards). Macs and mini-PCs are sold complete.

Similar models