---
title: GLM-5-MXFP4-Q8
canonical_url: "https://www.modelscope.cn/models/mlx-community/GLM-5-MXFP4-Q8"
md_url: "https://www.modelscope.cn/models/mlx-community/GLM-5-MXFP4-Q8.md"
repository: mlx-community/GLM-5-MXFP4-Q8
last_updated: 2026-02-13
license: mit
model_type:
  - glm_moe_dsa
architectures:
  - GlmMoeDsaForCausalLM
base_model:
  - zai-org/GLM-5
base_model_relation: quantized
parameters: 115.6B
tensor_type:
  - BF16
  - U32
  - U8
  - F32
library_name:
  - mlx
  - safetensors
  - pytorch
frameworks:
  - pytorch
language:
  - en
  - zh
downloads: 133
stars: 1
tags:
  - mlx
  - safetensors
  - glm_moe_dsa
  - conversational
  - text-generation
  - mxfp4
  - quantized
---

# GLM-5-MXFP4-Q8

> GLM-5-MXFP4-Q8 - mlx-community 在 ModelScope 开源的模型。mlx-community/GLM-5-MXFP4-Q8

mlx-community/GLM-5-MXFP4-Q8 是 ModelScope 魔搭社区上的 115.6B 参数机器学习模型，采用 mit 许可，基于 zai-org/GLM-5 构建。

- **Repository**: mlx-community/GLM-5-MXFP4-Q8
- **License**: mit
- **Parameters**: 115.6B
- **Base model**: zai-org/GLM-5
- **Tags**: mlx, safetensors, glm_moe_dsa, conversational, text-generation, mxfp4, quantized
- **Downloads**: 133
- **Stars**: 1
- **Last updated**: 2026-02-13

Source: https://www.modelscope.cn/models/mlx-community/GLM-5-MXFP4-Q8

---

# mlx-community/GLM-5-MXFP4-Q8

This model was converted to MLX format from [`zai-org/GLM-5`](https://huggingface.co/zai-org/GLM-5) using a custom MXFP4-Q8 quantization scheme.

GLM-5 is a 744B parameter (40B active) Mixture-of-Experts model developed by Z.ai, targeting complex systems engineering and long-horizon agentic tasks. It uses Multi-Head Latent Attention (MLA) with 47 transformer layers, 64 routed experts (4 active per token), and 1 shared expert.

## Quantization

This model uses a mixed-precision quantization.

| Component | Mode | Bits | Group Size |
|---|---|---|---|
| Expert weights (switch_mlp) | MXFP4 | 4 | 32 |
| Attention, embeddings, shared expert, dense MLP, lm_head | Affine | 8 | 64 |

## Use with mlx-lm

```bash
pip install mlx-lm
```

```python
from mlx_lm import load, generate

model, tokenizer = load("mlx-community/GLM-5-MXFP4-Q8")

prompt = "hello"

if tokenizer.chat_template is not None:
    messages = [{"role": "user", "content": prompt}]
    prompt = tokenizer.apply_chat_template(
        messages, add_generation_prompt=True
    )

response = generate(model, tokenizer, prompt=prompt, verbose=True)
```
