zai-org · text · mixture of experts

GLM-4.7

zai-org/GLM-4.7

GLM-4.7 at Q4_K_M is exactly 216,455,572,576 bytes (201.59 GiB / 216.46 GB) — an effective 4.832 bits per weight, not the nominal 4. Its KV cache at 32K is 11.50 GiB.

From the file· summed from 5 file(s)From the file· KV per layer
Parameters
358B
total, not active
Architecture
glm4moe
92 layers
Context
202,752
native (config.json)
License
mit

Shipped quantizations

exact bytes, summed from published files
QuantSizeExact bytesEffective bpwTensorsPublisher
IQ1_S2 shards71.50 GiB76,767,410,4641.714bartowski
IQ1_M3 shards74.53 GiB80,024,529,3121.787bartowski
UD-TQ1_078.69 GiB84,494,125,6641.886unsloth
IQ2_XXS3 shards82.69 GiB88,785,566,0801.982bartowski
UD-IQ1_S2 shards90.50 GiB97,175,341,8562.170unsloth
IQ2_XS3 shards94.53 GiB101,503,891,8402.266bartowski
IQ2_S3 shards95.29 GiB102,314,080,6722.284bartowski
UD-IQ1_M3 shards100.27 GiB107,659,012,9922.404unsloth
IQ2_M3 shards107.57 GiB115,504,265,6322.579bartowski
UD-IQ2_XXS3 shards107.95 GiB115,912,821,6642.588unsloth
UD-IQ2_M3 shards114.03 GiB122,440,207,2642.733unsloth
Q2_K4 shards118.86 GiB127,623,776,8002.849bartowski
Q2_K_L4 shards119.56 GiB128,381,536,8002.866bartowski
Q2_K3 shards122.15 GiB131,159,649,1522.928unsloth
Q2_K_L3 shards122.32 GiB131,341,511,5522.932unsloth
IQ3_XXS4 shards132.93 GiB142,733,060,6403.187bartowski
UD-IQ3_XXS3 shards135.15 GiB145,120,517,0243.240unsloth
IQ3_XS4 shards138.48 GiB148,687,047,2003.320bartowski
Q3_K_S4 shards144.38 GiB155,021,880,3203.461unsloth
Q3_K_S4 shards146.52 GiB157,319,981,5683.512bartowski
IQ3_M5 shards153.45 GiB164,764,174,9763.678bartowski
Q3_K_M5 shards153.63 GiB164,954,966,6563.683bartowski
Q3_K_L5 shards158.87 GiB170,584,017,5683.808bartowski
Q3_K_M4 shards159.51 GiB171,268,787,2323.824unsloth
IQ4_XS4 shards178.41 GiB191,562,951,7124.277unsloth
IQ4_XS5 shards179.45 GiB192,678,005,3764.302bartowski
IQ4_NL5 shards188.55 GiB202,456,345,7284.520unsloth
Q4_05 shards189.09 GiB203,036,339,3284.533unsloth
IQ4_NL6 shards189.62 GiB203,602,938,6244.545bartowski
Q4_K_S5 shards189.69 GiB203,679,902,8484.547unsloth
Q4_06 shards192.31 GiB206,494,059,2644.610bartowski
Q4_K_S6 shards196.30 GiB210,778,802,9444.706bartowski
Q4_K_M5 shards201.59 GiB216,455,572,5764.832unsloth
Q4_K_M6 shards203.52 GiB218,524,687,1364.879bartowski
Q4_K_L6 shards204.05 GiB219,100,584,7044.891bartowski
Q4_15 shards209.18 GiB224,605,547,6485.014unsloth
Q4_16 shards209.72 GiB225,189,350,1125.027bartowski
Q5_K_S5 shards230.04 GiB247,003,704,4485.514unsloth
Q5_K_S7 shards230.45 GiB247,443,676,0325.524bartowski
Q5_K_M6 shards236.79 GiB254,246,825,2485.676unsloth

KV cache by context

computed per layer
ContextKV cache (f16)Flat formulaOverstated byFull / windowed / recurrent
4,0961.44 GiB1.44 GiB92 / 0 / 0
8,1922.88 GiB2.88 GiB92 / 0 / 0
16,3845.75 GiB5.75 GiB92 / 0 / 0
32,76811.50 GiB11.50 GiB92 / 0 / 0
65,53623.00 GiB23.00 GiB92 / 0 / 0
131,07246.00 GiB46.00 GiB92 / 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 187.72 GiB. The real file is 201.59 GiB, because a quantization is a mixture and some tensors are always kept at higher precision.

Architecture

from config.json
Layers
92
Attention heads
96
KV heads
8
Head dim
128
Hidden size
5120
Vocab
151,552
Sliding window
none
SWA period
MLA
no
Experts
160
Experts per token
8
use_sliding_window

Questions people ask

How much VRAM does GLM-4.7 need?
Q4_K_M is exactly 216,455,572,576 bytes (201.59 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.7's KV cache?
11.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 GLM-4.7 a mixture-of-experts model?
Yes — 160 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-4.7 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.