Instructions to use samithaj/GLM-4.7-Flash-MTP-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use samithaj/GLM-4.7-Flash-MTP-bf16 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir GLM-4.7-Flash-MTP-bf16 samithaj/GLM-4.7-Flash-MTP-bf16
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
GLM-4.7-Flash-MTP-bf16
The trained multi-token-prediction (MTP / nextn) layer of zai-org/GLM-4.7-Flash, split into a standalone MLX drafter checkpoint. This is not a standalone language model — it is a single-layer draft head that predicts one token ahead from a target model's hidden states, for speculative decoding against GLM-4.7-Flash.
GLM-4.7-Flash ships this layer inside the full checkpoint at
model.layers.47.*; MLX conversions of the base model strip it (sanitize
drops layers past num_hidden_layers), so quantized community conversions do
not carry it. This repo preserves it in bf16, revision-pinned.
Provenance
Source:
zai-org/GLM-4.7-Flash, revision7dd20894a642a0aa287e9827cb1a1f7f91386b67(MIT). All weights are Z.ai's trained parameters, unmodified except for the layout transforms below.Tool: the
glm4_moe_lite_mtpdrafter split from mlx-vlm'sspeculative/draftersconvention (Blaizzy/mlx-vlm#1570):python -m mlx_vlm.speculative.drafters.glm4_moe_lite_mtp.split \ --model zai-org/GLM-4.7-Flash \ --revision 7dd20894a642a0aa287e9827cb1a1f7f91386b67 \ --output GLM-4.7-Flash-MTP-bf16Only the 3 (of 48) source shards holding the nextn tensors are read.
Checksum:
file sha256 model.safetensorsbdb948cbec1810d89910cc99dfbc85864acde45241337702b555e2a721254e7b
Format
model_type: glm4_moe_lite_mtp, block_size: 2
(num_nextn_predict_layers + 1), untied embeddings; the source text config is
nested under text_config. 24 tensors, flat post-sanitize layout:
- dedicated nextn
embed_tokensand untiedlm_head(GLM's nextn head is not tied to the target, unlike DeepSeek/Qwen MTP) enorm/hnorm/eh_projprojections- one MLA attention block in absorbed form (
kv_b_projsplit intoembed_q/unembed_out) - 64-expert MoE stacked into
switch_mlp+ shared expert; thenoaux_tcrouter correction bias is kept fp32 and the router gate full precision (casting them breaks routing)
Consumers
- vllm-project/vllm-metal#484 / #485 — native MTP speculative decoding for GLM-4.7-Flash on Apple Silicon (reference integration this format feeds; design thread in #482)
- mlx-vlm's speculative-decoding runtime, once a
glm4_moe_litebackbone lands there
Measured offline acceptance of this head replaying real target hidden states: ~0.806 mean over chat prompts (methodology and end-to-end results in the vllm-metal links above).
A 4-bit variant is at samithaj/GLM-4.7-Flash-MTP-4bit.
- Downloads last month
- 87
Quantized
Model tree for samithaj/GLM-4.7-Flash-MTP-bf16
Base model
zai-org/GLM-4.7-Flash
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir GLM-4.7-Flash-MTP-bf16 samithaj/GLM-4.7-Flash-MTP-bf16