zai-org · text

GLM-4-9B-0414

zai-org/GLM-4-9B-0414

GLM-4-9B-0414 at Q4_K_M is exactly 6,166,574,208 bytes (5.74 GiB / 6.17 GB) — an effective 5.248 bits per weight, not the nominal 4. Its KV cache at 32K is 1.25 GiB.

From the file· summed from 1 file(s)From the file· KV per layer
Parameters
9.4B
Architecture
glm4
40 layers
Context
32,768
native (config.json)
License
mit

Shipped quantizations

exact bytes, summed from published files
QuantSizeExact bytesEffective bpwTensorsPublisher
UD-IQ1_S2.98 GiB3,204,200,2882.727unsloth
UD-IQ1_M3.09 GiB3,318,151,0082.824unsloth
UD-IQ2_XXS3.27 GiB3,511,154,5282.988unsloth
IQ2_M3.68 GiB3,946,313,0883.358bartowski
UD-IQ2_M3.72 GiB3,992,024,9283.397unsloth
Q2_K3.73 GiB4,006,344,0643.410bartowski
Q2_K3.73 GiB4,006,344,5443.410unsloth
Q2_K_L3.87 GiB4,151,834,4643.533unsloth
IQ3_XXS3.94 GiB4,226,807,1683.597bartowski
UD-IQ3_XXS3.94 GiB4,234,835,8083.604unsloth
IQ3_XS4.10 GiB4,406,408,5763.750bartowski
Q3_K_S4.28 GiB4,592,039,2963.908bartowski
Q3_K_S4.28 GiB4,592,039,7763.908unsloth
Q2_K_L4.30 GiB4,612,552,0643.925bartowski
IQ3_M4.40 GiB4,721,800,5764.018bartowski
Q3_K_M4.63 GiB4,974,507,3924.234bartowski
Q3_K_M4.63 GiB4,974,507,8724.234unsloth
Q3_K_L4.84 GiB5,196,608,6404.423lmstudio-community
Q3_K_L4.84 GiB5,196,608,8964.423bartowski
IQ4_XS4.90 GiB5,262,275,9684.478bartowski
IQ4_XS4.92 GiB5,281,675,1044.495unsloth
IQ4_NL5.09 GiB5,465,175,4244.651bartowski
IQ4_NL5.09 GiB5,465,175,9044.651unsloth
Q4_05.10 GiB5,477,463,4244.662bartowski
Q4_05.10 GiB5,477,463,9044.662unsloth
Q4_K_S5.36 GiB5,758,481,7924.901bartowski
Q4_K_S5.36 GiB5,758,482,2724.901unsloth
Q4_15.60 GiB6,008,599,9365.114bartowski
Q4_15.60 GiB6,008,600,4165.114unsloth
Q4_K_M5.74 GiB6,166,574,2085.248lmstudio-community
Q4_K_M5.74 GiB6,166,574,4645.248bartowski
Q4_K_M5.74 GiB6,166,574,9445.248unsloth
Q4_K_L6.17 GiB6,627,292,5445.640bartowski
Q5_K_S6.24 GiB6,697,514,3685.700bartowski
Q5_K_S6.24 GiB6,697,514,8485.700unsloth
Q5_K_M6.57 GiB7,050,917,2486.001bartowski
Q5_K_M6.57 GiB7,050,917,7286.001unsloth
Q5_K_L6.92 GiB7,434,040,7046.327bartowski
Q6_K7.70 GiB8,266,642,5607.035lmstudio-community
Q6_K7.70 GiB8,266,642,8167.035bartowski

KV cache by context

computed per layer
ContextKV cache (f16)Flat formulaOverstated byFull / windowed / recurrent
4,0960.16 GiB0.16 GiB40 / 0 / 0
8,1920.31 GiB0.31 GiB40 / 0 / 0
16,3840.63 GiB0.63 GiB40 / 0 / 0
32,7681.25 GiB1.25 GiB40 / 0 / 0
65,5362.50 GiB2.50 GiB40 / 0 / 0
131,0725.00 GiB5.00 GiB40 / 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.92 GiB. The real file is 5.74 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
2
Head dim
128
Hidden size
4096
Vocab
151,552
Sliding window
none
SWA period
MLA
no
Experts
Experts per token
use_sliding_window

Questions people ask

How much VRAM does GLM-4-9B-0414 need?
Q4_K_M is exactly 6,166,574,208 bytes (5.74 GiB) in weights. Add the KV cache, which depends on your context length, plus roughly half a gigabyte of runtime overhead.
How large is GLM-4-9B-0414's KV cache?
1.25 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 GLM-4-9B-0414 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.