Llama 3.1 405B VRAM Requirements

Llama 3.1 405B needs about 234 GB of VRAM at Q4_K_M with an 8K context: 229 GB for weights, 3.9 GB for the KV cache and 1.0 GB of runtime overhead. At Q8_0 it needs 407 GB and at full FP16 precision 761 GB. The smallest GPU that runs it fully is the Apple M3 Ultra 512GB.

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

234 GB VRAM

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

  • Weights 229 GB
  • KV cache 3.9 GB
  • Runtime overhead 1.0 GB

Which GPUs can run it

Llama 3.1 405B 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.85229 GB234 GB246 GBMulti-GPU / server
Q5_K_M5.69269 GB274 GB286 GBMulti-GPU / server
Q6_K6.59311 GB316 GB328 GBMulti-GPU / server
Q8_08.50402 GB407 GB418 GBMulti-GPU / server
FP16 / BF1616.00756 GB761 GB773 GBMulti-GPU / server
Q3_K_M3.91185 GB190 GB202 GBMulti-GPU / server
Q2_K3.00142 GB147 GB159 GBMulti-GPU / server

VRAM by context length

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

ContextKV cache (FP16)KV cache (Q8_0)Total, FP16 cacheTotal, Q8_0 cache
4K tokens2.0 GB1.0 GB232 GB231 GB
8K tokens3.9 GB2.1 GB234 GB232 GB
32K tokens15.8 GB8.4 GB246 GB239 GB
128K tokens63.0 GB33.5 GB293 GB264 GB

GPUs that can run Llama 3.1 405B

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
Apple M3 Ultra 512GB384 GBFitsQ6_K128K~2.1 tok/s
AMD Instinct MI300X 192GB192 GB77% on GPUQ2_K–~0.70 tok/s
NVIDIA H200 141GB141 GB57% on GPU––~0.38 tok/s
RTX PRO 6000 Blackwell 96GB96.0 GB39% on GPU––~0.27 tok/s
A100 80GB80.0 GB32% on GPU––~0.25 tok/s
H100 80GB SXM80.0 GB32% on GPU––~0.25 tok/s

About Llama 3.1 405B

Meta's largest dense open model. Even at Q4_K_M it needs well over 200 GB, which puts it in multi-GPU server or 512 GB Mac Studio territory. Meta also published an official FP8 version for 8x H100 serving.

SpecValue
Parameters405.9B
Layers126
Hidden size16384
Attention heads / KV heads128 / 8
Head dimension128
Vocabulary128,256
Max context (used here)128K tokens
KV cache per token (FP16)504 KB
Released2024-07
LicenseLlama 3.1 Community License

Llama 3.1 405B VRAM: common questions

Can Llama 3.1 405B run on a Mac Studio?

A 512 GB M3 Ultra can hold Q4_K_M with a moderate context once you raise the GPU memory limit, but expect only a few tokens per second because every token reads about 230 GB of weights.

How much VRAM does Llama 3.1 405B need?

About 234 GB at Q4_K_M with an 8K context, 407 GB at Q8_0 and 761 GB at FP16. Longer contexts add 0.49 GB per 1,000 tokens with an FP16 cache.

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

The smallest listed device that fits it fully at Q4_K_M with 8K context is the Apple M3 Ultra 512GB (384 GB usable).

Related