
Z.ai’s GLM-5.2 just scored 62.1 on SWE-bench Pro — beating GPT-5.5’s 58.6 on the industry’s most-watched coding benchmark — while costing roughly six times less per token than the frontier models it’s displacing. It runs locally on a well-specced Mac Studio. It’s MIT-licensed. You can download the weights right now. This is the most consequential open-weights coding model release of 2026.
The Benchmark Numbers, Without the Spin
GLM-5.2 wins cleanly on SWE-bench Pro, the benchmark that tracks real GitHub issue resolution across multiple languages. It also beats GPT-5.5 on FrontierSWE (74.4% vs 72.6%), PostTrainBench (34.3 vs 28.4), MCP-Atlas tool-use (76.8 vs 75.3), and AIME 2026 math (99.2 vs 98.3). On the Artificial Analysis Intelligence Index v4.1, it scores 51 — the highest of any open-weights model released to date.
| Model | SWE-bench Pro | FrontierSWE | Input $/M | Output $/M |
|---|---|---|---|---|
| GLM-5.2 | 62.1 | 74.4% | $1.40 | $4.40 |
| GPT-5.5 | 58.6 | 72.6% | $5.00 | $30.00 |
| Claude Opus 4.8 | 69.2 | 75.1% | $5.00 | $25.00 |
Claude Opus 4.8 still leads on the hardest tasks. SWE-Marathon — the ultra-long-horizon benchmark — shows a real gap: Opus 4.8 scores 26.0 to GLM-5.2’s 13.0. If your workflow requires sustained multi-day autonomous coding runs, Opus 4.8 holds the edge. But for typical agentic tasks — repository-level refactors, issue resolution, tool-use pipelines — GLM-5.2 is competitive at a fraction of the cost. That tradeoff matters.
The Cost Case Is the Real Story
Z.ai’s API prices GLM-5.2 at $1.40 per million input tokens and $4.40 per million output tokens. Claude Opus 4.8 runs $5.00 input and $25.00 output. GPT-5.5 is $5.00 input, $30.00 output. That makes GLM-5.2 3.6x cheaper on input and 5.7x cheaper on output than both closed frontier models. For teams running coding agents at volume — thousands of PRs reviewed per month, CI pipelines triggering LLM calls on every push — that delta translates directly to budget.
OpenRouter carries GLM-5.2 at comparable rates and makes it trivial to slot into existing workflows. If you’re already calling Claude or GPT through an OpenRouter-compatible client, switching the model ID is the entire migration. GLM-5.2 ships with Anthropic-compatible endpoints, so Claude Code, Cline, and OpenClaw users can route to it without changing their tooling setup.
How to Run It
The easiest path is the API — Z.ai direct, OpenRouter, Together AI, or DeepInfra. For teams that need data residency or want to eliminate per-token costs entirely, local deployment is viable with the right hardware.
Unsloth’s 2-bit dynamic GGUF quantization compresses the model from 1.51TB to roughly 239GB. A Mac Studio with 256GB unified memory can run it fully GPU-accelerated. The official weights are on Hugging Face, with NVIDIA and RedHatAI having already published FP4/FP8 quantized variants for easier deployment.
# Mac Studio (256GB unified memory) — fully GPU-offloaded
./llama-server \
-m ./glm-5.2-gguf/GLM-5.2-UD-Q2_K_XL.gguf \
--ctx-size 32768 \
--n-gpu-layers 999 \
--host 0.0.0.0 --port 8080
# Desktop: 24GB GPU + 256GB RAM via expert offloading
./llama-server \
-m ./glm-5.2-gguf/GLM-5.2-UD-Q2_K_XL.gguf \
--ctx-size 16384 \
--n-gpu-layers 999 \
--override-tensor "\.ffn_.*_exps\.=CPU" \
--host 0.0.0.0 --port 8080
Desktop setups with a 24GB GPU and 256GB system RAM can use MoE expert offloading to CPU. Expect 3–9 tokens per second at the 2-bit quantization level — slow for interactive chat, acceptable for background agent tasks. Production self-hosting at real throughput requires 8xH200 GPUs with vLLM. See the full local deployment guide for vLLM configuration details.
Third-Party Signal: Semgrep’s Security Benchmark
Benchmarks from model creators carry obvious bias. Third-party tests are more credible. Semgrep’s security research team ran GLM-5.2 against Claude Code on IDOR (Insecure Direct Object Reference) vulnerability detection. GLM-5.2 scored 39% F1; Claude Code scored 32%. Cost per vulnerability identified: roughly $0.17. The team’s conclusion — that harness architecture matters more than model selection — is worth reading on its own, but the headline is that an open model beat Claude Code on a real security research task. Read Semgrep’s full IDOR benchmark writeup for methodology.
What It Can’t Do
GLM-5.2 is text-only. No vision support at launch. If your workflow depends on processing screenshots, image-based PDFs, or design mockups, this is a hard blocker until Z.ai ships a multimodal version.
It also burns through output tokens. Artificial Analysis measured roughly 43,000 output tokens per long-horizon coding task — nearly double competitors like MiniMax-M3’s 24,000. That means higher latency and higher effective API cost per task than the raw per-token price suggests. GLM-5.2 is built for deep thinking, not fast responses. Agentic batch workflows tolerate this well. Real-time interactive use is where you’ll feel the slowness.
Bottom Line
GLM-5.2 is the most capable open-weights coding model available today. It outperforms GPT-5.5 on the benchmarks that matter most for autonomous agents and does so at a fraction of the cost. It’s not better than Claude Opus 4.8 across the board — particularly on the longest-horizon tasks — but it’s close enough on most workloads to make the cost difference hard to ignore. Teams spending serious money on frontier coding agents should evaluate it through the API before ruling it out. The full benchmark breakdown on Emergent is the best place to start.













