Model guide
What GPU do you need for Llama 3.1 8B?
In short
- Llama 3.1 8B needs about 5.5 GB at Q4_K_M (weights plus runtime overhead; KV cache is extra).
- Smallest card that fits: RTX 3060 12GB (12 GB).
- 12 of 12 cards in our set hold it at this quantization.
You need about 6.5 GB at Q4_K_M with an 8K context, so an 8 GB card runs it and a 12 GB card runs it with room to spare. This is the size most people actually run locally, and it is forgiving.
Architecture at a glance
Parameters
8.03B
Layers
32
KV heads
8
Head dim
128
Max context
128K
KV @8K
1.0 GB
The 8B uses grouped-query attention with 8 KV heads across 32 layers, which keeps the cache modest at everyday context lengths — 1 GB at 8K. Stretch to the full 128K window and the cache climbs to 16 GB, taking the total to about 21.5 GB: still inside a single 24 GB card, which is part of why this model became the local default.
VRAM by quantization (8K context)
| Quant | Total VRAM | Cheapest GPU that fits |
|---|---|---|
| Q4_K_M | 6.5 GB | RTX 3060 12GB |
| Q5_K_M | 7.3 GB | RTX 3060 12GB |
| Q6_K | 8.2 GB | RTX 3060 12GB |
| Q8_0 | 10.1 GB | RTX 3060 12GB |
| FP16 | 17.5 GB | RTX 3090 |
Weights and KV cache are exact arithmetic from the model's published config; overhead (0.75 GB + 5% of weights) is a calibrated estimate. "Fits" means at most 95% of the card. Method on the Engineering Center.
Compatible GPUs at Q4_K_M
Green fits comfortably, amber is tight, faded doesn't fit — each links to that card's full page.
Can an RTX 4090 run Llama 3.1 8B?
Yes. At Q4_K_M with an 8K context, Llama 3.1 8B needs about 6.5 GB, leaving 17.5 GB of headroom on the 4090's 24 GB.
What about maximum context?
At the full 128K window, the KV cache grows to about 16.0 GB and the total to 21.5 GB. The KV cache is the part that grows — the weights never change. To see the exact split at any context, run this model through the GPU memory calculator, check an Ollama tag in the Ollama calculator, or size a fine-tune in the training memory calculator.
Running it in the cloud
For rented hardware the sensible floor is the A100 40GB — the smallest datacenter card that holds this model comfortably at Q4_K_M. Marketplace clouds also rent consumer cards; anything from the RTX 3060 12GB up works for this model and usually costs less per hour. Hourly prices move weekly, so we don't print them here — the workspace carries the current figures and weighs rental against electricity for this exact model.
Related models
3.21B params · 3.5 GB at Q4_K_M
Same family — the natural size step.
See requirements →7.62B params · 5.7 GB at Q4_K_M
Closest size in another family.
See requirements →7.25B params · 6.0 GB at Q4_K_M
Closest size in another family.
See requirements →Exact memory figures for every quantization: How much VRAM does Llama 3.1 8B Instruct need?
Common questions
What is the minimum GPU for Llama 3.1 8B?
At the default Q4_K_M quantization with an 8K context, Llama 3.1 8B needs about 6.5 GB of VRAM, so the practical minimum is a RTX 3060 12GB. Weights and KV cache are exact arithmetic from the model's config; a small runtime overhead estimate is included.
How much VRAM does Llama 3.1 8B need at maximum context?
At the full 128K window, the KV cache grows to about 16.0 GB and the total to 21.5 GB.
Can an RTX 4090 run Llama 3.1 8B?
Yes. At Q4_K_M with an 8K context, Llama 3.1 8B needs about 6.5 GB, leaving 17.5 GB of headroom on the 4090's 24 GB.
Before you buy
Compare the shortlisted cards head to head in GPU Compare, size the exact context you need in the GPU Memory Calculator, and read which quantization to run before committing to a card — dropping one format down often removes the need for the next tier up.