GLM-5.2

2026-06-16 · Publisher : Z.ai · Domain : Artificial Intelligence

Z.ai has released GLM-5.2 under the MIT license: a 1M-token context presented as robust, the IndexShare architecture, High and Max effort levels, and 81.0 on Terminal-Bench 2.1 (Terminus-2).

What changes

  • A 1M-token context, with training dedicated to code agent scenarios (large-scale implementation, automated research, optimization, debugging).
  • IndexShare: a single indexer is reused across four sparse attention layers, which reduces FLOPs per token by 2.9 times at 1M context (arXiv 2603.12201).
  • An improved MTP layer for speculative decoding: acceptance length up by as much as 20%.
  • Thinking effort levels (High and Max) to trade off performance and latency.
  • Long-horizon RL training with an anti-cheating module that detects shortcuts (reading protected evaluation artifacts, retrieving solutions) through a rule-based filter followed by LLM judging.

### Context GLM-5.1 (April 2026) topped out at a 200K-token context. In the meantime, the reference closed models cited by the vendor are Claude Opus 4.8, GPT-5.5 and Gemini 3.1 Pro, and the competing open models are Qwen3.7-Max, MiniMax M3 and DeepSeek-V4-Pro. GLM-5.2 targets long tasks (hours to tens of hours) where the context holds end to end. ### What the model brings - A 1M-token context, with training dedicated to code agent scenarios (large-scale implementation, automated research, optimization, debugging). - IndexShare: a single indexer is reused across four sparse attention layers, which reduces FLOPs per token by 2.9 times at 1M context (arXiv 2603.12201). - An improved MTP layer for speculative decoding: acceptance length up by as much as 20%. - Thinking effort levels (High and Max) to trade off performance and latency. - Long-horizon RL training with an anti-cheating module that detects shortcuts (reading protected evaluation artifacts, retrieving solutions) through a rule-based filter followed by LLM judging. ### Architecture and specifications - MoE of type glm_moe_dsa: 78 layers, 256 routed experts of which 8 active per token, 1 shared expert (HF config.json); about 753.3 billion parameters according to the HF count. Number of active parameters: not included in the model card. - Context: 1M tokens; maximum output: 128K (API documentation); modality: text; knowledge cutoff: not disclosed. - License: MIT, presented by the vendor as “without regional limits”. Weights: zai-org/GLM-5.2 and GLM-5.2-FP8. - Deployment: SGLang, vLLM, Transformers, KTransformers, Unsloth, Ascend NPU; required hardware not quantified. ### Cost and access | Model (Z.ai API, current pricing) | Input /M | Cached input /M | Output /M | |---|---|---|---| | GLM-5.2 | 1.4 USD | 0.26 USD | 4.4 USD | ### Benchmarks | Benchmark | GLM-5.2 | GLM-5.1 | Claude Opus 4.8 | GPT-5.5 | Gemini 3.1 Pro | |---|---|---|---|---|---| | Terminal Bench 2.1 (Terminus-2) | 81.0 | 63.5 | 85 | 84 | 74 | | SWE-bench Pro | 62.1 | 58.4 | 69.2 | 58.6 | 54.2 | | NL2Repo | 48.9 | 42.7 | 69.7 | 50.7 | 33.4 | | DeepSWE | 46.2 | 18 | 58 | 70 | 10 | | HLE with tools | 54.7 | 52.3 | 57.9* | 52.2* | 51.4* | | GPQA-Diamond | 91.2 | 86.2 | 93.6 | 93.6 | 94.3 | | MCP-Atlas (public set) | 76.8 | 71.8 | 77.8 | 75.3 | 69.2 | Source: Hugging Face model card of GLM-5.2 (table from the announcement), scores measured by the vendor; asterisk: full set. The FrontierSWE, PostTrainBench and SWE-Marathon results were measured by third parties (Proximal, PostTrainBench, Abundant AI) according to the notes on the card. ### Versus closed models On Terminal Bench 2.1 (Terminus-2), GLM-5.2 scores 81.0, 4 points behind Claude Opus 4.8 (85) and 3 points behind GPT-5.5 (84), and ahead of Gemini 3.1 Pro (74). On SWE-bench Pro, it beats GPT-5.5 (62.1 versus 58.6) and Gemini 3.1 Pro (54.2), but remains 7.1 points behind Opus 4.8 (69.2). On long projects, the blog post states that the model is the top-ranked open model on three benchmarks, at 13% of Opus 4.8 on an ultra-long software engineering benchmark (13.0 versus 26.0 on SWE-Marathon according to the card). On DeepSWE, the gap is clear (46.2 versus 58 for Opus 4.8 and 70 for GPT-5.5). The price of 1.4 USD input and 4.4 USD output per million tokens is that of the vendor's API; no closed-model pricing was verified, and the VentureBeat headline mentioning one sixth of the cost is not included as a verified fact. ### Key takeaways GLM-5.2 brings the GLM series to 1M tokens of usable context for code agents, with MIT weights. The gap with the best closed models remains a few points on terminal benchmarks and larger on ultra-long projects.

Links

Tags : LLM, Open Source, Z.ai, Zhipu AI, GLM, MIT, MoE, Contexte 1M