GLM-5.2 is Z.ai's flagship model for "long-horizon tasks." Its key selling points are a genuinely usable 1M-token context, flexible reasoning modes, and the MIT open-source license (with no regional restrictions). According to the official account, it delivers a substantial improvement over GLM-5.1 on long-horizon tasks and is the first model to "reliably withstand engineering pressure" with a 1M context.
1M context: Training on a 1M context was substantially expanded for coding-agent scenarios (large-scale implementation, automated research, performance optimization, and complex debugging), emphasizing that "a 1M context must be engineering-usable, not merely able to accept more tokens."
IndexShare architecture: One indexer is shared by every four layers of sparse attention, reducing FLOPs per token by 2.9× at a 1M context length; improvements to the MTP (multi-token prediction) layer are used for speculative decoding, increasing acceptance length by up to 20% (ablation: baseline 4.56 → +IndexShare+KV Share 5.10 → +Rejection Sampling 5.29 → +End-to-end TV Loss 5.47).
Inference serving: LayerSplit provides fine-grained memory management and parallelism; long-context kernels and CPU-side cache management are optimized, with throughput advantages growing as the context gets longer.
Agentic RL (slime framework): Parallel OPD training combines 10+ expert models, with the entire OPD training taking about two days; critic-based PPO (single rollout, token-level advantage) is introduced to support compaction; coding RL adds two-stage anti-cheating (rule-based filter + LLM judge), intercepting hack calls online and returning fake data so the rollout can continue.
Access: GLM Coding Plan (model name GLM-5.2; use GLM-5.2[1m] in Claude Code to enable a 1M context); Z.ai chat; open-source weights on HuggingFace / ModelScope (supporting transformers, vLLM, SGLang, xLLM, and ktransformers).
| Benchmark | GLM-5.2 | GLM-5.1 | Qwen3.7-Max | MiniMax M3 | DeepSeek-V4-Pro | Claude Opus 4.8 | GPT-5.5 | Gemini 3.1 Pro |
|---|---|---|---|---|---|---|---|---|
| HLE | 40.5 | 31.0 | 41.4 | 37.0 | 37.7 | 49.8* | 41.4* | 45.0 |
| HLE w/ Tools | 54.7 | 52.3 | 53.5 | - | 48.2 | 57.9* | 52.2* | 51.4* |
| CritPt | 20.9 | 4.6 | 13.4 | 3.7 | 12.9 | 20.9 | 27.1 | 17.7 |
| AIME 2026 | 99.2 | 95.3 | 97.0 | - | 94.6 | 95.7 | 98.3 | 98.2 |
| HMMT Nov. 2025 | 94.4 | 94.0 | 95.0 | 84.4 | 94.4 | 96.5 | 96.5 | 94.8 |
| HMMT Feb. 2026 | 92.5 | 82.6 | 97.1 | 84.4 | 95.2 | 96.7 | 96.7 | 87.3 |
| IMOAnswerBench | 91.0 | 83.8 | 90.0 | - | 89.8 | 83.5 | - | 81.0 |
| GPQA-Diamond | 91.2 | 86.2 | 90.0 | 93.0 | 90.1 | 93.6 | 93.6 | 94.3 |
| SWE-bench Pro | 62.1 | 58.4 | 60.6 | 59.0 | 55.4 | 69.2 | 58.6 | 54.2 |
| NL2Repo | 48.9 | 42.7 | 47.2 | 42.1 | 35.5 | 69.7 | 50.7 | 33.4 |
| DeepSWE | 46.2 | 18.0 | 18.0 | 20.0 | 8.0 | 58.0 | 70.0 | 10.0 |
| ProgramBench | 63.7 | 50.9 | - | - | 47.8 | 71.9 | 70.8 | 39.5 |
| Terminal-Bench 2.1 (Terminus-2) | 81.0 | 63.5 | 75.0 | 65.0 | 64.0 | 85.0 | 84.0 | 74.0 |
| Terminal-Bench 2.1 (Best Harness) | 82.7 (Claude Code) | 69 (Claude Code) | - | - | - | 78.9 (Claude Code) | 83.4 (Codex) | 70.7 (Gemini CLI) |
| FrontierSWE (Dominance, 2026/06/16) | 74.4 | 30.5 | - | - | 29.0 | 75.1 | 72.6 | 39.6 |
| PostTrainBench | 34.3 | 20.1 | - | - | - | 37.2 | 28.4 | 21.6 |
| SWE-Marathon | 13.0 | 1.0 | - | - | - | 26.0 | 12.0 | 4.0 |
| MCP-Atlas (Public Set) | 76.8 | 71.8 | 76.4 | 74.2 | 73.6 | 77.8 | 75.3 | 69.2 |
| Tool-Decathlon | 48.2 | 40.7 | - | - | 52.8 | 59.9 | 55.6 | 48.8 |
(* Full-set scores.)
FrontierSWE (Proximal evaluation, 1M context + Max mode + 128K output): 74.4, only about 1% behind Opus 4.8 (75.1), about 1% ahead of GPT-5.5 (72.6), and about 11% ahead of Opus 4.7.
PostTrainBench (each agent gets an H100, measuring how much it can improve a small model through post-training): 34.3, second only to Opus 4.8 (37.2).
SWE-Marathon (ultra-long-horizon tasks: writing a compiler, optimizing kernels, and developing production-grade services): 13.0, about 13% behind Opus 4.8 (26.0) (as stated in the original), and still the top open-source model.
HLE and other reasoning tasks: temperature=1.0, top_p=0.95, maximum generation length 163,840; the text-only subset is reported by default.
SWE-bench Pro: OpenHands + custom instruction prompt, temperature=1, top_p=1, max_new_tokens=32k, 400K context.
DeepSWE: official pier evaluation framework + mini-swe-agent, temperature=1.0, top_p=1.0, timeout=2h, 400K context, isolated container (2 CPUs, 8GB RAM, no network).
Terminal-Bench 2.1: Terminus-2 framework (parser=json, timeout=4h, max_new_tokens=48k, max_episodes=500, 256K context, 4 CPU / 8GB RAM limit); the Claude Code version uses a transparent proxy to raise max_new_tokens to 128k, removes the wall-clock limit, and averages five runs.
MCP-Atlas: think mode, a public subset of 500 tasks, a 10-minute timeout per task, and Gemini-3.0-Pro as the judge.
Usage note: Different models may use different harnesses, so cross-row comparisons should be made cautiously.
Quota consumption is 3× during peak periods and 2× off-peak; under the limited-time promotion (through the end of September), off-peak usage is counted as 1×. Peak hours are 14:00–18:00 (UTC+8) every day.
The official recommendation for coding tasks is Max mode.
"Supporting long-horizon tasks starts with making long context engineering-usable: the model must maintain quality acros… This is a necessary excerpt; read the original source for full context.
"A 1M context is easy to claim, but much harder to keep reliable under real engineering pressure."
"Across all three benchmarks, GLM-5.2 is the highest-ranked open-source model, showing that its 1M context has translate… This is a necessary excerpt; read the original source for full context.
All benchmark scores are vendor-reported, including results run by third-party evaluation organizations (Proximal / PostTrainBench / Abundant AI); when comparing with closed-source models, note that the models may use different harnesses, contexts, and modes.
When citing external scores, it is recommended to provide the evaluation configurations from the official footnotes as well; the 5.2 baselines published officially when GLM-5.3 was released (such as Terminal-Bench 3.0 4.6 and DeepSWE v1.1 46.2) use different benchmarks from the 2.x versions in this article, so distinguish the versions carefully.
GLM-5.2