This is a
mixed precision NVFP4 quantization of
zai-org/GLM-4.7-Flash, a 30B-A3B (30B total, 3B active) Mixture-of-Experts model. This version preserves
MTP (Multi-Token Prediction) layers in BF16 for speculative decoding compatibility.
MTP quality is preserved (actually slightly improved) after quantization.
MTP speculative decoding currently shows overhead rather than speedup due to missing torch.compile support for the MTP drafter model in vLLM. For best throughput, run without MTP enabled until this is resolved upstream.
1pip install vllm>=0.8.0
2pip install git+https://github.com/huggingface/transformers.git
1from vllm import LLM, SamplingParams
2
3model = LLM(
4 "GadflyII/GLM-4.7-Flash-MTP-NVFP4",
5 tensor_parallel_size=1,
6 max_model_len=4096,
7 trust_remote_code=True,
8 gpu_memory_utilization=0.90,
9)
10
11params = SamplingParams(temperature=0.7, max_tokens=512)
12outputs = model.generate(["Explain quantum computing in simple terms."], params)
13print(outputs[0].outputs[0].text)
1# Standard serving (recommended for performance)
2VLLM_ATTENTION_BACKEND=TRITON_MLA vllm serve GadflyII/GLM-4.7-Flash-MTP-NVFP4 \
3 --tensor-parallel-size 1 \
4 --max-model-len 4096 \
5 --trust-remote-code \
6 --gpu-memory-utilization 0.90
7
8# With MTP speculative decoding (experimental)
9VLLM_ATTENTION_BACKEND=TRITON_MLA vllm serve GadflyII/GLM-4.7-Flash-MTP-NVFP4 \
10 --tensor-parallel-size 1 \
11 --max-model-len 4096 \
12 --trust-remote-code \
13 --gpu-memory-utilization 0.90 \
14 --speculative-config '{"method": "mtp", "num_speculative_tokens": 1}'
1@misc{glm4flash2025,
2 title={GLM-4.7-Flash},
3 author={Zhipu AI},
4 year={2025},
5 howpublished={\url{https://huggingface.co/zai-org/GLM-4.7-Flash}}
6}
This model inherits the Apache 2.0 license from the base model.