VRAM · Local model
Llama 3.1 8B VRAM requirements
Llama 3.1 8B has 8.0 billion parameters. With an 8K context it needs about 6.6 GB of memory at Q4_K_M, which fits an 8 GB GPU such as the GeForce RTX 4060, and 18 GB at full precision.
- Parameters
- 8.0B
- Layers
- 32
- Max context
- 131,072
- Experts
- Dense
Attention: 32 full-attention layers.
Requirements
VRAM by quantisation and context length
| Quantisation | 4K context | 32K context | 128K context |
|---|---|---|---|
| FP16 / BF16 | 17 GB | 21 GB | 34 GB |
| FP8 | 9.0 GB | 13 GB | 26 GB |
| Q8_0 (8-bit) | 9.4 GB | 13 GB | 26 GB |
| Q6_K | 7.6 GB | 11 GB | 24 GB |
| Q5_K_M | 6.8 GB | 10 GB | 23 GB |
| Q4_K_M | 6.1 GB | 9.6 GB | 23 GB |
| MXFP4 | 5.5 GB | 9.0 GB | 22 GB |
| Q3_K_M | 5.2 GB | 8.7 GB | 22 GB |
| Q2_K | 4.5 GB | 8.0 GB | 21 GB |
Weights + FP16 KV cache + overhead (10%, at least 1 GB), batch 1. See the formula and assumptions.
Hardware
What can run it at Q4_K_M
On one GPU: GeForce RTX 4060, GeForce RTX 3060, GeForce RTX 4070, GeForce RTX 5070, GeForce RTX 4060 Ti 16GB, GeForce RTX 4080 Super, GeForce RTX 5060 Ti 16GB, GeForce RTX 5070 Ti, GeForce RTX 5080, GeForce RTX 3090, GeForce RTX 4090, Radeon RX 7900 XTX, GeForce RTX 5090, L4, L40S, A100 80GB, H100 80GB, RTX PRO 6000 Blackwell, H200, Instinct MI300X. On a Mac: 16 GB of unified memory or more.
Calculator
Try other settings
8.0B parameters · 131,072-token context · model card
GGUF; the most popular balance of size and quality.
Requests served at the same time.
- Weights
- 4.6 GB
- KV cache
- 1.0 GB
- Overhead
- 1.0 GB
| GPU | Memory | Runs it? |
|---|---|---|
| GeForce RTX 4060 | 8 GB | Yes |
| GeForce RTX 3060 | 12 GB | Yes |
| GeForce RTX 4070 | 12 GB | Yes |
| GeForce RTX 5070 | 12 GB | Yes |
| GeForce RTX 4060 Ti 16GB | 16 GB | Yes |
| GeForce RTX 4080 Super | 16 GB | Yes |
| GeForce RTX 5060 Ti 16GB | 16 GB | Yes |
| GeForce RTX 5070 Ti | 16 GB | Yes |
| GeForce RTX 5080 | 16 GB | Yes |
| GeForce RTX 3090 | 24 GB | Yes |
| GeForce RTX 4090 | 24 GB | Yes |
| Radeon RX 7900 XTX | 24 GB | Yes |
| GeForce RTX 5090 | 32 GB | Yes |
| L4 | 24 GB | Yes |
| L40S | 48 GB | Yes |
| A100 80GB | 80 GB | Yes |
| H100 80GB | 80 GB | Yes |
| RTX PRO 6000 Blackwell | 96 GB | Yes |
| H200 | 141 GB | Yes |
| Instinct MI300X | 192 GB | Yes |
Apple Silicon Macs (unified memory)
- 16 GB: fits
- 24 GB: fits
- 32 GB: fits
- 36 GB: fits
- 48 GB: fits
- 64 GB: fits
- 96 GB: fits
- 128 GB: fits
- 192 GB: fits
- 256 GB: fits
- 512 GB: fits
Filled: fits as is. Outlined: fits after raising the GPU memory limit (leaving 8 GB for macOS). macOS gives the GPU two-thirds of memory up to 32 GB and three-quarters above by default.
FAQ
Frequently asked questions
How much VRAM does Llama 3.1 8B need?
With an 8K context, about 6.6 GB at Q4_K_M, 9.9 GB at 8-bit (Q8_0) and 18 GB at full 16-bit precision. That covers the weights, the KV cache and runtime overhead.
Can Llama 3.1 8B run on a 24 GB GPU?
Yes, at FP16 / BF16 or smaller, with an 8K context (about 18 GB). Longer contexts need more memory for the KV cache.
Can I run Llama 3.1 8B on a Mac?
Yes: at Q4_K_M and an 8K context it fits a Mac with 16 GB of unified memory using macOS’s default GPU memory limit.
How much memory does Llama 3.1 8B’s context use?
Its KV cache grows by about 125 MB for every 1,000 tokens of context in FP16. At its full 131,072-token context the cache is about 16 GB. Quantising the cache to 8-bit roughly halves it.
Related