GLM 5.1
By Z.ai. 753.9 billion parameters, a context window of 204,800 tokens and the licence mit.
Facts
- Released
- 2026-04-03 the day the repository was first published on Hugging Face Hugging Face, read
- Licence
- mit the licence the model card declares Hugging Face, read
- Open weights
- Yes the weights are published in this Hugging Face repository Hugging Face, read
- Parameters
- 753.9 billion counted from the safetensors weight files Hugging Face, read
- Active parameters
- 51.7 billion estimate estimated from the expert counts and sizes in the configuration model configuration, read
- Knowledge cutoff
- Unknown
- Context window
- 202,752 tokens the maximum position embeddings in the model configuration model configuration, read
- 204,800 tokens the context length OpenRouter lists OpenRouter, read
- Longest output
- 128,000 tokens the largest output OpenRouter's first provider allows OpenRouter, read
- Tool calling
- Yes OpenRouter lists tools among the supported parameters OpenRouter, read
- Structured output
- Yes OpenRouter lists structured outputs among the supported parameters OpenRouter, read
- Reasoning controls
- Yes OpenRouter lists reasoning controls OpenRouter, read
- Inputs and outputs
- text in, text out Hugging Face, read
- Good for
- Reasoning: OpenRouter lists reasoning controls for it OpenRouter, read
Prices
| Provider | Input | Output | Context | As of | Source |
|---|---|---|---|---|---|
| HPC-AI direct | 0.615 USD | 2.46 USD | 202,000 | older than 30 days; check the provider | models.dev, read |
| Baidu through OpenRouter | 0.965 USD | 3.03 USD | 202,752 | OpenRouter endpoints, read | |
| StreamLake through OpenRouter | 0.966 USD | 3.04 USD | 200,000 | OpenRouter endpoints, read | |
| Chutes through OpenRouter | 0.980 USD | 3.08 USD | 202,752 | OpenRouter endpoints, read | |
| Pioneer direct | 0.980 USD | 3.08 USD | 202,000 | older than 30 days; check the provider | models.dev, read |
| Hugging Face direct | 1.00 USD | 3.20 USD | 202,752 | older than 30 days; check the provider | models.dev, read |
| Deep Infra direct | 1.05 USD | 3.50 USD | 202,752 | older than 30 days; check the provider | models.dev, read |
| DeepInfra through OpenRouter | 1.05 USD | 3.50 USD | 202,752 | OpenRouter endpoints, read | |
| SiliconFlow direct | 1.19 USD | 3.74 USD | 205,000 | older than 30 days; check the provider | models.dev, read |
| SiliconFlow through OpenRouter | 1.19 USD | 3.74 USD | 204,800 | OpenRouter endpoints, read | |
| Phala through OpenRouter | 1.21 USD | 4.20 USD | 202,752 | OpenRouter endpoints, read | |
| AtlasCloud through OpenRouter | 1.26 USD | 3.96 USD | 202,752 | OpenRouter endpoints, read | |
| Baseten direct | 1.30 USD | 4.30 USD | 202,800 | older than 30 days; check the provider | models.dev, read |
| Alibaba through OpenRouter | 1.33 USD | 4.18 USD | 202,745 | OpenRouter endpoints, read | |
| Novita through OpenRouter | 1.38 USD | 4.40 USD | 204,800 | OpenRouter endpoints, read | |
| NovitaAI direct | 1.38 USD | 4.40 USD | 204,800 | older than 30 days; check the provider | models.dev, read |
| Abacus direct | 1.40 USD | 4.40 USD | 204,800 | older than 30 days; check the provider | models.dev, read |
| Friendli direct | 1.40 USD | 4.40 USD | 202,752 | older than 30 days; check the provider | models.dev, read |
| Friendli through OpenRouter | 1.40 USD | 4.40 USD | 202,752 | OpenRouter endpoints, read | |
| GMICloud through OpenRouter | 1.40 USD | 4.40 USD | 202,752 | OpenRouter endpoints, read | |
| Nebius through OpenRouter | 1.40 USD | 4.40 USD | 202,752 | OpenRouter endpoints, read | |
| Together AI direct | 1.40 USD | 4.40 USD | 202,752 | older than 30 days; check the provider | models.dev, read |
| Z.AI through OpenRouter | 1.40 USD | 4.40 USD | 202,752 | OpenRouter endpoints, read | |
| Venice through OpenRouter | 1.40 USD | 4.40 USD | 200,000 | OpenRouter endpoints, read |
Run it on your own hardware
Weights are the sizes of the files a source lists, or an estimate from the parameter count where none does. Memory is an estimate: weights plus KV cache plus 512 MiB and 5 percent of the weights for runtime buffers. Check it against your hardware.
| Quantization | Weights | Memory at 8,192 tokens | Memory at 32,768 tokens |
|---|---|---|---|
| UD-IQ1_M | 191 GiB | 202 GiB | 204 GiB |
| UD-IQ2_XXS | 205 GiB | 217 GiB | 219 GiB |
| UD-IQ2_M | 220 GiB | 232 GiB | 234 GiB |
| UD-Q2_K_XL | 235 GiB | 248 GiB | 250 GiB |
| UD-IQ3_S | 260 GiB | 275 GiB | 277 GiB |
| UD-Q3_K_S | 292 GiB | 308 GiB | 310 GiB |
| UD-Q3_K_M | 315 GiB | 332 GiB | 334 GiB |
| UD-Q3_K_XL | 317 GiB | 334 GiB | 336 GiB |
| UD-IQ4_NL | 344 GiB | 362 GiB | 364 GiB |
| UD-Q4_K_S | 404 GiB | 425 GiB | 428 GiB |
| MXFP4_MOE | 420 GiB | 442 GiB | 444 GiB |
| UD-Q4_K_M | 433 GiB | 455 GiB | 457 GiB |
| UD-Q4_K_XL | 434 GiB | 457 GiB | 459 GiB |
| UD-Q5_K_S | 490 GiB | 516 GiB | 518 GiB |
| UD-Q5_K_M | 520 GiB | 547 GiB | 549 GiB |
| UD-Q5_K_XL | 522 GiB | 549 GiB | 551 GiB |
| UD-Q6_K | 579 GiB | 609 GiB | 611 GiB |
| UD-Q6_K_XL | 637 GiB | 670 GiB | 672 GiB |
| Q8_0 | 746 GiB | 785 GiB | 787 GiB |
| UD-Q8_K_XL | 755 GiB | 794 GiB | 796 GiB |
| BF16 | 1,404 GiB | 1,476 GiB | 1,478 GiB |
Start it with a local runtime
- Ollama
ollama run hf.co/unsloth/GLM-5.1-GGUF:UD-IQ1_M - LM Studio
lms get unsloth/GLM-5.1-GGUF lms server start - llama.cpp server
llama-server -hf unsloth/GLM-5.1-GGUF:UD-IQ1_M --jinja - vLLM
vllm serve zai-org/GLM-5.1 - SGLang
sglang serve --model-path zai-org/GLM-5.1 --port 30000
Use it from your harness
Set up for Abacus with the model zai-org/GLM-5.1. Each endpoint page has the same setup for its own address.
OpenCode
Put this in opencode.json in your project folder:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"abacus": {
"npm": "@ai-sdk/openai-compatible",
"name": "Abacus",
"options": {
"baseURL": "https://routellm.abacus.ai/v1",
"apiKey": "{env:ABACUS_API_KEY}"
},
"models": {
"zai-org/GLM-5.1": {
"name": "GLM 5.1",
"limit": {
"context": 204800,
"output": 128000
}
}
}
}
}
}- OpenCode reads any OpenAI-compatible address through the @ai-sdk/openai-compatible package, and an address that speaks the Responses API through @ai-sdk/openai.
From OpenCode documentation, read .
Pi
Put this in ~/.pi/agent/models.json:
{
"providers": {
"abacus": {
"baseUrl": "https://routellm.abacus.ai/v1",
"api": "openai-completions",
"apiKey": "$ABACUS_API_KEY",
"models": [
{
"id": "zai-org/GLM-5.1"
}
]
}
}
}- The apiKey field can name an environment variable as $NAME.
From Pi documentation, read .
Codex
Codex speaks only the Responses API, and Abacus documents no Responses address. A gateway that offers one can sit in between.
- Codex speaks the Responses API only: responses is the one supported wire API of a custom provider. Ollama and LM Studio are built in and start with --oss.
From Codex documentation, read .
Claude Code
Claude Code sends Anthropic Messages requests, and Abacus documents no such address. A gateway that translates to that API can sit in between.
- Claude Code sends Anthropic Messages requests to ANTHROPIC_BASE_URL. Anthropic says it does not support routing Claude Code to models other than Claude through any gateway, so some features may not work with another model.
From Claude Code documentation, read .
Other ways to reach it
- Baseten, model
zai-org/GLM-5.1 - DeepInfra, model
zai-org/GLM-5.1 - Friendli, model
zai-org/GLM-5.1 - HPC-AI, model
zai-org/glm-5.1 - Hugging Face, model
zai-org/GLM-5.1 - NovitaAI, model
zai-org/glm-5.1 - Pioneer, model
zai-org/GLM-5.1 - SiliconFlow, model
zai-org/GLM-5.1 - Together AI, model
zai-org/GLM-5.1 - OpenRouter, model
z-ai/glm-5.1
Published results
These are results other people published. Baltor did not run them and does not rank models by them.
- Results the maker published on the model card published by zai-org Hugging Face, read
- Artificial Analysis Intelligence Index: 26.1 published by Artificial Analysis OpenRouter, read
- Artificial Analysis Coding Index: 55.8 published by Artificial Analysis OpenRouter, read
- Artificial Analysis Agentic Index: 23.9 published by Artificial Analysis OpenRouter, read
Sources of this page
Paid links
No link in this directory is a paid link or an ad, and no listing is paid for. The order and the contents of every list come from the sources named on this page.