Zhipu AI Open-Sources GLM-5.2: Focuses on Long-Horizon Tasks and Coding
Zhipu AI has open-sourced GLM-5.2, achieving a score of 51 on the Artificial Analysis leaderboard, ranking first among open-source models. Designed for long-horizon tasks, it offers stable 1M context support and topped the global usable models in Code Arena blind tests. Released under the MIT license, GLM-5.2 emphasizes Day 0 compatibility with domestic compute platforms and optimized training for large-scale coding environments.
Related Entities
Full Report
Contents5 sections
Today, we launch and open-source GLM-5.2. On the Artificial Analysis composite leaderboard, GLM-5.2 scores 51 points, ranking in the top three alongside Anthropic and OpenAI, establishing a new state-of-the-art (SOTA) for open-source models.

On Code Arena, a frontend development evaluation system involving blind tests with millions of users worldwide, GLM-5.2 achieved first place among all available global models.

Since early 2025, we have dedicated nearly all our resources to tackling coding challenges. Over more than half a year, we meticulously optimized every aspect of the code environment, culminating in our coding foundation model, GLM-4.5. By year-end, GLM-4.7 had become the best-performing open-source coding model. However, coding alone is not AGI. On the path to AGI, there are still many mountains to climb, with long-horizon task capability being the next major hurdle. The most critical breakthrough needed now is the ability to execute extremely long planning and execution cycles spanning days, weeks, or even months. When a model tirelessly writes software engineering code, it essentially learns the mindset of a top-tier software engineer and amplifies it with machine endurance, redefining profession after profession. Today, GLM-5.2 emerges specifically designed for long-horizon tasks, featuring:
- Solid 1M context window, stably supporting long-horizon tasks
- Enhanced user experience and more practical coding capabilities
- Extreme infrastructure optimization, running on Day 0 on domestic compute platforms
- MIT open-source license, no geographic restrictions, promoting borderless technological equity
I. 1M Context Window and Long-Horizon Tasks
To support long-horizon tasks, the first step is making long contexts engineering-ready. Therefore, GLM-5.2 must achieve a solid, lossless 1M context window. While many implementations of 1M context windows exist, most rely on direct extension, leading to significant performance degradation in real-world applications. Many actual tests show deterioration after several hundred thousand tokens. The primary issue is that simply extending to 1M without enhancing training data for longer Coding Agents offers limited help for high-value long-horizon tasks. We spent months significantly expanding the 1M Coding Agent training environments, covering large-scale implementation, automated research, performance optimization, and other typical domains. This enables the model's true performance at 1M context to sometimes even surpass Opus (see technical blog). The 1M context window constitutes GLM-5.2's long-horizon delivery capability. On multiple long-horizon task benchmarks such as FrontierSWE, SWE-Marathon, and PostTrainBench, GLM-5.2 performs between Claude Opus 4.7 and 4.8, ranking highest among open-source models. On FrontierSWE (a test set evaluating whether AI can complete complex technical projects over scales ranging from hours to tens of hours, like top software engineers and researchers), GLM-5.2 trails Opus 4.8 by only 1%, outperforming GPT-5.5 (by 1%) and Opus 4.7 (by 11%). However, on SWE-Marathon (a test set assessing an Agent's ability to autonomously complete ultra-long-cycle software engineering work), further improvement is needed, as it lags behind Opus 4.8 by a considerable margin (13%).
In practical experience, GLM-5.2 autonomously completes development, integration, testing, and packaging for deployment, ultimately delivering a multi-platform application covering Web, mobile, and mini-programs. This complete pipeline processes over 880,000 tokens cumulatively, nearly filling the 1M context window. Previously, such large-scale engineering required team collaboration over weeks; GLM-5.2 can complete this in a single continuous long-horizon task.
II. Coding User Experience
GLM-5.2 shows substantial improvements in success rates across frontend, backend, and long-horizon task development scenarios compared to its predecessor, GLM-5.1. It demonstrates greater stability in complex system engineering and deep debugging. On mainstream programming benchmarks, GLM-5.2 maintains open-source SOTA status, comparable to Claude Opus 4.8. For example, on Terminal-Bench 2.1 (a dataset evaluating AI Agents' ability to operate a computer via command line), GLM-5.2 trails Opus 4.8 by 4%, but improves by 17.5% over GLM-5.1. On MCP-Atlas (a tool-use evaluation dataset), GLM-5.2 trails Opus 4.8 by only 0.8%.

Ahead of the model release, we opened access to all GLM Coding Plan users. In hundreds of thousands of real-world programming tasks from developers, feedback indicates that GLM-5.2's biggest improvements lie in:
- Stronger project-level context retention, allowing entire engineering projects to fit within a single inference chain
- More stable execution of long-horizon tasks, enabling sustained progress on complex tasks without deviating mid-way
In the period leading up to the model release, we granted full access to all GLM Coding Plan users. Based on extensive real-world programming tasks from hundreds of thousands of developers, feedback highlights that GLM-5.2's most significant improvements are concentrated in:
- Stronger project-level context capacity: It can incorporate the entire engineering project into a single reasoning chain.
- More stable long-horizon task execution: Complex tasks can be continuously advanced without drifting off course midway.
The advancements in GLM-5.2 stem from the co-design of model architecture, inference systems, and training infrastructure. We introduce IndexShare, which reuses a single indexer across every four sparse attention layers, reducing FLOPs per token by 2.9x at a 1M context length. Additionally, we improved the MTP layer for speculative decoding, increasing the acceptance length by up to 20%. On the training side, we rely on our proprietary Slime framework to support large-scale Agentic RL and OPD training.

As the GLM series continues to iterate and call volumes grow rapidly, the stability and efficiency of online services have become increasingly critical. Online inference for GLM-5.2 relies on multiple domestic computing platforms. Day 0 compatibility has been achieved with Huawei Ascend, T-Head, Moore Threads, Cambricon, Kunlunxin, MetaX, Hygon, Biren, and Iluvatar CoreX, enabling stable operation with high throughput, low latency, and high concurrency on domestic chip clusters. Following the anticipated release of the Ascend 950 supernode in the second half of the year, it is expected to serve as a robust computing foundation for GLM-5.2.
IV. For Developers and Knowledge Workers
With its solid 1M context window and stable long-horizon task capabilities, GLM-5.2 can autonomously drive more complex, longer-chain tasks over extended periods, targeting high-value scenarios and transforming how developers and knowledge workers operate. Developers: GLM-5.2 excels in large-scale refactoring projects. In a developer-led Moonshot experiment, it rebuilt the Apollo 11 Guidance Computer (AGC)—the computer that sent humans to the moon—from scratch using Rust: porting approximately 4,600 lines of fixed-point CPU code bit-for-bit into Rust, then running the original 65,000-line lunar flight control program (unchanged) on top of it. The entire process was completed autonomously by an Agent, culminating in the reproduction of the 1202 alarm that nearly aborted the moon landing. Knowledge Workers: Through our Agent product AutoClaw, GLM-5.2’s 1M context and long-horizon task capabilities serve professional scenarios such as design and legal work. For example, it can generate dozens of prototype pages from requirements in one go, autonomously iterating and fine-tuning them while maintaining brand guidelines and consistency within the long context.
V. Open Source and Usage
GLM-5.2 is open-sourced on Hugging Face and ModelScope. The model weights are released under the most permissive MIT License, allowing free download, deployment, and commercial use. Mainstream inference frameworks such as vLLM, SGLang, and transformers already provide support. Meanwhile, the GLM-5.2 API is live and included in the GLM Coding Plan, with upgrades for long-context and long-horizon tasks available to all users.
- Open Source Links
- GitHub: https://github.com/zai-org/GLM-5
- Hugging Face: https://huggingface.co/zai-org/GLM-5.2
- ModelScope: https://modelscope.cn/models/ZhipuAI/GLM-5.2
- Official API Access
- BigModel Open Platform: https://docs.bigmodel.cn/cn/guide/models/text/glm-5.2
- Z.ai: https://docs.z.ai/guides/llm/glm-5.2
- Online Experience
- Z.ai: https://chat.z.ai
- ChatGLM App/Web Version: https://chatglm.cn
- Agents
- AutoClaw (Office Scenarios): https://autoglm.zhipuai.cn
- ZCode (Coding Tool): https://zcode.z.ai/cn
*Epilogue
On the road to AGI, we still have many mountains to climb. Our next target is Fully Autonomous Agent Systems. Building upon long-horizon tasks, swarms of agents capable of autonomous driving, collaborative work, and 24/7 operation will emerge as a new form of productivity. Moving from "intelligent assistants" to "digital employees," we aim to build an agent society comprising thousands of distinct professional "personalities" and "skills," enabling them to autonomously debate, collaborate, review code, and schedule resources, achieving "self-driving" levels of digital productivity. Many core technologies still require breakthroughs: Memory, Continual Learning, and Self-Judge.