ibm-granite · text · mixture of experts

granite-4.0-h-small

ibm-granite/granite-4.0-h-small

granite-4.0-h-small at Q4_K_M is exactly 19,476,621,984 bytes (18.14 GiB / 19.48 GB) — an effective 4.838 bits per weight, not the nominal 4. Its KV cache at 32K is 0.50 GiB.

From the file· summed from 1 file(s)From the file· KV per layer
Parameters
32.2B
total, not active
Architecture
granitehybrid
40 layers
Context
131,072
native (config.json)
License

Shipped quantizations

exact bytes, summed from published files
QuantSizeExact bytesEffective bpwTensorsPublisher
IQ2_XXS7.59 GiB8,147,200,6402.024bartowski
IQ2_XS8.65 GiB9,290,017,4082.308bartowski
IQ2_S8.66 GiB9,298,406,0162.310bartowski
IQ2_M9.75 GiB10,467,764,8642.600bartowski
Q2_K10.93 GiB11,736,263,2962.915bartowski
Q2_K10.97 GiB11,779,386,0162.926ibm-granite
Q2_K_L11.02 GiB11,835,812,4802.940bartowski
IQ3_XXS12.22 GiB13,120,268,9283.259bartowski
IQ3_XS12.83 GiB13,777,037,9523.422bartowski
Q3_K_S13.09 GiB14,053,075,6163.491ibm-granite
Q3_K_S13.43 GiB14,417,193,6003.581bartowski
IQ3_M13.99 GiB15,021,042,3043.731bartowski
Q3_K_M13.99 GiB15,022,090,8803.731bartowski
Q3_K_M14.31 GiB15,360,125,6003.815ibm-granite
Q3_K_L14.50 GiB15,572,068,9923.868bartowski
Q3_K_L15.34 GiB16,475,286,1764.092ibm-granite
IQ4_XS16.35 GiB17,559,890,5604.362bartowski
Q4_017.02 GiB18,274,167,4564.539ibm-granite
Q4_K_S17.16 GiB18,421,754,5284.576ibm-granite
IQ4_NL17.25 GiB18,526,874,2404.602bartowski
Q4_017.51 GiB18,801,601,1524.670bartowski
Q4_K_S17.78 GiB19,095,202,4324.743bartowski
Q4_K_M18.14 GiB19,476,621,9844.838ibm-granite
Q4_K_M18.39 GiB19,747,023,4884.905bartowski
Q4_K_L18.48 GiB19,846,572,6724.930bartowski
Q4_118.87 GiB20,260,563,6165.032ibm-granite
Q4_119.05 GiB20,456,647,2965.081bartowski
Q5_K_S20.72 GiB22,246,959,7765.526ibm-granite
Q5_020.72 GiB22,246,959,7765.526ibm-granite
Q5_K_S20.90 GiB22,444,944,0005.575bartowski
Q5_K_M21.30 GiB22,866,406,0485.680ibm-granite
Q5_K_M21.55 GiB23,139,101,3125.747bartowski
Q5_K_L21.64 GiB23,238,650,4965.772bartowski
Q5_122.57 GiB24,233,355,9366.019ibm-granite
Q6_K24.65 GiB26,468,051,6166.574ibm-granite
Q6_K24.82 GiB26,654,960,2566.621bartowski
Q6_K_L24.92 GiB26,754,509,4406.646bartowski
Q8_031.91 GiB34,264,885,8888.511bartowski
Q8_031.91 GiB34,264,885,9208.511ibm-granite
BF162 shards60.02 GiB64,446,179,87216.008bartowski

KV cache by context

computed per layer
ContextKV cache (f16)Flat formulaOverstated byFull / windowed / recurrent
4,0960.06 GiB0.63 GiB9.98×4 / 0 / 36
8,1920.13 GiB1.25 GiB9.99×4 / 0 / 36
16,3840.25 GiB2.50 GiB9.99×4 / 0 / 36
32,7680.50 GiB5.00 GiB10.00×4 / 0 / 36
65,5361.00 GiB10.00 GiB10.00×4 / 0 / 36
131,0722.00 GiB20.00 GiB10.00×4 / 0 / 36

36 of 40 layers use linear attention, which keeps a fixed-size recurrent state instead of a per-token cache. Those layers do not grow with context at all — treating them as ordinary attention, as a flat formula does, overstates this model's cache by roughly 10.0× at long context.

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 16.87 GiB. The real file is 18.14 GiB, because a quantization is a mixture and some tensors are always kept at higher precision.

Architecture

from config.json
Layers
40
Attention heads
32
KV heads
8
Head dim
128
Hidden size
4096
Vocab
100,352
Sliding window
none
SWA period
MLA
no
Experts
72
Experts per token
10
use_sliding_window

Questions people ask

How much VRAM does granite-4.0-h-small need?
Q4_K_M is exactly 19,476,621,984 bytes (18.14 GiB) in weights. Add the KV cache, which depends on your context length, plus roughly half a gigabyte of runtime overhead.
How large is granite-4.0-h-small's KV cache?
0.50 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.
Is granite-4.0-h-small a mixture-of-experts model?
Yes — 72 experts, 10 routed per token. Every expert must be resident, but only the routed ones are read per token, which is why its memory requirement and its speed behave very differently.
Which quantization of granite-4.0-h-small 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.