# GLM-5: Flagship Models for Long-Horizon Agentic Engineering

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/zai-org-glm-5
Generated for open source discovery and AI-assisted research.

GLM-5 is a series of flagship models, including GLM-5.2, GLM-5.1, and GLM-5, developed by zai-org for complex systems engineering and long-horizon agentic tasks. These models offer advanced coding capabilities, impressive context lengths, and state-of-the-art performance on various benchmarks. They are designed to sustain effective problem-solving over extended sessions through iterative reasoning and strategy revision.

GitHub: https://github.com/zai-org/GLM-5
OSRepos URL: https://osrepos.com/repo/zai-org-glm-5

## Summary

GLM-5 is a series of flagship models, including GLM-5.2, GLM-5.1, and GLM-5, developed by zai-org for complex systems engineering and long-horizon agentic tasks. These models offer advanced coding capabilities, impressive context lengths, and state-of-the-art performance on various benchmarks. They are designed to sustain effective problem-solving over extended sessions through iterative reasoning and strategy revision.

## Topics

- agentic-ai
- coding
- llm
- long-horizon
- AI
- Machine Learning
- Deep Learning
- Language Model

## Repository Information

Last analyzed by OSRepos: Thu Jun 18 2026 08:47:52 GMT+0100 (Western European Summer Time)
Detail views: 4
GitHub clicks: 1

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction

The GLM-5 series, developed by zai-org, represents a significant advancement in large language models tailored for complex systems engineering and long-horizon agentic tasks. This repository showcases GLM-5, GLM-5.1, and the latest GLM-5.2, each building upon its predecessor with enhanced capabilities.

### GLM-5.2

GLM-5.2 is the latest flagship model, making a substantial leap in long-horizon task capability with a solid 1M-token context. Its new features include robust 1M context stability, advanced coding with flexible effort levels, and an improved architecture featuring IndexShare, which reduces per-token FLOPs by 2.9x at 1M context length. GLM-5.2 demonstrates state-of-the-art performance on coding benchmarks, outperforming other open-source models and closing the gap with frontier closed-source models.

### GLM-5.1

GLM-5.1 is designed for agentic engineering, offering significantly stronger coding capabilities. It achieves state-of-the-art performance on SWE-Bench Pro and excels in real-world terminal tasks. A key innovation of GLM-5.1 is its ability to remain effective over much longer horizons, handling ambiguous problems with better judgment and sustaining productivity through iterative reasoning, experimentation, and strategy revision over hundreds of rounds.

### GLM-5

GLM-5 targets complex systems engineering and long-horizon agentic tasks. It scales significantly from GLM-4.5, increasing parameters and pre-training data. It integrates DeepSeek Sparse Attention (DSA) to reduce deployment costs while maintaining long-context capacity. GLM-5 also leverages `slime`, a novel asynchronous RL infrastructure, to improve training throughput and efficiency, leading to best-in-class performance among open-source models across reasoning, coding, and agentic tasks.

## Installation

The GLM-5 series models are available for download and local deployment. You can access the models through Hugging Face and ModelScope.

To serve GLM-5 series models locally, several frameworks are supported:

*   [SGLang](https://github.com/sgl-project/sglang) (v0.5.13.post1+), see [cookbook](https://cookbook.sglang.io/autoregressive/GLM/GLM-5.2)
*   [vLLM](https://github.com/vllm-project/vllm) (v0.23.0+), see [recipes](https://recipes.vllm.ai/zai-org/GLM-5.2)
*   [Transformers](https://github.com/huggingface/transformers) (v0.5.12+), see [transformers docs](https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/glm_moe_dsa.md)
*   [KTransformers](https://github.com/kvcache-ai/ktransformers) (v0.5.12+), see [tutorial](https://github.com/kvcache-ai/ktransformers/blob/main/doc/en/kt-kernel/GLM-5.2-Tutorial.md)
*   For deployment on the `Ascend NPU` platform, inference frameworks such as vLLM-Ascend, xLLM, and SGLang are supported, see [here](example/ascend.md).

## Examples

GLM-5 models support controlling the thinking budget through the `reasoning_effort` parameter. This parameter accepts two levels: `max` (default) and `high`. If `reasoning_effort` is unset or set to any value other than `high`, the model runs at `Max`. To use the `High` level, you must explicitly pass `reasoning_effort="high"`. Thinking can be turned off entirely by setting `enable_thinking=false`.

## Why Use GLM-5?

The GLM-5 series offers compelling advantages for developers and researchers working with advanced AI:

*   **Exceptional Long-Horizon Capability**: GLM-5.2 provides a stable 1M-token context, enabling sustained work on complex, long-duration tasks.
*   **State-of-the-Art Agentic Engineering**: GLM-5.1 and GLM-5 excel in agentic tasks, demonstrating superior problem-solving, iterative reasoning, and strategic revision over extended sessions.
*   **Advanced Coding Performance**: The models achieve leading scores on standard coding benchmarks like Terminal-Bench and SWE-bench Pro.
*   **Efficient Deployment**: Features like DeepSeek Sparse Attention in GLM-5 reduce deployment costs while preserving long-context capacity.
*   **Strong Benchmark Results**: Consistent top performance across a wide range of academic and real-world benchmarks, including Vending Bench 2, showcasing robust planning and resource management.

## Links

*   **GitHub Repository**: [zai-org/GLM-5](https://github.com/zai-org/GLM-5 "zai-org/GLM-5")
*   **GLM-5.2 Blog**: [Read the GLM-5.2 blog](https://z.ai/blog/glm-5.2 "Read the GLM-5.2 blog")
*   **GLM-5 Technical Report**: [arXiv:2602.15763](https://arxiv.org/abs/2602.15763 "arXiv:2602.15763")
*   **Z.ai API Platform**: [Use GLM-5.2 API services](https://docs.z.ai/guides/llm/glm-5.2 "Use GLM-5.2 API services")
*   **Try GLM-5.2 at Z.ai**: [Visit z.ai](https://z.ai "Visit z.ai")
*   **Hugging Face**: [zai-org/GLM-5.2](https://huggingface.co/zai-org/GLM-5.2 "zai-org/GLM-5.2"), [zai-org/GLM-5.1](https://huggingface.co/zai-org/GLM-5.1 "zai-org/GLM-5.1"), [zai-org/GLM-5](https://huggingface.co/zai-org/GLM-5 "zai-org/GLM-5")
*   **ModelScope**: [ZhipuAI/GLM-5.2](https://modelscope.cn/models/ZhipuAI/GLM-5.2 "ZhipuAI/GLM-5.2"), [ZhipuAI/GLM-5.1](https://modelscope.cn/models/ZhipuAI/GLM-5.1 "ZhipuAI/GLM-5.1"), [ZhipuAI/GLM-5](https://modelscope.cn/models/ZhipuAI/GLM-5 "ZhipuAI/GLM-5")