4.5 bpw V2 Calibrated Trellis Quantization (TFQ Ultra) of zai-org/GLM-5.3-Flash-BF16
Base Model (BF16) • TFQ Open Format & Codec • TensorFold Runtime • GLM-5.3-Flash Blog
TensorFold/GLM-5.3-Flash-TFQ-Ultra is a V2-calibrated TFQ Ultra quantization of zai-org/GLM-5.3-Flash-BF16 (Glm5NextForConditionalGeneration, 45 layers + 1 MTP NextN layer, 288 routed experts with top-8 routing + 1 shared expert, 154,880 vocabulary, 1M context, native vision encoder).
All 43 MoE layers (L03–L44 plus MTP layer L45) are quantized sequentially using per-expert Hessian-LDLQ-H calibration, exact 65,536-state Viterbi trellis encoding, and dual-pass coordinate/sign-vector polish (--polish --polish-su), while every non-MoE layer, attention/KDA/DSA block, mHC residual projection, dense layer (L00–L02), embedding, lm_head, and the complete vision encoder remain in untouched original BF16/F32 precision.
| Property | Value |
|---|---|
| Base Checkpoint | zai-org/GLM-5.3-Flash-BF16 (598.54 GiB) |
| TFQ Ultra Size | 182.39 GiB (195.84 GB, 3.28× compression) |
| Quantized MoE Shards | 43 shards (moe_L03.tffp5 – moe_L45.tffp5, incl. MTP L45, 164.36 GiB) |
| Bit Allocation | 4.5 bpw routed experts (864/layer), 5.0 bpw shared experts (3/layer), 4.514 bpw effective incl. scales/metadata |
| Untouched BF16 / F32 | 1,618 tensors across 5 safetensors shards (18.01 GiB): dense L00–L02, KDA/DSA/mHC/norms, embeddings, lm_head, vision encoder, and BF16 shared_experts |
| Integrity Check | 43/43 shards OK [XXH64 verified] via tfq3-inspect |
| Recommended Memory | 256 GB unified memory (e.g., Mac Studio / dual 128 GB node) with ~73 GiB KV headroom |
Evaluated directly against the full zai-org/GLM-5.3-Flash-BF16 Gold reference (598.54 GiB) over 65,472 unseen predicted tokens (64 × 1,024 zero-overlap held-out sequences across 4 domains: chat, code, math, prose) with exact 154,880-vocabulary FP64 KL divergence (no top-k truncation, no sampling approximation):
| Domain | BF16 Gold PPL | TFQ Ultra PPL | Δ PPL | Forward KL | Reverse KL | Top-1 Match | Top-5 Match |
|---|---|---|---|---|---|---|---|
| Code | 1.91975 |
1.92167 |
+0.10% |
0.033555 |
0.034217 |
95.63% | 99.77% |
| Math | 1.87807 |
1.88033 |
+0.12% |
0.032362 |
0.032642 |
95.92% | 99.89% |
| Prose | 2.85751 |
2.91431 |
+1.99% |
0.066917 |
0.070037 |
92.56% | 99.57% |
| Chat | 7.34157 |
7.36478 |
+0.32% |
0.121476 |
0.113311 |
91.59% | 98.99% |
| Overall (65,472 tok) | 2.94906 |
2.96758 |
+0.63% |
0.063577 |
0.062552 |
93.93% |
99.55% |
384 × 1,024 (393,216 tokens) multi-domain zero-overlap calibration corpus propagated sequentially layer-by-layer through quantized MoE outputs (L03–L45, including MTP L45).gate_proj, up_proj) uses per-expert input Hessians H_up; Stage 2 (down_proj + shared_experts) propagates quantized Stage-1 SwiGLU activations to build exact post-quantization per-expert H_down Hessians.30.24 dB (range 25.74 dB–40.84 dB, MTP L45 = 31.27 dB).GLM-5.3-Flash-TFQ-Ultra/
├── assets/glm-logo.svg
├── config.json
├── generation_config.json
├── processor_config.json
├── tokenizer.json
├── tokenizer_config.json
├── chat_template.jinja
├── pw_v5_tables.bin # Normative TFQ trellis codebook & permutation tables (16 KiB)
├── model.safetensors.index.json # Index for 1,618 untouched BF16/F32 non-MoE + vision tensors
├── model-00001-of-00005.safetensors # Untouched BF16/F32 non-MoE + vision encoder (18.01 GiB total)
├── ...
├── model-00005-of-00005.safetensors
├── moe_L03.tffp5 # Layer 3 TFQ MoE shard (3.822 GiB, 867 tensors, XXH64 verified)
├── ...
└── moe_L45.tffp5 # Layer 45 (MTP NextN) TFQ MoE shard (3.822 GiB, XXH64 verified)
zai-org/GLM-5.3-Flash-BF16, released under the MIT License.model-00002-of-00005.safetensors 4.2 GiBmodel-00001-of-00005.safetensors 4.2 GiBmodel-00004-of-00005.safetensors 4.1 GiBmodel-00003-of-00005.safetensors 4.1 GiBmodel-00005-of-00005.safetensors 1.4 GiBpw_v5_tables.bin 16 KiBzai-org/GLM-5.3-Flash-BF16