Llama 3.1 8B VRAM requirements

한국어

Llama 3.1 8B has 8.03B parameters, 32 layers and 8 KV heads. Here is the VRAM it needs by quant and context length.

This is an estimate. Real usage will differ.

Weights and KV cache come from formulas. Runtime overhead is a flat 1 GiB guess. Actual use depends on your runtime and version. If it says tight, load it and check.

Model values checked 2026-11-11

VRAM (GiB) by quant and context length

QuantWeights2,0488,19232,768131,072
FP1615.016.217.020.032.0
Q8_07.99.29.912.924.9
Q6_K6.17.48.111.123.1
Q5_K_M5.36.67.310.322.3
Q4_K_M4.65.86.69.621.6
Q3_K_M3.75.05.78.720.7
Q2_K3.04.25.08.020.0

This is an estimate. Real usage depends on your runtime and version.

VRAM calculator

Result

Llama 3.1 8B Q4_K_M, 8,192 context: about 6.6 GiB needed.

Fits on the GeForce RTX 4070 (12 GB). About 5.4 GiB to spare.

  • Weights 4.6 GiB
  • KV cache 1.0 GiB
  • Runtime overhead 1.0 GiB (estimate)
  • With this model and quant, the GeForce RTX 4070 holds about 42,752 tokens of context.
  • At this context, the highest quant that fits the GeForce RTX 4070 is Q8_0.

This is an estimate. Real usage depends on your runtime and version.

GPUs that fit Llama 3.1 8B Q4_K_M at 8,192 context

Model values used

Parameters
8,030,261,248
Layers
32
Attention heads
32
KV heads
8
Head dim
128
Max context (config)
131,072
Read from
meta-llama/Llama-3.1-8B-Instruct

The official repo is gated, so the same config file was read from unsloth/Llama-3.1-8B-Instruct.

See this model per GPU