Llama 3.1 8B VRAM Requirements

Llama 3.1 8B needs about 6.3 GB of VRAM at Q4_K_M with an 8K context: 4.5 GB for weights, 1.0 GB for the KV cache and 0.8 GB of runtime overhead. At Q8_0 it needs 9.8 GB and at full FP16 precision 16.8 GB. The smallest GPU that runs it fully is the RTX 3050 8GB.

By Meta · Updated October 14, 2026 · Values from config.json on Hugging Face

6.3 GB VRAM

Llama 3.1 8B at Q4_K_M with 8K context and the KV cache in FP16.

  • Weights 4.5 GB
  • KV cache 1.0 GB
  • Runtime overhead 0.8 GB

Which GPUs can run it

Llama 3.1 8B VRAM by quantization

Total memory with an FP16 KV cache. "Smallest tier" is the smallest standard VRAM size with a 6% safety margin at 8K.

QuantizationBits/weightWeightsTotal at 8KTotal at 32KSmallest tier
Q4_K_M4.854.5 GB6.3 GB9.3 GB8 GB
Q5_K_M5.695.3 GB7.1 GB10.1 GB8 GB
Q6_K6.596.2 GB8.0 GB11.0 GB10 GB
Q8_08.507.9 GB9.8 GB12.8 GB12 GB
FP16 / BF1616.0015.0 GB16.8 GB19.8 GB20 GB
Q3_K_M3.913.7 GB5.5 GB8.5 GB6 GB
Q2_K3.002.8 GB4.6 GB7.6 GB6 GB

VRAM by context length

At Q4_K_M. The KV cache grows linearly with context: 0.13 GB per 1,000 tokens in FP16.

ContextKV cache (FP16)KV cache (Q8_0)Total, FP16 cacheTotal, Q8_0 cache
4K tokens0.5 GB0.3 GB5.8 GB5.6 GB
8K tokens1.0 GB0.5 GB6.3 GB5.9 GB
32K tokens4.0 GB2.1 GB9.3 GB7.5 GB
128K tokens16.0 GB8.5 GB21.3 GB13.8 GB

GPUs that can run Llama 3.1 8B

At Q4_K_M with 8K context. "Best quant" is the highest-quality format that fits fully; "max context" is at Q4_K_M.

GPUUsable memoryStatusBest quantMax contextSpeed
RTX 3050 8GB8.0 GBFitsQ5_K_M17K~27 tok/s
RTX 4060 8GB8.0 GBFitsQ5_K_M17K~32 tok/s
RTX 4060 Ti 8GB8.0 GBFitsQ5_K_M17K~34 tok/s
Radeon RX 7600 8GB8.0 GBFitsQ5_K_M17K~29 tok/s
RTX 3060 Ti 8GB8.0 GBFitsQ5_K_M17K~53 tok/s
RTX 3070 8GB8.0 GBFitsQ5_K_M17K~53 tok/s
RTX 5060 8GB8.0 GBFitsQ5_K_M17K~53 tok/s
RTX 5060 Ti 8GB8.0 GBFitsQ5_K_M17K~53 tok/s
RTX 3070 Ti 8GB8.0 GBFitsQ5_K_M17K~71 tok/s
Intel Arc B570 10GB10.0 GBFitsQ6_K32K~35 tok/s
RTX 3080 10GB10.0 GBFitsQ6_K32K~89 tok/s
Apple M4 16GB10.7 GBFitsQ8_037K~14 tok/s
RTX 2080 Ti 11GB11.0 GBFitsQ8_039K~72 tok/s
RTX 2060 12GB12.0 GBFitsQ8_047K~40 tok/s

About Llama 3.1 8B

The default local model for most people. Grouped-query attention with 8 KV heads keeps the cache at 128 KB per token in FP16, so a full 128K context adds 16 GB on top of the weights. Fine-tunes of this model are among the most common on Hugging Face.

SpecValue
Parameters8.03B
Layers32
Hidden size4096
Attention heads / KV heads32 / 8
Head dimension128
Vocabulary128,256
Max context (used here)128K tokens
KV cache per token (FP16)128 KB
Released2024-07
LicenseLlama 3.1 Community License

Llama 3.1 8B VRAM: common questions

Can Llama 3.1 8B run on an 8GB GPU?

Yes, at Q4_K_M with up to about 16K context. At Q8_0 the weights alone are about 8 GB, so an 8 GB card needs CPU offload.

How much VRAM does Llama 3.1 8B need for 128K context?

About 16 GB for the KV cache alone in FP16, so roughly 21 GB total at Q4_K_M. Quantizing the cache to Q8_0 cuts that cache to about 8.5 GB.

How much VRAM does Llama 3.1 8B need?

About 6.3 GB at Q4_K_M with an 8K context, 9.8 GB at Q8_0 and 16.8 GB at FP16. Longer contexts add 0.13 GB per 1,000 tokens with an FP16 cache.

What is the cheapest GPU that can run Llama 3.1 8B?

The smallest listed device that fits it fully at Q4_K_M with 8K context is the RTX 3050 8GB (8.0 GB usable).

Related