Olafangensan · text · mixture of experts

GLM-4.7-Flash-heretic

Olafangensan/GLM-4.7-Flash-heretic

GLM-4.7-Flash-heretic at Q4_K_M is exactly 18,506,911,680 bytes (17.24 GiB / 18.51 GB) — an effective 4.944 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_M9.61 GiB10,314,638,2722.756DavidAU
IQ2_M9.61 GiB10,314,638,2722.756servantofares
IQ3_M12.65 GiB13,585,456,0643.630DavidAU
IQ3_M12.65 GiB13,585,456,0643.630servantofares
IQ4_XS15.28 GiB16,407,478,2084.384844DavidAU
IQ4_XS15.28 GiB16,407,478,2084.384servantofares
IQ4_NL16.14 GiB17,330,212,8004.630servantofares
IQ4_NL16.14 GiB17,330,212,8004.630DavidAU
Q4_K_S16.25 GiB17,446,621,1204.661DavidAU
Q4_K_S16.25 GiB17,446,621,1204.661servantofares
Q4_K_M17.24 GiB18,506,911,6804.944DavidAU
Q4_K_M17.24 GiB18,506,911,6804.944servantofares
Q4_117.86 GiB19,181,457,3445.125servantofares
Q4_117.86 GiB19,181,457,3445.125DavidAU
Q5_K_S19.59 GiB21,038,477,2485.621servantofares
Q5_K_S19.59 GiB21,038,477,2485.621DavidAU
Q5_K_M20.15 GiB21,638,705,0885.781844servantofares
Q5_K_M20.15 GiB21,638,705,0885.781DavidAU
Q5_121.31 GiB22,883,946,4326.114servantofares
Q5_121.31 GiB22,883,946,4326.114DavidAU
Q6_K23.27 GiB24,988,976,0646.676844servantofares
Q6_K23.27 GiB24,988,976,0646.676DavidAU
Q4_K_M24.06 GiB25,837,564,9606.9031186DavidAU
Q5_129.75 GiB31,945,585,6968.535DavidAU
Q8_029.93 GiB32,140,169,1528.587DavidAU
Q8_029.93 GiB32,140,169,1528.587844servantofares

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.24 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,506,911,680 bytes (17.24 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.