Solid 1M-Token Context
Specialized training for large implementations, automated research, optimization, and debugging helps the model sustain long, messy engineering trajectories.
GLM-5.2 is Z.AI's flagship open-weight model for long-horizon engineering. It combines a solid 1M-token context, 128K maximum output, flexible thinking effort, and stronger coding-agent performance than GLM-5.1.
The official release centers on usable long context, stronger coding, more efficient sparse attention, and unrestricted open-weight access.
Specialized training for large implementations, automated research, optimization, and debugging helps the model sustain long, messy engineering trajectories.
High and Max thinking-effort controls let developers trade latency and token use for stronger performance on demanding coding tasks.
IndexShare reduces indexer work across sparse-attention layers, while the revised MTP stack improves speculative-decoding acceptance length by up to 20%.
The model is released under the MIT license without regional restrictions and supports Transformers, vLLM, SGLang, xLLM, KTransformers, and other runtimes.
All three benchmark graphics below are copied from Z.AI's official GLM-5.2 release and served locally on MyClaw.

GLM-5.2 reaches 74.4 on FrontierSWE, 34.3 on PostTrainBench, and 13.0 on SWE-Marathon. Z.AI reports it as the highest-ranked open-source model across all three long-horizon evaluations.

The model scores 81.0 on Terminal Bench 2.1 and 62.1 on SWE-bench Pro, up from GLM-5.1's 63.5 and 58.4 respectively, while landing close to closed frontier systems on terminal work.

High and Max effort modes let users allocate more inference compute to hard tasks. The official comparison places GLM-5.2 between Claude Opus 4.7 and 4.8 at similar token budgets, with Max extending capability further.
Official pay-as-you-go API rates sit beside the open-weight checkpoint footprint so you can compare hosted and local deployment paths.
Z.AI lists prices in USD per 1M tokens. Cached-input storage is marked limited-time free on the official pricing page.
Hugging Face reports a 1,506,659,919,872-byte BF16 checkpoint. About 753B stored parameters is an estimate from two bytes per BF16 weight; Z.AI does not publish a separate activated-parameter count for GLM-5.2.
GLM-5.2 combines cross-layer index reuse, a revised speculative-decoding stack, and long-context serving optimizations.

Every four transformer layers share one lightweight indexer. Z.AI says this cuts per-token FLOPs by 2.9× at 1M context and skips indexer dot-product and top-k work in three of every four layers.

The first MTP step supplies shared top-k indices and KV state to following steps, reducing draft-model cost and narrowing the training-inference mismatch that limited GLM-5.1 speculative decoding.

Finer memory management, cache-transfer coordination, long-context kernel work, and CPU scheduling produce a larger throughput advantage as context length grows.
In Z.AI's seven-step MTP experiment, IndexShare, KVShare, rejection sampling, and end-to-end TV loss raise acceptance length from 4.56 to 5.47, a 20% gain.
| Method | Acceptance Length |
|---|---|
| Baseline | 4.56 |
| + IndexShare + KV Share | 5.10 |
| + Rejection Sampling | 5.29 |
| + End-to-End TV Loss | 5.47 (+20%) |
The official release also details the systems used to train longer trajectories without letting reward shortcuts corrupt the signal.
The slime framework organizes white-box and black-box rollouts, compact trajectories, sub-agent workflows, and parallel OPD training. Z.AI says more than ten expert models were merged in roughly two days.
A critic-based PPO formulation learns from individual rollouts and includes all compacted sub-traces, avoiding group-size assumptions when long tasks split into different numbers of trajectories.
A rule-based filter first flags suspicious tool use, then an LLM judge checks intent. Invalid calls are blocked with dummy results while the rollout continues instead of discarding the whole trajectory.
Compare GLM-5.2 with GPT 5.5, Claude Opus 4.8, and MiniMax M3 across the reasoning, coding, and agentic benchmarks published by Z.AI.
| Benchmark | GLM-5.2 | GPT-5.5 | Claude Opus 4.8 | MiniMax M3 |
|---|---|---|---|---|
| Reasoning | ||||
| HLE | 40.5 | 41.4* | 49.8* | 37 |
| HLE (w/ Tools) | 54.7 | 52.2* | 57.9* | — |
| CritPt | 20.9 | 27.1 | 20.9 | 3.7 |
| AIME 2026 | 99.2 | 98.3 | 95.7 | — |
| HMMT Nov. 2025 | 94.4 | 96.5 | 96.5 | 84.4 |
| HMMT Feb. 2026 | 92.5 | 96.7 | 96.7 | 84.4 |
| IMOAnswerBench | 91.0 | — | 83.5 | — |
| GPQA-Diamond | 91.2 | 93.6 | 93.6 | 93 |
| Coding | ||||
| SWE-bench Pro | 62.1 | 58.6 | 69.2 | 59 |
| NL2Repo | 48.9 | 50.7 | 69.7 | 42.1 |
| DeepSWE | 46.2 | 70 | 58 | 20 |
| ProgramBench | 63.7 | 70.8 | 71.9 | — |
| Terminal Bench 2.1 (Terminus-2) | 81.0 | 84 | 85 | 65 |
| Terminal Bench 2.1 (Best Reported Harness) | 82.7 | 83.4 | 78.9 | — |
| FrontierSWE (Dominance, 2026-06-16) | 74.4 | 72.6 | 75.1 | — |
| PostTrainBench | 34.3 | 28.4 | 37.2 | — |
| SWE-Marathon | 13.0 | 12.0 | 26.0 | — |
| Agentic | ||||
| MCP-Atlas (Public Set) | 76.8 | 75.3 | 77.8 | 74.2 |
| Tool-Decathlon | 48.2 | 55.6 | 59.9 | — |
GLM-5.2, GPT 5.5, Opus 4.8, and MiniMax M3 scores come from Z.AI's official GLM-5.2 table. An asterisk marks a full-set HLE score. Harnesses and evaluation settings can differ.
The 1M context and long-horizon training matter most when an agent must preserve constraints and keep working across many dependent steps.
Load architecture, API contracts, tests, conventions, and historical decisions into one reasoning workflow before planning a large implementation or audit.
Use the model for multi-file migrations, module decoupling, SDK adaptation, and cross-language changes that require planning, implementation, verification, and closure.
Apply the long context to paper reproduction, automated research, kernel optimization, performance debugging, and experiments with large code and evidence footprints.
Combine tool calling, MCP, structured output, streaming, context caching, and explicit effort levels for durable agents that must follow hard engineering constraints.
Put GLM-5.2 to work with files, tools, browser-ready workflows, persistent memory, and an always-on managed runtime.
Run GLM-5.2 in MyClaw