zai-org · text

GLM-OCR

zai-org/GLM-OCR

GLM-OCR at Q4_K_M is exactly 548,515,136 bytes (0.51 GiB / 0.55 GB) — an effective 3.311 bits per weight, not the nominal 4. Its KV cache at 32K is 2.00 GiB.

From the file· summed from 1 file(s)From the file· KV per layer
Parameters
1.3B
Architecture
glm4
16 layers
Context
131,072
native (config.json)
License

Shipped quantizations

exact bytes, summed from published files
QuantSizeExact bytesEffective bpwTensorsPublisher
Q2_K0.34 GiB361,356,6082.181mradermacher
I1-Q2_K0.34 GiB361,356,8322.181mradermacher
I1-IQ3_XS0.38 GiB410,496,5442.478mradermacher
Q3_K_S0.39 GiB422,219,0722.549mradermacher
I1-Q3_K_S0.39 GiB422,219,2962.549mradermacher
I1-IQ3_S0.39 GiB422,219,2962.549mradermacher
I1-IQ3_M0.40 GiB434,753,0562.624mradermacher
Q3_K_M0.42 GiB450,131,2642.717mradermacher
I1-Q3_K_M0.42 GiB450,131,4882.717mradermacher
Q3_K_L0.44 GiB473,920,8322.861mradermacher
I1-Q3_K_L0.44 GiB473,921,0562.861mradermacher
I1-IQ4_XS0.47 GiB503,449,1203.039mradermacher
IQ4_XS0.47 GiB505,660,7363.053mradermacher
I1-IQ4_NL0.49 GiB528,442,9123.190mradermacher
I1-Q4_00.49 GiB529,327,6483.195mradermacher
Q4_K_S0.49 GiB530,998,5923.205mradermacher
I1-Q4_K_S0.49 GiB530,998,8163.205mradermacher
Q4_K_M0.51 GiB548,515,1363.311mradermacher
I1-Q4_K_M0.51 GiB548,515,3603.311mradermacher
I1-Q4_10.54 GiB578,430,4963.492mradermacher
Q5_K_S0.59 GiB628,417,8563.793mradermacher
I1-Q5_K_S0.59 GiB628,418,0803.793mradermacher
Q5_K_M0.59 GiB638,758,2083.856mradermacher
I1-Q5_K_M0.59 GiB638,758,4323.856mradermacher
Q6_K0.68 GiB734,641,4724.435mradermacher
I1-Q6_K0.68 GiB734,641,6964.435mradermacher
Q8_00.89 GiB950,433,4085.737ggml-org
Q8_00.89 GiB950,437,1845.737mradermacher
F161.66 GiB1,785,771,64810.780ggml-org
F161.66 GiB1,785,775,42410.780mradermacher

KV cache by context

computed per layer
ContextKV cache (f16)Flat formulaOverstated byFull / windowed / recurrent
4,0960.25 GiB0.25 GiB16 / 0 / 0
8,1920.50 GiB0.50 GiB16 / 0 / 0
16,3841.00 GiB1.00 GiB16 / 0 / 0
32,7682.00 GiB2.00 GiB16 / 0 / 0
65,5364.00 GiB4.00 GiB16 / 0 / 0
131,0728.00 GiB8.00 GiB16 / 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 0.69 GiB. The real file is 0.51 GiB, because a quantization is a mixture and some tensors are always kept at higher precision.

Architecture

from config.json
Layers
16
Attention heads
16
KV heads
8
Head dim
128
Hidden size
1536
Vocab
59,392
Sliding window
none
SWA period
MLA
no
Experts
Experts per token
use_sliding_window

Questions people ask

How much VRAM does GLM-OCR need?
Q4_K_M is exactly 548,515,136 bytes (0.51 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-OCR's KV cache?
2.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-OCR 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.