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)
Open Llama 3.1 70B in the calculator

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…

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.

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.

QuantFileSizevs estimate 8K32K128K
Q2_K bartowski/Meta-Llama-3.1-70B-Instruct-GGUF 24.6 GB26,375,113,280 bytes −11% 30.3 GB38.5 GB71.5 GB
Q3_K_M bartowski/Meta-Llama-3.1-70B-Instruct-GGUF 31.9 GB34,267,499,072 bytes −1% 38.4 GB46.6 GB79.6 GB
IQ4_XS bartowski/Meta-Llama-3.1-70B-Instruct-GGUF 35.3 GB37,902,666,304 bytes −1% 42.1 GB50.3 GB83.3 GB
Q4_K_M bartowski/Meta-Llama-3.1-70B-Instruct-GGUF 39.6 GB42,520,398,400 bytes ±0% 46.8 GB55.1 GB88.1 GB
Q5_K_M bartowski/Meta-Llama-3.1-70B-Instruct-GGUF2 parts 46.5 GB49,949,821,696 bytes ±0% 54.4 GB62.7 GB95.7 GB
Q6_K bartowski/Meta-Llama-3.1-70B-Instruct-GGUF2 parts 53.9 GB57,888,148,224 bytes ±0% 62.6 GB70.8 GB104 GB
Q8_0 bartowski/Meta-Llama-3.1-70B-Instruct-GGUF2 parts 69.8 GB74,975,054,592 bytes ±0% 80.1 GB88.3 GB121 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.

HardwareLargest GGUF, 8KIts longest contextQ4_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/Meta-Llama-3.1-70B-Instruct-GGUF (checked 2026-09-29). -c 9216 is the longest Q4_K_M context on the M4 Pro Mac (64 GB, 48 GB usable).

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.

ContextKV cache, FP16Total at Q4_K_MTotal at Q8_0Smallest 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.

HardwareBandwidthQ4_K_MFP8
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.04.1–5.6
M3 Ultra Mac Studio (512 GB) 819 GB/s 9.8–136.1–8.4
H100 SXM 3,350 GB/s 38–5424–34
H200 4,800 GB/s 54–7634–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.

GPUMemoryQ4_K_MQ8_0FP8
RTX 3060 12 GB NoNoNo
RTX 4060 Ti 16GB 16 GB NoNoNo
RTX 3090 / 4090 24 GB NoNoNo
RTX 5090 32 GB NoNoNo
A100 40GB 40 GB NoNoNo
Mac, 64 GB unified memory 48 GB 9KNoNo
L40S / RTX 6000 Ada 48 GB 9KNoNo
A100 / H100 80GB 80 GB 102K6K19K
Mac, 128 GB unified memory 96 GB 128K (full)52K65K
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
Reported benchmarks
GPQA, 0-shot 46.7 · MMLU-Pro (CoT), 5-shot 66.4. Vendor-reported: from the maker’s own model card, not rerun here; read 2026-09-30.

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.

ModelParametersTotalKV per tokenSmallest 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/Meta-Llama-3.1-70B-Instruct-GGUF is 42,520,398,400 bytes (39.6 GB); with an 8K context it needs 46.8 GB. The smallest setup listed here that holds Q4_K_M is the M4 Pro Mac (64 GB, 48 GB usable).

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 (-ctk q8_0 -ctv q8_0) takes 21.3 GB at 128K.

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.

Llama 3.1 70B VRAM: 47.0 GB at Q4_K_M, 8K context

Numbers read from the model files on Hugging Face on . Compare it with other models in the reproducible model and GPU report.