GLM 5.2: Specs, Benchmarks, Pricing, Open Weights
GLM 5.2 is Z.ai's open-weights MIT model: 753B MoE, 1M context, $1.40/$4.40 API. Benchmarks, self-host reality, and how it stacks up vs Claude.
GLM 5.2 is Z.ai's open-weights flagship, and it is the first open model that genuinely feels like a frontier agent inside a coding harness. It is a 753-billion-parameter Mixture-of-Experts model with roughly 40B active per token, a 1M-token context window, MIT-licensed weights on Hugging Face, and an API that costs $1.40 per million input tokens and $4.40 per million output. On Artificial Analysis's Intelligence Index it is the top-ranked open-weights model. On Z.ai's own benchmarks it trades blows with GPT-5.5 and trails Claude Opus 4.8 on the hardest long-horizon coding evals. For a Claude Code developer, the honest read is that GLM 5.2 is a strong, cheap second engine, not a replacement for the Claude frontier.
A note on sourcing: the figures below come from Z.ai's official Hugging Face model card and docs, with every benchmark labeled by who produced it. Z.ai's own marketing pages render with JavaScript and could not be machine-read, so the Hugging Face model card (published by zai-org, the official org) is the authoritative source for the spec and the official benchmark table. Independent third-party evals are flagged as such. Where a number is uncertain or unverifiable, this post says so rather than printing it.
Key Specs
| Spec | Details |
|---|---|
| Developer | Z.ai (formerly Zhipu AI) |
| API model id | glm-5.2 |
| Released | Coding Plan June 13, 2026; API and open weights June 16, 2026 |
| Parameters | 753B total, ~40B active per token (MoE) |
| Architecture | MoE + Dynamic Sparse Attention (glm_moe_dsa), 256 routed + 1 shared experts |
| Context window | 1M tokens (up from 200K in GLM 5.1) |
| Max output | 128K tokens |
| Vision | None. Text-only |
| License | MIT (open weights on Hugging Face) |
| API pricing | $1.40 input / $4.40 output per 1M tokens ($0.26 cached input) |
| Status | Active, leading open-weights model |
What's New: Open Weights That Act Like a Frontier Agent
GLM 5.2's significance is not a single benchmark, it is the combination: open MIT weights, a 1M-token context, and agentic behavior good enough that practitioners compare its arrival to DeepSeek R1's. Three things make it work.
Dynamic Sparse Attention with IndexShare. The headline architecture trick is IndexShare, which reuses a single attention indexer across every four sparse-attention layers. Z.ai reports this cuts per-token FLOPs by 2.9x at a 1M-token context, which is how an open model affords a million-token window without the usual quadratic blowup. The companion technique, IndexCache, is documented in Z.ai's arXiv report 2603.12201.
A 753B MoE that activates ~40B per token. The model routes each token through 8 of 256 experts plus one shared expert across 78 layers. The 753B total is what you download (1.51 TB in BF16); the ~40B active is what actually runs per token, which is what keeps inference tractable. One clarification worth making early: you will see "744B" quoted around the web. That is a VRAM figure for the FP8 build, not the parameter count. The parameter count is 753B.
Agentic-engineering focus. GLM 5.2 was tuned for the work coding agents actually do: planning, tool calls, and multi-step execution. An improved multi-token-prediction layer raises speculative-decoding acceptance length by up to 20% (Z.ai's claim), which helps throughput in long agent loops.
Benchmarks: Read the Source Label on Every Number
This is where discipline matters. The table below is Z.ai's own published benchmark table, run on Z.ai's harness. Competitor numbers in it are as Z.ai reported them; an asterisk marks figures Z.ai took from the vendor's own reporting rather than re-running. Treat these as Z.ai's results, not a neutral referee's.
| Benchmark (Z.ai's harness) | GLM 5.2 | Opus 4.8 | GPT-5.5 | Gemini 3.1 Pro |
|---|---|---|---|---|
| SWE-bench Pro | 62.1 | 69.2* | 58.6 | 54.2 |
| NL2Repo | 48.9 | 69.7 | 50.7 | 33.4 |
| SWE-Marathon | 13.0 | 26.0 | 12.0 | 4.0 |
| Terminal-Bench 2.1 (Terminus-2) | 81.0 | 85.0 | 84.0 | 74.0 |
| MCP-Atlas (public subset) | 76.8 | 77.8 | 75.3 | 69.2 |
| HLE (with tools) | 54.7 | 57.9* | 52.2* | 51.4* |
| AIME 2026 | 99.2 | 95.7 | 98.3 | 98.2 |
| GPQA-Diamond | 91.2 | 93.6 | 93.6 | 94.3 |
Two honest reads come out of this. First, GLM 5.2 is excellent at competition math and reasoning: it tops AIME 2026 at 99.2 over every model in its set. Second, on long-horizon software engineering, the work of synthesizing code across a whole repo, it trails the Claude frontier by a wide margin: NL2Repo 48.9 vs Opus 4.8's 69.7, SWE-Marathon 13.0 vs 26.0. Z.ai's table shows Opus 4.8 ahead on roughly 15 of 19 rows. The "beats GPT-5.5" headline is true on select coding lines and on Z.ai's harness; it is not a clean sweep.
A specific trap on Terminal-Bench: Z.ai ran Opus 4.8 in their own harness and got 85.0 (Terminus-2), while Anthropic's official number for Opus 4.8 is 82.7. GLM 5.2's own best-reported Terminal-Bench figure is also 82.7, the same digits as Anthropic's Opus number measured on a different harness. Those are not the same measurement. Do not read them head-to-head.
Independent Benchmarks (Not Z.ai's)
These come from third parties, which makes them more useful for cross-vendor comparison, with the usual caveat that single-run evals are noisy.
- Artificial Analysis Intelligence Index: 51, ranking GLM 5.2 first among open-weights models in AA's 9-eval composite. AA also clocks it at 168.8 output tokens/sec but flags it as token-hungry, around 43K output tokens per task, which inflates real cost above the sticker price.
- Semgrep IDOR cyber benchmark: 39% F1 (prompt-only, Pydantic-AI), edging Claude Code on Opus 4.6 (37%) and Opus 4.8 (28%) at about $0.17 per vulnerability. Semgrep's own caveat is blunt: "one task, one dataset, one run," and Sonnet 5 was not tested. Semgrep's full multimodal pipeline scored higher (53 to 61%).
- AA-Briefcase (agentic knowledge work): Elo 1266 at $2.40/task, sitting between GPT-5.5 and Opus 4.8 (1356 at $10.40), with Claude Fable 5 far ahead at 1587.
Open Weights and the Self-Host Reality
The license is the genuinely radical part. GLM 5.2 ships under MIT with weights on Hugging Face (zai-org/GLM-5.2 plus an FP8 build), runnable through SGLang, vLLM, Transformers, KTransformers, and Unsloth, with Ascend NPU paths and quantized GGUF via llama.cpp, Ollama, and LM Studio. Z.ai markets it as "Pure Open," and unlike a hosted API, MIT weights cannot be switched off or geofenced.
The asterisk is hardware. The BF16 weights are 1.51 TB. The FP8 build still needs roughly 744 to 890 GB of VRAM; community dynamic-1-bit quants land around 176 to 180 GB. "Open" here means a well-funded team can self-host for data-control or compliance reasons, not that an individual will run this on a workstation. For most people, "open weights" translates to provider choice and price competition rather than a local install.
