meta-llama · text

Meta-Llama-3-8B-Instruct

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

Meta-Llama-3-8B-Instruct at Q4_K_M is exactly 4,920,733,888 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-Instruct)
Parameters
8.0B
Architecture
llama
32 layers
Context
8,192
native (config.json)
License

Shipped quantizations

exact bytes, summed from published files
QuantSizeExact bytesEffective bpwTensorsPublisher
IQ1_S1.88 GiB2,020,140,2562.013MaziyarPanahi
IQ1_M2.01 GiB2,162,484,4482.154MaziyarPanahi
IQ2_XS2.43 GiB2,606,294,2402.596MaziyarPanahi
Q2_K2.96 GiB3,179,131,4563.167QuantFactory
Q2_K2.96 GiB3,179,644,1283.168MaziyarPanahi
IQ3_XS3.28 GiB3,519,259,8723.506MaziyarPanahi
Q3_K_S3.41 GiB3,664,499,2643.651QuantFactory
Q3_K_S3.41 GiB3,665,011,9363.651MaziyarPanahi
IQ3_M3.52 GiB3,784,822,9763.771lmstudio-community
Q3_K_M3.74 GiB4,018,917,9524.004291QuantFactory
Q3_K_M3.74 GiB4,019,430,6244.004MaziyarPanahi
Q3_K_L4.03 GiB4,321,956,4164.306QuantFactory
Q3_K_L4.03 GiB4,322,469,0884.306MaziyarPanahi
IQ4_XS4.14 GiB4,448,175,3284.431291MaziyarPanahi
Q4_04.34 GiB4,661,211,7124.644291QuantFactory
Q4_K_S4.37 GiB4,692,668,9924.675QuantFactory
Q4_K_S4.37 GiB4,693,181,6644.676MaziyarPanahi
Q4_K_M4.58 GiB4,920,733,8884.902291lmstudio-community
Q4_K_M4.58 GiB4,920,734,2724.902QuantFactory
Q4_K_M4.58 GiB4,921,246,9444.903MaziyarPanahi
Q4_14.78 GiB5,130,252,8645.111QuantFactory
Q5_05.21 GiB5,599,294,0165.578QuantFactory
Q5_K_S5.21 GiB5,599,294,0165.578QuantFactory
Q5_K_S5.22 GiB5,599,806,6885.579MaziyarPanahi
Q5_K_M5.34 GiB5,732,987,0725.711291lmstudio-community
Q5_K_M5.34 GiB5,732,987,4565.711QuantFactory
Q5_K_M5.34 GiB5,733,500,1285.712MaziyarPanahi
Q5_15.65 GiB6,068,335,1686.045QuantFactory
Q6_K6.14 GiB6,596,006,0806.571291lmstudio-community
Q6_K6.14 GiB6,596,006,4646.571QuantFactory
Q6_K6.14 GiB6,596,519,1366.572MaziyarPanahi
Q8_07.95 GiB8,540,770,4968.509291lmstudio-community
Q8_07.95 GiB8,540,770,8808.509QuantFactory
Q8_07.95 GiB8,541,283,5528.509MaziyarPanahi

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-Instruct
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-Instruct need?
Q4_K_M is exactly 4,920,733,888 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-Instruct'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-Instruct 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.