Downloads · 30 days
17
7% of all-time downloads
Unrvl22/GLM-5.2-MXFP6
GLM-5.2-MXFP6 is a text generation model from Unrvl22. Use it when you need the model to write or continue text. The card lists the license as mit.
Weight-only MXFP6 (OCP Microscaling FP6, E2M3) quantization of zai-org/GLM-5.2.
Downloads · 30 days
17
7% of all-time downloads
All-time downloads
250
Public
Parameters
595B
623 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors623 GB · 100%
How the weights are stored.
U8566B · 95%
From the Hugging Face model README
Weight-only MXFP6 (OCP Microscaling FP6, E2M3) quantization of zai-org/GLM-5.2.
Only the routed MoE expert weights are cast to FP6. Everything else (attention, the router, the shared expert, the dense layers, token embeddings, the LM head, the MTP layer, and all activations) is kept in native BF16.
To our knowledge this is the first MXFP6 quantization of GLM-5.2 on the Hub.
zai-org/GLM-5.2 (BF16, ~753B total / ~39B active, glm_moe_dsa architecture, 78 layers + 1 MTP layer, 256 routed + 1 shared expert per MoE layer).--file2file_quantization (round-to-nearest), on a single AMD Instinct MI300X (ROCm 7.2.4).| Component | Tensor(s) | Precision |
|---|---|---|
| Routed MoE experts (layers 3-77) | model.layers.{3..77}.mlp.experts.{0..255}.{gate,up,down}_proj.weight | MXFP6-E2M3 (packed) + E8M0 weight_scale |
| Shared expert | ...mlp.shared_experts.* | BF16 |
| Router / gate | ...mlp.gate.weight (+ F32 correction bias) | BF16 / F32 |
| Attention (MLA + DSA) | ...self_attn.* incl. ...self_attn.indexer.* | BF16 |
| Dense layers (0-2) | model.layers.{0,1,2}.mlp.* | BF16 |
| MTP layer (78) | model.layers.78.* (incl. its experts) | BF16 |
| Embeddings / LM head / norms | embed_tokens, lm_head, *norm | BF16 / F32 |
| All activations | BF16 (weight-only) |
57,600 expert weight tensors are quantized (75 MoE layers x 256 experts x 3 projections), each with a matching E8M0 weight_scale; every other weight passes through unchanged.
Produced with the stock Quark mxfp6_e2m3 scheme (file2file, RTN), then one config edit to make it weight-only:
# AMD Quark 0.12, examples/torch/language_modeling/llm_ptq/
python quantize_quark.py \
--model_dir zai-org/GLM-5.2 \
--output_dir GLM-5.2-MXFP6 \
--quant_scheme mxfp6_e2m3 \
--exclude_layers "*self_attn*" "*mlp.gate" "*shared_experts*" \
"*mlp.gate_proj" "*mlp.up_proj" "*mlp.down_proj" \
"*lm_head*" "*embed*" "*layers.78*" \
--file2file_quantization \
--model_export hf_format \
--skip_evaluation
Then, in the emitted config.json, set quantization_config.global_quant_config.input_tensors to null so the checkpoint declares weight-only quantization (FP6 weights, BF16 activations). The weight bytes are identical either way; file2file never runs a forward pass, so this edit is purely the metadata declaration.
The checkpoint uses the standard Quark on-disk format (quantization_config.quant_method = "quark", weight-only w_mxfp6_e2m3). FP6 weights are dequantized to BF16 at load on GPUs without native FP6 support. Native FP6 compute requires CDNA4 (MI350/MI355), so on MI300X and other GPUs it runs as dequant-to-BF16, meaning the benefit there is memory footprint rather than throughput.
vLLM (ROCm), adjust --tensor-parallel-size to your GPU count:
export VLLM_ROCM_USE_AITER=1
vllm serve Unrvl22/GLM-5.2-MXFP6 \
--tensor-parallel-size 8 \
--quantization quark \
--trust-remote-code
Serving status: this repository is the checkpoint; end-to-end serving has not been validated on this exact build. Some engines may still lack
GlmMoeDsasupport, and the MTP layer is emitted asmodel.layers.78.*(SGLang expects amodel.decoder.*prefix, a known name remap). Neither affects the weights in this repo.
zai-org/GLM-5.2. Quantization can introduce small additional output deviations.Released under the MIT License, inheriting the license of the base model zai-org/GLM-5.2. This is a derivative work (weight quantization only); all credit for the underlying model belongs to Z.ai / Zhipu AI.