meta-llama · text

Llama-2-70b-chat-hf

meta-llama/Llama-2-70b-chat-hf

Llama-2-70b-chat-hf at Q4_K_M is exactly 41,422,910,368 bytes (38.58 GiB / 41.42 GB) — an effective 4.804 bits per weight, not the nominal 4. Its KV cache at 32K is 10.00 GiB.

From the file· summed from 1 file(s)From the file· KV from mirror (mirror:NousResearch/Llama-2-70b-chat-hf)
Parameters
69.0B
Architecture
llama
80 layers
Context
4,096
native (config.json)
License
llama2

Shipped quantizations

exact bytes, summed from published files
QuantSizeExact bytesEffective bpwTensorsPublisher
Q2_K27.27 GiB29,279,253,4083.396TheBloke
Q3_K_S27.86 GiB29,919,294,3683.470TheBloke
Q5_K_S28.47 GiB30,574,407,6803.546TheBloke
Q3_K_M30.91 GiB33,186,657,1843.849TheBloke
Q3_K_L33.67 GiB36,147,835,8084.192TheBloke
Q4_036.20 GiB38,872,249,2484.508TheBloke
Q4_K_S36.39 GiB39,073,575,8404.532TheBloke
Q4_K_M38.58 GiB41,422,910,3684.804TheBloke
Q5_044.20 GiB47,461,397,4085.505TheBloke
Q5_K_M45.41 GiB48,753,767,3285.654TheBloke

KV cache by context

computed per layer
ContextKV cache (f16)Flat formulaOverstated byFull / windowed / recurrent
4,0961.25 GiB1.25 GiB80 / 0 / 0
8,1922.50 GiB2.50 GiB80 / 0 / 0
16,3845.00 GiB5.00 GiB80 / 0 / 0
32,76810.00 GiB10.00 GiB80 / 0 / 0
65,53620.00 GiB20.00 GiB80 / 0 / 0
131,07240.00 GiB40.00 GiB80 / 0 / 0

Compare with

same modality, comparable size

Will it run on your card?

full quant x context sweep

Why other calculators give a different number

A parameters × bits ÷ 8 estimate puts Q4_K_M at roughly 36.13 GiB. The real file is 38.58 GiB, because a quantization is a mixture and some tensors are always kept at higher precision.

Architecture

from mirror:NousResearch/Llama-2-70b-chat-hf
Layers
80
Attention heads
64
KV heads
8
Head dim
128
Hidden size
8192
Vocab
32,000
Sliding window
none
SWA period
MLA
no
Experts
Experts per token
use_sliding_window

Questions people ask

How much VRAM does Llama-2-70b-chat-hf need?
Q4_K_M is exactly 41,422,910,368 bytes (38.58 GiB) in weights. Add the KV cache, which depends on your context length, plus roughly half a gigabyte of runtime overhead.
How large is Llama-2-70b-chat-hf's KV cache?
10.00 GiB at 32K context with an f16 cache, computed per layer. Quantizing the cache to q8_0 roughly halves it, which is often the difference between a context length fitting and not.
Which quantization of Llama-2-70b-chat-hf should I use?
Q4_K_M is the usual default. Pick the largest quantization that fits your card at the context you actually need — the table above gives exact sizes for every one published.