zai-org · text · mixture of experts

GLM-5.2

zai-org/GLM-5.2

GLM-5.2 at Q3_K_M is exactly 181,814,784,128 bytes (169.33 GiB / 181.81 GB) — an effective 1.931 bits per weight, not the nominal 3. Its KV cache at 32K is 2.74 GiB.

From the file· summed from 5 file(s)From the file· KV per layer
Parameters
753B
total, not active
Architecture
glm-dsa
78 layers
Context
1,048,576
native (config.json)
License
mit

Shipped quantizations

exact bytes, summed from published files
QuantSizeExact bytesEffective bpwTensorsPublisher
Q3_K_M5 shards169.33 GiB181,814,784,1281.931pipenetwork
UD-IQ1_S6 shards201.15 GiB215,979,457,5042.294huihui-ai
UD-IQ1_S6 shards201.83 GiB216,715,360,9602.301unsloth
UD-IQ1_M6 shards212.80 GiB228,492,966,6242.426unsloth
UD-IQ1_M6 shards215.35 GiB231,226,309,5362.455huihui-ai
UD-IQ2_XXS6 shards222.08 GiB238,458,632,9282.532unsloth
UD-IQ2_M6 shards222.19 GiB238,577,580,7682.534unsloth
UD-IQ3_XXS7 shards262.34 GiB281,688,431,4242.991unsloth
UD-IQ3_S8 shards287.44 GiB308,641,029,0243.278unsloth
UD-Q3_K_M9 shards319.20 GiB342,735,510,6563.640unsloth
UD-Q3_K_M9 shards319.20 GiB342,735,510,9443.640huihui-ai
UD-IQ4_XS9 shards340.22 GiB365,313,223,7763.879unsloth
UD-IQ4_NL9 shards347.07 GiB372,661,644,3843.958unsloth
UD-Q4_K_S10 shards406.46 GiB436,431,842,4324.635unsloth
UD-Q4_K_M11 shards433.83 GiB465,825,525,0884.947unsloth
UD-Q5_K_S12 shards491.05 GiB527,259,270,5285.599unsloth
UD-Q5_K_M13 shards522.31 GiB560,830,479,9045.956unsloth
UD-Q6_K14 shards582.88 GiB625,858,969,3766.646unsloth
Q8_017 shards746.32 GiB801,357,672,2568.510unsloth
BF1633 shards1404.42 GiB1,507,988,023,00816.014unsloth

KV cache by context

computed per layer
ContextKV cache (f16)Flat formulaOverstated byFull / windowed / recurrent
4,0960.34 GiB19.50 GiB56.89×78 / 0 / 0
8,1920.69 GiB39.00 GiB56.89×78 / 0 / 0
16,3841.37 GiB78.00 GiB56.89×78 / 0 / 0
32,7682.74 GiB156.00 GiB56.89×78 / 0 / 0
65,5365.48 GiB312.00 GiB56.89×78 / 0 / 0
131,07210.97 GiB624.00 GiB56.89×78 / 0 / 0

This model uses multi-head latent attention. No V cache is allocated at all, and the K cache stores a 512-wide latent plus 64 rope dimensions — so reading num_key_value_heads from config.json and multiplying, as every calculator does, overstates the cache by well over an order of magnitude.

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 Q3_K_M at roughly 394.65 GiB. The real file is 169.33 GiB, because a quantization is a mixture and some tensors are always kept at higher precision. The larger discrepancy is the cache: this model allocates no value cache at all, so any formula reading num_key_value_heads overstates it by more than an order of magnitude.

Architecture

from config.json
Layers
78
Attention heads
64
KV heads
64
Head dim
256
Hidden size
6144
Vocab
154,880
Sliding window
none
SWA period
MLA
yes
Experts
256
Experts per token
8
use_sliding_window

Questions people ask

How much VRAM does GLM-5.2 need?
Q3_K_M is exactly 181,814,784,128 bytes (169.33 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-5.2's KV cache?
2.74 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 GLM-5.2 a mixture-of-experts model?
Yes — 256 experts, 8 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 GLM-5.2 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.