zai-org · text

glm-4-9b-chat-1m

zai-org/glm-4-9b-chat-1m

glm-4-9b-chat-1m at Q4_K_M is exactly 6,308,679,680 bytes (5.88 GiB / 6.31 GB) — an effective 5.322 bits per weight, not the nominal 4. Its KV cache at 32K is 20.00 GiB.

From the file· summed from 1 file(s)From the file· KV per layer
Parameters
9.5B
Architecture
chatglm
40 layers
Context
native (config.json)
License
other

Shipped quantizations

exact bytes, summed from published files
QuantSizeExact bytesEffective bpwTensorsPublisher
IQ2_M3.69 GiB3,958,493,9843.339bartowski
Q2_K3.74 GiB4,019,504,3203.391legraphista
Q2_K3.74 GiB4,019,507,2003.391second-state
Q2_K3.74 GiB4,019,508,0003.391bartowski
IQ3_XS4.16 GiB4,465,771,7123.767legraphista
IQ3_XS4.16 GiB4,465,775,3923.767bartowski
IQ3_S4.31 GiB4,623,549,6323.900legraphista
Q3_K_S4.31 GiB4,623,549,6323.900legraphista
Q3_K_S4.31 GiB4,623,552,5123.900second-state
Q3_K_S4.31 GiB4,623,553,3123.900bartowski
Q2_K_L4.31 GiB4,625,716,0003.902bartowski
IQ3_M4.53 GiB4,859,151,5524.099legraphista
IQ3_M4.53 GiB4,859,155,2324.099bartowski
Q3_K4.76 GiB5,111,596,2244.312legraphista
Q3_K_M4.76 GiB5,111,599,1044.312second-state
Q3_K_M4.76 GiB5,111,599,9044.312bartowski
IQ4_XS4.93 GiB5,295,756,0644.467bartowski
Q3_K_L4.96 GiB5,328,716,9924.495legraphista
Q3_K_L4.96 GiB5,328,719,8724.495second-state
Q3_K_L4.96 GiB5,328,720,6724.495bartowski
IQ4_XS4.98 GiB5,348,345,0244.511legraphista
Q4_05.12 GiB5,502,586,8804.642second-state
Q4_05.14 GiB5,520,118,5604.656bartowski
IQ4_NL5.17 GiB5,555,176,6404.686legraphista
Q4_K_S5.40 GiB5,800,608,9604.893legraphista
Q4_K_S5.40 GiB5,800,611,8404.893second-state
Q4_K_S5.40 GiB5,800,612,6404.893bartowski
Q4_K5.88 GiB6,308,676,8005.322legraphista
Q4_K_M5.88 GiB6,308,679,6805.322second-state
Q4_K_M5.88 GiB6,308,680,4805.322bartowski
Q5_06.16 GiB6,610,407,4245.576second-state
Q5_K_S6.29 GiB6,750,651,5845.694legraphista
Q5_K_S6.29 GiB6,750,654,4645.694second-state
Q5_K_S6.29 GiB6,750,655,2645.694bartowski
Q4_K_L6.30 GiB6,769,398,5605.710bartowski
Q5_K6.72 GiB7,212,680,3846.084legraphista
Q5_K_M6.72 GiB7,212,683,2646.084second-state
Q5_K_M6.72 GiB7,212,684,0646.084bartowski
Q5_K_L7.07 GiB7,595,807,5206.407bartowski
Q6_K7.76 GiB8,330,921,1527.027legraphista

KV cache by context

computed per layer
ContextKV cache (f16)Flat formulaOverstated byFull / windowed / recurrent
4,0962.50 GiB2.50 GiB40 / 0 / 0
8,1925.00 GiB5.00 GiB40 / 0 / 0
16,38410.00 GiB10.00 GiB40 / 0 / 0
32,76820.00 GiB20.00 GiB40 / 0 / 0
65,53640.00 GiB40.00 GiB40 / 0 / 0
131,07280.00 GiB80.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.97 GiB. The real file is 5.88 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
32
Head dim
128
Hidden size
4096
Vocab
Sliding window
none
SWA period
MLA
no
Experts
Experts per token
use_sliding_window

Questions people ask

How much VRAM does glm-4-9b-chat-1m need?
Q4_K_M is exactly 6,308,679,680 bytes (5.88 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-chat-1m's KV cache?
20.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 glm-4-9b-chat-1m 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.