meta-llama · text

Meta-Llama-3-8B

meta-llama/Meta-Llama-3-8B

Meta-Llama-3-8B at Q4_K_M is exactly 4,920,733,536 bytes (4.58 GiB / 4.92 GB) — an effective 4.902 bits per weight, not the nominal 4. Its KV cache at 32K is 4.00 GiB.

From the file· summed from 1 file(s)From the file· KV from mirror (mirror:NousResearch/Meta-Llama-3-8B)
Parameters
8.0B
Architecture
llama
32 layers
Context
8,192
native (config.json)
License
other

Shipped quantizations

exact bytes, summed from published files
QuantSizeExact bytesEffective bpwTensorsPublisher
IQ1_S1.88 GiB2,019,626,8482.012bartowski
IQ1_S1.88 GiB2,019,635,5522.012bartowski
IQ1_S1.88 GiB2,019,635,8722.012bartowski
IQ1_M2.01 GiB2,161,971,0402.154bartowski
IQ1_M2.01 GiB2,161,979,7442.154bartowski
IQ1_M2.01 GiB2,161,980,0642.154bartowski
IQ2_XXS2.23 GiB2,399,211,3602.390bartowski
IQ2_XXS2.23 GiB2,399,220,0642.390bartowski
IQ2_XXS2.23 GiB2,399,220,3842.390bartowski
IQ2_XS2.43 GiB2,605,780,8322.596bartowski
IQ2_XS2.43 GiB2,605,789,5362.596bartowski
IQ2_XS2.43 GiB2,605,789,8562.596bartowski
IQ2_S2.57 GiB2,758,487,9042.748bartowski
IQ2_S2.57 GiB2,758,497,4402.748bartowski
IQ2_S2.57 GiB2,758,497,7602.748bartowski
IQ2_M2.75 GiB2,948,280,1602.937bartowski
IQ2_M2.75 GiB2,948,289,6962.937bartowski
IQ2_M2.75 GiB2,948,290,0162.937bartowski
Q2_K2.96 GiB3,179,130,7203.167bartowski
Q2_K2.96 GiB3,179,140,5123.167bartowski
Q2_K2.96 GiB3,179,140,8323.167bartowski
IQ3_XXS3.05 GiB3,274,911,5843.263bartowski
IQ3_XXS3.05 GiB3,274,921,1203.263bartowski
IQ3_XXS3.05 GiB3,274,921,4403.263bartowski
IQ3_XS3.28 GiB3,518,746,4643.506bartowski
IQ3_XS3.28 GiB3,518,757,0883.506bartowski
IQ3_XS3.28 GiB3,518,757,4083.506bartowski
Q3_K_S3.41 GiB3,664,498,5283.651bartowski
Q3_K_S3.41 GiB3,664,509,1523.651bartowski
Q3_K_S3.41 GiB3,664,509,4723.651bartowski
IQ3_S3.43 GiB3,682,324,3203.668bartowski
IQ3_S3.43 GiB3,682,334,9443.668bartowski
IQ3_S3.43 GiB3,682,335,2643.668bartowski
IQ3_M3.52 GiB3,784,822,6243.771bartowski
IQ3_M3.52 GiB3,784,833,2483.771bartowski
IQ3_M3.52 GiB3,784,833,5683.771bartowski
Q3_K_M3.74 GiB4,018,917,2164.004bartowski
Q3_K_M3.74 GiB4,018,927,8404.004bartowski
Q3_K_M3.74 GiB4,018,928,1604.004bartowski
Q3_K_L4.03 GiB4,321,955,6804.306bartowski

KV cache by context

computed per layer
ContextKV cache (f16)Flat formulaOverstated byFull / windowed / recurrent
4,0960.50 GiB0.50 GiB32 / 0 / 0
8,1921.00 GiB1.00 GiB32 / 0 / 0
16,3842.00 GiB2.00 GiB32 / 0 / 0
32,7684.00 GiB4.00 GiB32 / 0 / 0
65,5368.00 GiB8.00 GiB32 / 0 / 0
131,07216.00 GiB16.00 GiB32 / 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 4.21 GiB. The real file is 4.58 GiB, because a quantization is a mixture and some tensors are always kept at higher precision.

Architecture

from mirror:NousResearch/Meta-Llama-3-8B
Layers
32
Attention heads
32
KV heads
8
Head dim
128
Hidden size
4096
Vocab
128,256
Sliding window
none
SWA period
MLA
no
Experts
Experts per token
use_sliding_window

Questions people ask

How much VRAM does Meta-Llama-3-8B need?
Q4_K_M is exactly 4,920,733,536 bytes (4.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 Meta-Llama-3-8B's KV cache?
4.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 Meta-Llama-3-8B 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.