MODEL CARD INCOMPLETE
BENCHMARKS PENDING
!!! quantized for use with ik_llama.cpp and its derivatives !!!
!!! incompatible with mainline llama.cpp as of commit #34af94c !!!
What's that?
An experimental, English-roleplay-oriented, ik_llama.cpp-only MuXodious/GLM-4.7-Flash-absolute-heresy quantization for users who want an IQ3_M-sized file but prefer to spend precision on MLA, routing, shared experts, and output-sensitive tensors.
Rationale
I wanted a quant that would fit my GPU with some context and minimal offload. Simple as.
This gguf was made to compete with IQ3_M/IQ4_XS by compressing sparse expert ffn tensors in SOTA low-bit quant types (IQ3_KT/IQ4_KT) while protecting the most compression-sensitive, architecture critical tensors. I had concerns with mainline quant method compromises - such as shared experts in 3-bit, and the MLA KV "condensation" weights (attn_kv_a_mqa) being quanted lower than attn_k_b (the layer extracting Keys from the shared latent attention vector). Fearing that overcompressed MLA latent projection would mangle reconstructed attention states, I went for a much higher quantization for these. The recipe provided is, however, an exploratory MLA/MoE allocation, not gospel.
The proportion of ffn_exps parameters in the entire model is 92.46%. And 2.12% for lm_head and embeddings. Meaning EVERYTHING else - the shared exps, the attention tensors - is 3 GB in bf16. These also happen to be quantization sensitive tensors. As a prime example, keeping expert routing weights in bf16 across the entire gguf has cost... 7.5 MB over IQ3_S.
The imatrix was generated on wrapped natural language english text from eaddario/imatrix-calibration, using kld-sweep-dataset by cmhamiche. The imatrix was not calibrated for STEM, mathematics, code, or non-English languages. I was building it for my use purposes.
However, I'm not opposed to making a trellis quant for other use cases if anyone needs it.
UPD: since the IQ3_KT ffn_down_exps also seems to be perfectly functional, it's provided as well.
Mixed Trellis
| Component / Role | Tensor (Layer) | Dense Block 0 (1x) | MoE/MLA Blocks (46x) |
|---|---|---|---|
| Global Layers | token_embd.weight output.weight |
iq5_k — |
— iq6_k |
| MLA Compressed | attn_q_a.weight attn_kv_a_mqa.weight |
bf16 bf16 |
bf16 bf16 |
| MLA Attention | attn_q_b attn_k_b / attn_v_b attn_output.weight |
q8_0 q8_0 q8_0 |
q8_0 q8_0 iq6_k |
| MoE Routing | ffn_gate_inp.weight exp_probs_b |
— — |
bf16 f32 |
| MoE Experts | ffn_down_exps.weight ffn_gate_exps.weight ffn_up_exps.weight |
— — — |
iq4_kt iq3_kt iq3_kt |
| Shared Experts | ffn_down_shexp ffn_gate_shexp ffn_up_shexp |
— — — |
q8_0 q8_0 q8_0 |
| Dense MLP | ffn_down / ffn_gate / ffn_up |
q8_0 | — |
IQ3_KT
| Component / Role | Tensor (Layer) | Dense Block 0 (1x) | MoE/MLA Blocks (46x) |
|---|---|---|---|
| Global Layers | token_embd.weight output.weight |
iq5_k — |
— iq6_k |
| MLA Compressed | attn_q_a.weight attn_kv_a_mqa.weight |
bf16 bf16 |
bf16 bf16 |
| MLA Attention | attn_q_b attn_k_b / attn_v_b attn_output.weight |
q8_0 q8_0 q8_0 |
q8_0 q8_0 iq6_k |
| MoE Routing | ffn_gate_inp.weight exp_probs_b |
— — |
bf16 f32 |
| MoE Experts | ffn_down_exps.weight ffn_gate_exps.weight ffn_up_exps.weight |
— — — |
iq3_kt iq3_kt iq3_kt |
| Shared Experts | ffn_down_shexp ffn_gate_shexp ffn_up_shexp |
— — — |
q8_0 q8_0 q8_0 |
Cheers
Z.ai - the base model.
ikawrakow and contributors of ik_llama.cpp - I probably misused your creation.
MuXodious - for letting the model swear.
cmhamiche - for accessible, ready-to-use dataset construction tool.
eaddario - for the imatrix dataset.