Llama 3.1 70B VRAM requirements
Llama 3.1 70B needs about 47.0 GB of VRAM at Q4_K_M with 8K context, so it needs a 48 GB card such as the L40S; a 24 GB card is too small. Llama 3.1 70B has 70.6B parameters. With the same 8K context and one request it needs 75.5 GB at FP8 and 148 GB at FP16/BF16. The published weights take 131 GB (BF16). It does not fit on a 24 GB card at Q4_K_M; the smallest setup here that holds it with an 8K context is the M4 Pro Mac (64 GB, 48 GB usable).
47.0 GB at Q4_K_M, 8K context, one request
- FP8
- 75.5 GB
- FP16 / BF16
- 148 GB
- Published weights
- 131 GB
- Smallest setup, Q4_K_M
- M4 Pro Mac (64 GB, 48 GB usable)
Worked example: Llama 3.1 70B with 32K tokens
Inputs: Llama 3.1 70B · Q4_K_M weights · 32,768 tokens of context · one request · FP16 KV cache
- Weights (70.6B at Q4_K_M)
- 39.8 GB
- KV cache (320 KB per token)
- 10.0 GB
- Buffers and runtime (0.5 GB + 10%)
- 5.48 GB
- Total
- 55.2 GB
The smallest setup here that holds it is 2× RTX 5090 (64 GB): split across the 2 cards, with the 0.5 GB runtime base on each of them, it takes 55.7 GB and leaves about 8.27 GB to spare. Change the inputs in the calculator
Can I run Llama 3.1 70B on…
- RTX 4090: No, 4 cards
- RTX 3090: No, 4 cards
- RTX 5090: No, 2 cards
- RTX 3060 12GB: No, 8 cards
- RTX 4060 Ti 16GB: No, 4 cards
- RTX 5060 Ti 16GB: No, 4 cards
- RTX 4070 12GB: No, 8 cards
- RTX 5080 16GB: No, 4 cards
- RTX 4080 Super 16GB: No, 4 cards
- RX 7900 XTX: No, 4 cards
- M4 Max Mac (128 GB): Yes, up to Q8_0
- H100 SXM: Yes, up to Q6_K
What makes Llama 3.1 70B's memory use different
Per token of context it adds 320 KB of FP16 cache; Mistral Medium 3.5 128B (127.7B), the nearest-sized model here with plain full attention, adds 352 KB, so Llama 3.1 70B needs 9% less.
How much VRAM does Llama 3.1 70B need?
Llama 3.1 70B needs 47.0 GB at Q4_K_M, 80.0 GB at Q8_0 and 148 GB at FP16 with 8,192 tokens of context and one request. Each total below is the weights plus the FP16 KV cache and the runtime overhead (0.5 GB plus 10%), and each row opens the calculator with that setting. What the GGUF names mean.
| Precision | Weights | Total | Smallest setup |
|---|---|---|---|
| As published (BF16) | 131 GB | 148 GB | B200 (180 GB) |
| FP16 / BF16 | 131 GB | 148 GB | B200 (180 GB) |
| FP8 / INT8 | 65.7 GB | 75.5 GB | A100 80GB |
| INT4 (AWQ / GPTQ) | 34.9 GB | 41.6 GB | M4 Pro Mac (64 GB, 48 GB usable) |
| GGUF Q8_0 | 69.8 GB | 80.0 GB | Ryzen AI Max+ 395 (128 GB, 96 GB usable) |
| GGUF Q6_K | 53.9 GB | 62.5 GB | 2× RTX 5090 (64 GB) |
| GGUF Q5_K_M | 46.6 GB | 54.5 GB | 2× RTX 5090 (64 GB) |
| GGUF Q4_K_M | 39.8 GB | 47.0 GB | M4 Pro Mac (64 GB, 48 GB usable) |
| GGUF IQ4_XS | 35.7 GB | 42.6 GB | M4 Pro Mac (64 GB, 48 GB usable) |
| GGUF Q3_K_M | 32.1 GB | 38.6 GB | M4 Pro Mac (64 GB, 48 GB usable) |
| GGUF IQ3_XXS | 27.1 GB | 33.1 GB | M4 Pro Mac (64 GB, 48 GB usable) |
| GGUF Q2_K | 27.5 GB | 33.5 GB | M4 Pro Mac (64 GB, 48 GB usable) |
Fine-tuning Llama 3.1 70B? Llama 3.1 70B VRAM for LoRA, QLoRA and full training.
Llama 3.1 70B GGUF files on Hugging Face
The 7 GGUF files llama.cpp picks for Llama 3.1 70B with -hf <repo>:<QUANT>, with the bytes the Hugging Face file list reported on 2026-09-29. Each total is that file plus the FP16 KV cache and 0.5 GB + 10%, one request. "vs estimate" compares the file with the bits-per-weight size the table above uses.
| Quant | File | Size | vs estimate | 8K | 32K | 128K |
|---|---|---|---|---|---|---|
| Q2_K | bartowski/ | 24.6 GB26,375,113,280 bytes | −11% | 30.3 GB | 38.5 GB | 71.5 GB |
| Q3_K_M | bartowski/ | 31.9 GB34,267,499,072 bytes | −1% | 38.4 GB | 46.6 GB | 79.6 GB |
| IQ4_XS | bartowski/ | 35.3 GB37,902,666,304 bytes | −1% | 42.1 GB | 50.3 GB | 83.3 GB |
| Q4_K_M | bartowski/ | 39.6 GB42,520,398,400 bytes | ±0% | 46.8 GB | 55.1 GB | 88.1 GB |
| Q5_K_M | bartowski/ | 46.5 GB49,949,821,696 bytes | ±0% | 54.4 GB | 62.7 GB | 95.7 GB |
| Q6_K | bartowski/ | 53.9 GB57,888,148,224 bytes | ±0% | 62.6 GB | 70.8 GB | 104 GB |
| Q8_0 | bartowski/ | 69.8 GB74,975,054,592 bytes | ±0% | 80.1 GB | 88.3 GB | 121 GB |
GB here is GiB (1024³ bytes), as everywhere on this site; Hugging Face shows the Q4_K_M file as 42.5 GB, in 10⁹ bytes.
Which Llama 3.1 70B GGUF fits a 16, 24, 32, 48 or 80 GB GPU or a Mac
From the file sizes above: the largest file that fits each machine with an 8K context and 0.5 GB left free, the longest context it then has room for, and the longest context for Q4_K_M (39.6 GB). One request, FP16 KV cache. The Q4_K_M file is 157 MB under its bits-per-weight estimate; the estimate tables and the llama-server command on this page count the estimate, so they show less context.
| Hardware | Largest GGUF, 8K | Its longest context | Q4_K_M, longest context |
|---|---|---|---|
| RTX 5060 Ti 16GB | None fits | — | No |
| RTX 4090 (24 GB) | None fits | — | No |
| RTX 5090 (32 GB) | Q2_K, 24.6 GB | 11K | No |
| L40S (48 GB) | Q4_K_M, 39.6 GB | 9K | 9K |
| H100 SXM (80 GB) | Q6_K, 53.9 GB | 57K | 102K |
| M4 Pro Mac (64 GB, 48 GB usable) | Q4_K_M, 39.6 GB | 9K | 9K |
| M4 Max Mac (128 GB, 96 GB usable) | Q8_0, 69.8 GB | 52K | 128K (full) |
Run Llama 3.1 70B with llama.cpp or Ollama
llama-server -hf bartowski/Meta-Llama-3.1-70B-Instruct-GGUF:Q4_K_M -c 9216 Meta-Llama-3.1-70B-Instruct-Q4_K_M.gguf, 42.5 GB, from bartowski/
ollama run llama3.1:70b
Ollama library tag llama3.1:70b; its quant is Ollama's choice. Same context: /set parameter num_ctx 9216.
Llama 3.1 70B at 8K, 32K and 128K (full) tokens of context
All 80 layers use full attention. Each extra token of context adds 320 KB of FP16 cache per request. The last column is the smallest setup here, one card or a group, that holds it at Q4_K_M. How the KV cache works.
| Context | KV cache, FP16 | Total at Q4_K_M | Total at Q8_0 | Smallest setup, Q4_K_M |
|---|---|---|---|---|
| 8K tokens | 2.50 GB | 47.0 GB | 80.0 GB | M4 Pro Mac (64 GB, 48 GB usable) |
| 32K tokens | 10.0 GB | 55.2 GB | 88.3 GB | 2× RTX 5090 (64 GB) |
| 128K tokens | 40.0 GB | 88.2 GB | 121 GB | Ryzen AI Max+ 395 (128 GB, 96 GB usable) |
How fast Llama 3.1 70B writes
Tokens per second for one request with 8,192 tokens of context, estimated from memory bandwidth. A dash means it does not fit on one card. Try other settings in the speed calculator.
| Hardware | Bandwidth | Q4_K_M | FP8 |
|---|---|---|---|
| RTX 3060 12GB | 360 GB/s | — | — |
| RTX 4090 | 1,008 GB/s | — | — |
| RTX 5090 | 1,792 GB/s | — | — |
| M4 Max Mac (128 GB) | 546 GB/s | 6.6–9.0 | 4.1–5.6 |
| M3 Ultra Mac Studio (512 GB) | 819 GB/s | 9.8–13 | 6.1–8.4 |
| H100 SXM | 3,350 GB/s | 38–54 | 24–34 |
| H200 | 4,800 GB/s | 54–76 | 34–48 |
Longest context on one GPU
How many tokens of context Llama 3.1 70B fits on a single card with one request, an FP16 KV cache and 0.5 GB left free. "Full" means the model's whole context window fits.
| GPU | Memory | Q4_K_M | Q8_0 | FP8 |
|---|---|---|---|---|
| RTX 3060 | 12 GB | No | No | No |
| RTX 4060 Ti 16GB | 16 GB | No | No | No |
| RTX 3090 / 4090 | 24 GB | No | No | No |
| RTX 5090 | 32 GB | No | No | No |
| A100 40GB | 40 GB | No | No | No |
| Mac, 64 GB unified memory | 48 GB | 9K | No | No |
| L40S / RTX 6000 Ada | 48 GB | 9K | No | No |
| A100 / H100 80GB | 80 GB | 102K | 6K | 19K |
| Mac, 128 GB unified memory | 96 GB | 128K (full) | 52K | 65K |
| H200 | 141 GB | 128K (full) | 128K (full) | 128K (full) |
| B200 | 180 GB | 128K (full) | 128K (full) | 128K (full) |
Model details
- Parameters
- 70.6B (70,553,706,496)
- Layers
- All 80 layers use full attention
- Attention cache
- 8 KV heads × 128
- Context length
- 131,072 tokens
- Published weights
- 131 GB (BF16)
- On Hugging Face
- meta-llama/
Llama-3.1-70B-Instruct
Why this estimate looks this way
At Q4_K_M and an 8K-token context, Llama 3.1 70B uses 39.8 GB for weights, 2.50 GB for its FP16 KV cache and 4.73 GB for estimated runtime overhead, totaling 47.0 GB. The overhead is a 0.5 GB base plus 10% of weights and cache.
The architecture and published checkpoint size come from the model's config.json and weight files. These are estimates rather than measured peak memory; inference engines can reserve extra buffers or preallocate the full configured cache.
Llama 3.1 70B next to similar-sized models
The three models here closest to it in parameter count, at Q4_K_M with 8,192 tokens of context.
| Model | Parameters | Total | KV per token | Smallest setup |
|---|---|---|---|---|
| Llama 3.1 70B | 70.6B | 47.0 GB | 320 KB | M4 Pro Mac (64 GB, 48 GB usable) |
| Kolibri-1 | 78.1B, 3.5B active | 49.2 GB | 20 KB | 2× RTX 5090 (64 GB) |
| Qwen3-Coder-Next | 79.7B, 3B active | 50.1 GB | 24 KB | 2× RTX 5090 (64 GB) |
| AliceAI Foundation 80B-A3B | 81.3B, 3B active | 51.1 GB | 24 KB | 2× RTX 5090 (64 GB) |
Llama 3.1 70B VRAM questions
How much VRAM do I need to run Llama 3.1 70B locally?
About 47.0 GB at Q4_K_M with an 8K context and one request, by the bits-per-weight estimate, and 148 GB at BF16. The Q4_K_M GGUF Meta-Llama-3.1-70B-Instruct-Q4_K_M.gguf in bartowski/
Can I run Llama 3.1 70B on a 24 GB GPU?
No. The RTX 4090 (24 GB) alone cannot hold it: the smallest listed GGUF, Q2_K at 24.6 GB, needs 30.3 GB with an 8K context.
Which quantization of Llama 3.1 70B fits in 16 GB of VRAM?
The RTX 5060 Ti 16GB alone cannot hold it: the smallest listed GGUF, Q2_K at 24.6 GB, needs 30.3 GB with an 8K context.
Can I run Llama 3.1 70B on a Mac?
On the M4 Pro Mac (64 GB, 48 GB usable), the largest listed GGUF that fits with an 8K context and 0.5 GB free is Q4_K_M (39.6 GB), with up to 9K tokens of context. On the M4 Max Mac (128 GB, 96 GB usable), the largest listed GGUF that fits with an 8K context and 0.5 GB free is Q8_0 (69.8 GB), with up to 52K tokens of context. Q4_K_M (39.6 GB) runs with its full 128K-token context. By default macOS lets the GPU use about 75% of unified memory.
How much more VRAM does Llama 3.1 70B need for 32K or 128K tokens of context?
Its FP16 KV cache is 2.50 GB at 8K, 10.0 GB at 32K, 40.0 GB at 128K for one request, so 128K adds 37.5 GB over 8K, plus 10% overhead. A q8_0 cache
Why does Llama 3.1 70B use more VRAM than its GGUF file size?
The file holds only the weights. At Q4_K_M with an 8K context: 39.6 GB of weights (the file's 42,520,398,400 bytes) + 2.50 GB of FP16 KV cache + 4.71 GB of compute buffers and runtime (0.5 GB + 10%) = 46.8 GB.
Badge for your model card
Paste it into a Hugging Face or GitHub README; it shows the Q4_K_M total above and links to this page. Q8_0 and FP16 badges.
Numbers read from the model files on Hugging Face on . Compare it with other models in the reproducible model and GPU report.