jtl11 · text · mixture of experts

GLM-4.7-Flash-heretic

jtl11/GLM-4.7-Flash-heretic

GLM-4.7-Flash-heretic at Q4_K_M is exactly 18,540,437,472 bytes (17.27 GiB / 18.54 GB) — an effective 4.954 bits per weight, not the nominal 4. Its KV cache at 32K is 1.65 GiB.

From the file· summed from 1 file(s)From the file· KV per layer
Parameters
29.9B
total, not active
Architecture
deepseek2
47 layers
Context
202,752
native (config.json)
License
mit

Shipped quantizations

exact bytes, summed from published files
QuantSizeExact bytesEffective bpwTensorsPublisher
IQ2_XXS7.95 GiB8,540,016,6082.282bartowski
IQ2_XS8.77 GiB9,412,087,7762.515bartowski
IQ2_S8.96 GiB9,618,290,6562.570bartowski
IQ2_M9.80 GiB10,521,819,1042.811bartowski
Q2_K10.34 GiB11,107,803,1042.968bartowski
Q2_K_L10.63 GiB11,417,563,1043.050bartowski
IQ3_XXS12.06 GiB12,952,842,2083.461bartowski
IQ3_XS12.45 GiB13,371,027,4243.572bartowski
Q3_K_S12.61 GiB13,544,468,4483.619bartowski
Q3_K_M13.17 GiB14,138,126,3043.777bartowski
Q3_K_L13.50 GiB14,499,262,4323.874bartowski
IQ3_M13.60 GiB14,606,938,0803.902bartowski
IQ4_XS15.19 GiB16,315,498,4644.359bartowski
IQ4_NL16.03 GiB17,214,611,4244.599bartowski
Q4_016.20 GiB17,393,999,8404.647bartowski
Q4_K_S16.62 GiB17,841,160,1604.767bartowski
Q4_K_M17.27 GiB18,540,437,4724.954bartowski
Q4_K_L17.49 GiB18,775,855,0725.016bartowski
Q4_117.65 GiB18,950,668,2565.063bartowski
Q5_K_S19.48 GiB20,913,528,8005.588bartowski
Q5_K_M20.15 GiB21,631,707,1045.779bartowski
Q5_K_L20.33 GiB21,827,475,4245.832bartowski
Q6_K24.12 GiB25,898,545,1206.919bartowski
Q6_K_L24.26 GiB26,052,186,0806.960bartowski
Q8_029.66 GiB31,842,799,5848.508bartowski
BF162 shards55.79 GiB59,908,837,24816.006bartowski

KV cache by context

computed per layer
ContextKV cache (f16)Flat formulaOverstated byFull / windowed / recurrent
4,0960.21 GiB3.67 GiB17.78×47 / 0 / 0
8,1920.41 GiB7.34 GiB17.78×47 / 0 / 0
16,3840.83 GiB14.69 GiB17.78×47 / 0 / 0
32,7681.65 GiB29.38 GiB17.78×47 / 0 / 0
65,5363.30 GiB58.75 GiB17.78×47 / 0 / 0
131,0726.61 GiB117.50 GiB17.78×47 / 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 Q4_K_M at roughly 15.69 GiB. The real file is 17.27 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
47
Attention heads
20
KV heads
20
Head dim
256
Hidden size
2048
Vocab
154,880
Sliding window
none
SWA period
MLA
yes
Experts
64
Experts per token
4
use_sliding_window

Questions people ask

How much VRAM does GLM-4.7-Flash-heretic need?
Q4_K_M is exactly 18,540,437,472 bytes (17.27 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-Flash-heretic's KV cache?
1.65 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-Flash-heretic a mixture-of-experts model?
Yes — 64 experts, 4 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-Flash-heretic 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.