How to use from the
Use from the
MLX library
# Make sure mlx-lm is installed
# pip install --upgrade mlx-lm

# Generate text with mlx-lm
from mlx_lm import load, generate

model, tokenizer = load("mlx-community/GLM-5.2-4bit")

prompt = "Write a story about Einstein"
messages = [{"role": "user", "content": prompt}]
prompt = tokenizer.apply_chat_template(
    messages, add_generation_prompt=True
)

text = generate(model, tokenizer, prompt=prompt, verbose=True)

mlx-community/GLM-5.2-4bit

This model mlx-community/GLM-5.2-4bit was converted to MLX format from zai-org/GLM-5.2 using mlx-lm version 0.31.3 (with PR #1410). The MTP block is missing in current version of this quant.

pip install mlx-lm

mlx_lm.generate --model mlx-community/GLM-5.2-4bit --prompt "Hello"
Downloads last month
11,394
Safetensors
Model size
743B params
Tensor type
BF16
U32
F32
MLX
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 馃檵 Ask for provider support

Model tree for mlx-community/GLM-5.2-4bit

Base model

zai-org/GLM-5.2
Quantized
(101)
this model