bullerwins · text

Codestral-22B-v0.1-hf

bullerwins/Codestral-22B-v0.1-hf

Codestral-22B-v0.1-hf at Q4_K_M is exactly 13,341,237,632 bytes (12.42 GiB / 13.34 GB) — an effective 4.797 bits per weight, not the nominal 4. Its KV cache at 32K is 7.00 GiB.

From the file· summed from 1 file(s)From the file· KV per layer
Parameters
22.2B
Architecture
llama
56 layers
Context
32,768
native (config.json)
License

Shipped quantizations

exact bytes, summed from published files
QuantSizeExact bytesEffective bpwTensorsPublisher
IQ1_S4.50 GiB4,829,487,4881.737MaziyarPanahi
IQ1_M4.91 GiB5,267,136,8961.894MaziyarPanahi
IQ2_XS6.19 GiB6,646,145,4082.390MaziyarPanahi
Q2_K7.70 GiB8,272,093,5682.975MaziyarPanahi
IQ3_XS8.55 GiB9,176,097,1523.300MaziyarPanahi
Q3_K_S8.98 GiB9,641,271,6803.467MaziyarPanahi
Q3_K_M10.02 GiB10,756,825,4723.868MaziyarPanahi
Q3_K_L10.92 GiB11,730,428,2884.218MaziyarPanahi
IQ4_XS11.12 GiB11,935,293,8244.292MaziyarPanahi
Q4_K_S11.79 GiB12,660,384,1284.553MaziyarPanahi
Q4_K_M12.42 GiB13,341,237,6324.797MaziyarPanahi
Q5_K_S14.27 GiB15,324,815,7445.511MaziyarPanahi
Q5_K_M14.64 GiB15,722,553,7285.654MaziyarPanahi
Q6_K17.00 GiB18,252,702,0806.564MaziyarPanahi
Q8_022.02 GiB23,640,547,7128.501MaziyarPanahi

KV cache by context

computed per layer
ContextKV cache (f16)Flat formulaOverstated byFull / windowed / recurrent
4,0960.88 GiB0.88 GiB56 / 0 / 0
8,1921.75 GiB1.75 GiB56 / 0 / 0
16,3843.50 GiB3.50 GiB56 / 0 / 0
32,7687.00 GiB7.00 GiB56 / 0 / 0
65,53614.00 GiB14.00 GiB56 / 0 / 0
131,07228.00 GiB28.00 GiB56 / 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 11.65 GiB. The real file is 12.42 GiB, because a quantization is a mixture and some tensors are always kept at higher precision.

Architecture

from config.json
Layers
56
Attention heads
48
KV heads
8
Head dim
128
Hidden size
6144
Vocab
32,768
Sliding window
none
SWA period
MLA
no
Experts
Experts per token
use_sliding_window

Questions people ask

How much VRAM does Codestral-22B-v0.1-hf need?
Q4_K_M is exactly 13,341,237,632 bytes (12.42 GiB) in weights. Add the KV cache, which depends on your context length, plus roughly half a gigabyte of runtime overhead.
How large is Codestral-22B-v0.1-hf's KV cache?
7.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 Codestral-22B-v0.1-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.