Questions about Llama 3.1 405B memory
How much GPU memory does Llama 3.1 405B need for inference?
The weights alone take about 810 GB in FP16, 405 GB in FP8 or INT8, and 228 GB in 4-bit group quantisation. Adding a 10% runtime allowance and the KV cache for one 8,192-token sequence (FP16 cache), the total comes to about 896 GB in FP16, 450 GB in FP8 and 255 GB in 4-bit.
How many H100s do I need to run Llama 3.1 405B?
By capacity alone, at least 12 H100s (80 GB each) for FP16, 6 for FP8 and 4 for 4-bit, at an 8,192-token context and one sequence. Tensor-parallel setups usually use a power of two, which makes the practical counts 16, 8 and 4. This counts memory only; speed depends on bandwidth and interconnect.
Can Llama 3.1 405B run on a single RTX 4090 or RTX 5090?
No. Even 4-bit needs about 255 GB at an 8,192-token context, more than the 24 GB of an RTX 4090 or the 32 GB of an RTX 5090. A longer context or more concurrent requests raises the total. Offloading to system RAM can make a larger model load, but at a large cost in speed.
How much memory does the Llama 3.1 405B KV cache use?
516.1 KB per token with an FP16 cache (258.0 KB with FP8). One 131,072-token sequence therefore takes about 67.6 GB in FP16 (33.8 GB in FP8), and every extra concurrent 8,192-token sequence adds about 4.2 GB.
Things to know
- Architecture read from a public quantised mirror of the Llama 3.1 405B config (the Meta repo is gated). Parameter count is the nominal 405B.
- Estimate only. This is a capacity calculation. It does not model bandwidth, interconnect or software overhead.
Other models
- Llama 3.1 8B memory requirements
- Mistral 7B memory requirements
- Qwen2.5 32B memory requirements
- Llama 3.1 70B memory requirements
- Qwen2.5 72B memory requirements
- Mixtral 8x7B memory requirements
- DeepSeek-V3 memory requirements
All model memory requirements ยท Open Llama 3.1 405B in the calculator