zai-org /
GLM-5
Open-weights LLM family from Z.ai built for coding and long-running agent tasks
- 7.4k stars
- 106 stars since 3 Oct
- Updated 8 days ago
- Advanced
- Models & local AI
This repo is a hub, not a code library. It describes the GLM-5 series of large language models from Z.ai and points to the weights on Hugging Face and ModelScope. The models are aimed at coding and long-horizon agent work, where a model has to plan, call tools and keep going for many steps.
The flagship models are mixture-of-experts: 744B total parameters with 40B active per token. GLM-5.3-Flash is a smaller 320B model with 18B active, and uses a mix of sparse and linear attention to cut the cost of long contexts. GLM-5.2 supports a 1M-token context. Each model comes in FP8 and BF16 precision, so you can trade memory for fidelity.
The README gives benchmark numbers, but they come from the authors, so treat them as claims to check. The practical content is the serving list (SGLang, vLLM, Transformers, KTransformers, Unsloth, Ascend NPU) and the fine-tuning options (slime, ms-swift). You can also skip the self-hosting and use the models through the Z.ai API.
What it does
Several model sizes and precisions
GLM-5, 5.1, 5.2 and 5.3 are 744B-A40B models. GLM-5.3-Flash is 320B-A18B. Most come in FP8 and BF16 versions.
Long context
GLM-5.2 is described as handling a 1M-token context. GLM-5.3-Flash combines sparse and linear attention to lower long-context serving costs.
Adjustable thinking effort
GLM-5.3 and 5.3-Flash take a reasoning_effort setting of low, high or max, defaulting to max. GLM-5.2 accepts only high and max.
Many ways to serve locally
The README links guides for SGLang, vLLM, Transformers, KTransformers and Unsloth. It also covers Ascend NPU deployment.
Fine-tuning support
Slime (v0.3.0+) is the reinforcement learning framework the GLM team uses. ms-swift (v4.4.0+) supports SFT, PPO and GRPO.
What you could build
- Run an open-weights coding model on your own GPU cluster with vLLM or SGLang.
- Call GLM-5.3 through the Z.ai API to power a coding agent or terminal assistant.
- Fine-tune the model on your own data with ms-swift using SFT, PPO or GRPO.
- Test long-context tasks, such as reading a large codebase, with GLM-5.2's 1M-token window.
- Compare GLM-5.3 against other open and closed models on your own agent benchmarks.
Get started
The README gives no install commands. Pick a model from the download table on Hugging Face or ModelScope, then follow the SGLang, vLLM or other cookbook linked for that model. If you don't have the hardware, use the Z.ai API or the z.ai site instead. When chatting, pass clear_thinking=true as the README advises.
Commands are copied from the project's README. Read it on GitHub for the full setup.
More in Models & local AI
transformers
Shared model definitions for text, vision, audio and multimodal AI models