GLM-5.2: Z.ai's 753B Open-Weight Model That Tied GPT-5.5 at 1/7 Cost — June 2026
> Z.ai GLM-5.2 753B MoE MIT open-weights hits #2 WebDev on lmarena and ties GPT-5.5 GDPval at 7x lower cost. Full benchmarks, pricing and self-host guide.
GLM-5.2: Z.ai's 753B Open-Weight Model That Tied GPT-5.5 at 1/7 Cost — June 2026
On June 14, 2026, Z.ai (formerly Zhipu AI) quietly dropped an open-weight bomb. GLM-5.2 — 753 billion parameters, MIT licensed, 1M context, and trained to code like a frontier lab model. Within 72 hours it hit #2 on LMSYS WebDev Arena, just 59 Elo behind Claude Fable 5, and tied GPT-5.5 on GDPval at roughly one-seventh the inference cost.
This isn't another "open-source almost as good" story. This is margin collapse in real time.
What Is GLM-5.2?
GLM-5.2 is Z.ai's flagship MoE (Mixture-of-Experts) model, successor to GLM-4.5. Key facts from the June 13-16 release window:
- 753B total parameters, ~52B active per token (MoE sparsity)
- License: MIT — full commercial use, weights on Hugging Face
zai-org/GLM-5.2 - 1M token context natively, with YaRN-extended long context training
- Two thinking modes:
high(fast reasoning) andmax(extended chain-of-thought, similar to Claude extended thinking) - Training: 15T+ tokens, heavy code and agentic tool-use mix, RL with verifiable rewards
- Inference cheap to serve: FP8 friendly, MLA attention, SGLang / vLLM ready day one
Compared to dense 405B models, GLM-5.2 only activates ~7% of parameters per forward pass, making it cheaper to host than Llama 4 Behemoth while being far smarter.
If you missed the May roundup of frontier shifts, see our AI Model Roundup May 2026 and Chinese vs American AI Models June 2026 for context.
Architecture: Why MoE Matters for Cost
GLM-5.2 uses a deep MoE with 160 experts per MoE layer and top-8 routing. Two innovations stand out:
- Shared Expert + Routed Experts: 2 always-on shared experts stabilize training, plus 6 routed. Reduces expert collapse.
- MLA (Multi-head Latent Attention): Compresses KV-cache by ~70%, enabling that 1M context without 300GB VRAM.
- Fine-grained quantization: Official FP8, INT4 AWQ and GPTQ quants day-1. W8A8 actually usable.
Result: 25-30 tokens/sec on 8x H100 for the full model in FP8, ~68 tok/s with 2-bit active cache. For a 753B model, that's insane. A Llama 3.1 405B dense needs similar hardware for lower quality.
Benchmark Earthquake: #2 WebDev, Tied GDPval
Let's cut to the numbers.
lmarena.ai Coding and WebDev
GLM-5.2 scores 1423 Elo on WebDev as of June 17, making it #2 overall — only 59 points behind Claude Fable 5 (1482), ahead of Claude Opus 4.8 (1411) and GPT-5.5 (1408). On general Coding arena, it's #4 at 1387.
This matters because WebDev Arena is not synthetic. It's real human votes on "build me a SaaS landing page / dashboard / interactive app". GLM-5.2 dominates because Z.ai optimized for front-end generation and agentic tool use.
GDPval — The Agentic Economist Benchmark
On GDPval (AI judged on real-world economic task completion: building spreadsheets, analyzing startups, managing cloud infra), GLM-5.2 scores 61.2% — dead tied with GPT-5.5 at 61.4%, ahead of Opus 4.8 at 59.1%. Cost per completed task: $0.31 vs GPT-5.5 $2.18. That's 7x cheaper.
Z.ai's thesis: open-weights + cheap inference = agent swarm deployment. Why pay OpenAI $15 in output tokens when you can self-host an army of GLM?
Other Benchmarks (Official)
- SWE-Bench Verified: 71.8% (Opus 4.8: 74.1%, Fable 5: 76.3%, GPT-5.5: 72.0%)
- SWE-Bench Multilingual: 68.4% — #1 open-weight
- LiveCodeBench v6: 64.2%
- AIME 2025: 78.3% in max mode
- GPQA Diamond: 72.1%
- WebArena + OSWorld combined (agent): 58.7% vs GPT-5.5 57.9%
Not beating Fable 5 everywhere, but within 2-4 points while being open and 7x cheaper. That's the story.
Pricing Comparison: Margin Collapse Is Here
Z.ai's official inference and third-party pricing undercut frontier labs brutally:
| Provider | Model | Input $/1M | Output $/1M | Notes |
|---|---|---|---|---|
| Z.ai (GLM official) | GLM-5.2 | $1.40 | $4.40 | 1M context, high mode included |
| Fireworks AI | GLM-5.2 | $1.50 | $4.79 | FP8, 200 tok/s endpoint |
| Together AI | GLM-5.2 | $1.60 | $5.00 | |
| OpenRouter | GLM-5.2 avg | $1.55 | $4.90 | |
| Anthropic | Claude Fable 5 | $5.00 | $25.00 | |
| Anthropic | Claude Opus 4.8 | $5.00 | $25.00 | |
| OpenAI | GPT-5.5 | $10.00 | $15.00 | Tier-1 / flex lower |
Math: A 100k input + 20k output agentic coding run costs $1.03 on GLM-5.2 vs $7.00 on GPT-5.5 and $10.00 on Opus 4.8. Multiply by 10k runs/day for your coding agent fleet — that's $90k/month saved per 10k daily tasks.
This is why Replit, Cursor and Windsurf added free GLM-5.2 tiers last week.
How to Use GLM-5.2 Today
Option 1: API — Drop-in OpenAI Compatible
Z.ai provides OpenAI-compatible endpoint.
typescript1import OpenAI from "openai"; 2 3const client = new OpenAI({ 4 baseURL: "https://api.z.ai/api/paas/v4/", 5 apiKey: process.env.ZAI_API_KEY, 6}); 7 8const res = await client.chat.completions.create({ 9 model: "glm-5.2", 10 messages: [ 11 { role: "system", content: "You are a principal frontend engineer. Think step by step." }, 12 { role: "user", content: "Build a realtime collaborative kanban board in Next.js 15 with Supabase Realtime. Use Tailwind." } 13 ], 14 // GLM-specific: reasoning_effort = high | max 15 // @ts-ignore 16 reasoning_effort: "max", 17 max_tokens: 8192, 18 temperature: 0.2 19}); 20 21console.log(res.choices[0].message.content);
Fireworks version:
typescript1const client = new OpenAI({ 2 baseURL: "https://api.fireworks.ai/inference/v1", 3 apiKey: process.env.FIREWORKS_API_KEY 4}); 5// model: accounts/fireworks/models/glm-5-2
Option 2: Self-Host — 8x H100 or Bust?
Official Docker + SGLang.
Recommended: 8x H100 80GB FP8
bash1# Clone inference 2git clone https://github.com/zai-org/GLM-5.2-Inference 3cd GLM-5.2-Inference 4 5# SGLang FP8 serving 6docker run --gpus all -p 30000:30000 \ 7 -v ~/.cache/huggingface:/root/.cache/huggingface \ 8 lmsys/sglang:latest \ 9 python -m sglang.launch_server \ 10 --model-path zai-org/GLM-5.2 \ 11 --quantization fp8 \ 12 --tp 8 --dp 1 \ 13 --context-length 1048576 \ 14 --enable-mixed-chunk --enable-memory-saver 15 16# Test 17curl http://localhost:30000/v1/chat/completions -H "Content-Type: application/json" -d '{ 18 "model": "glm-5.2", 19 "messages": [{"role":"user","content":"Write a Rust async rate limiter"}], 20 "reasoning_effort": "high" 21}'
Budget: 4x H100 with quantization
- Uses AWQ INT4:
zai-org/GLM-5.2-AWQneeds ~320GB total -> fits on 4x H100 80GB with tensor parallel 4. - Performance ~18 tok/s, still usable for batch.
- For home lab: 2x 8x RTX 5090 32GB via offload (ExLlama / TensorRT-LLM) community already reports ~4 tok/s with NVLink.
vLLM alternative:
bash1vllm serve zai-org/GLM-5.2 --tensor-parallel-size 8 \ 2 --quantization fp8 --max-model-len 262144 --enforce-eager
The model supports tool calling natively (OpenAI tools format) and MCP-style streaming.
The Best Open Stack in June 2026: GLM-5.2 + Qwen3.7 Max
The open-weight landscape in June 2026 is wild. GLM-5.2 doesn't live alone.
- Qwen3.7 Max (Qwen 235B-A22B) dropped June 10, leads on reasoning/math.
- GLM-5.2 leads on coding/WebDev and agentic tool use.
- Together: Qwen for planning, GLM for execution. Several agent frameworks (Cline, RooCode, Claude Routines pattern) now route automatically.
If you followed our Claude Code Routines piece, you can swap Claude with GLM-5.2 as executor and cut cost 80% with minimal quality loss.
For compute cost breakdowns, see also Beyond Power Laws: Effects of Compute Scaling on Inference Costs.
Full Comparison Table vs Frontier
| Dimension | GLM-5.2 (Z.ai) | Claude Fable 5 | Claude Opus 4.8 | GPT-5.5 | Qwen3.7 Max |
|---|---|---|---|---|---|
| Params | 753B MoE (52B active) | ~? 400B dense est | ~? 300B | ~? 500B est MoE | 235B MoE (22B active) |
| License | MIT Open-Weight | Proprietary | Proprietary | Proprietary | Qwen Lic (commercial OK) |
| Context | 1M | 500K | 200K | 400K | 256K (1M ext) |
| WebDev lmarena | 1423 #2 | 1482 #1 | 1411 #4 | 1408 #5 | 1360 #8 |
| GDPval | 61.2% $0.31/task | 66.8% | 59.1% | 61.4% $2.18/task | 57.3% |
| SWE-Bench Verified | 71.8% | 76.3% | 74.1% | 72.0% | 69.2% |
| Output $/1M | $4.40 | $25 | $25 | $15 | $4.00 |
| Self-host | 8x H100 FP8 | No | No | No | 4x H100 |
| Thinking modes | high / max | extended | extended | high | thinking |
TL;DR: Fable 5 still king on raw quality. GLM-5.2 king on value, openness, and agentic web tasks.
Why This Matters: The Margin Collapse Thesis
For 18 months frontier labs justified $25 output pricing because open models were 6-12 months behind. GLM-5.2 closes that to ~6 weeks and ties economic usefulness benchmarks.
Three consequences:
- Coding platforms go free: Cursor, Windsurf, Zed now offer unlimited GLM-5.2 on free tier because their cost is ~$0.04 per autocomplete session vs $0.30 on Claude.
- Agent swarms viable: Running 50 parallel agents to refactore a repo used to cost $120 on Opus. Now $17 on GLM-5.2 self-hosted.
- Chinese open-weight dominance: Since DeepSeek V3/R1 Jan 2025, then Kimi K2, now GLM-5.2 and Qwen3.7, the best price/performance models are all MIT/Apache from China. American open models (Llama 4) lag.
If you're building AI products, your gross margin just doubled if you switch default coder to GLM-5.2.
FAQ
Q: Is GLM-5.2 actually MIT? Can I use commercially?
Yes. MIT license on Hugging Face zai-org/GLM-5.2. Full commercial, fine-tune, distill allowed. No restrictive use clause unlike Llama.
Q: What's difference between high and max reasoning? High: ~2-4k thinking tokens, fast response, ideal for autocomplete and chat. Max: up to 32k thinking tokens, deep plan + reflect + verify loops. Use max for SWE-Bench style tasks. Costs more but still cheap.
Q: Does it work with Claude Code / Cline / Roo?
Yes. In Cline set Provider: OpenAI Compatible, Base URL https://api.z.ai/api/paas/v4/, model glm-5.2. Or Fireworks. Community already has settings JSON in GLM repo.
Q: How much VRAM to self-host? FP8: 8x 80GB (640GB total but ~380GB due to sparsity and MLA). INT4: 4x 80GB or 8x 48GB (L40S). FP8 KV-cache for 1M context adds ~120GB but paged.
Q: Is it censored? Base model has standard PRC alignment. MIT version has minimal refusals. Community uncensored finetunes already on Hugging Face, but base is surprisingly permissive for code.
Q: Should I switch from Opus 4.8 / Fable 5? Hybrid. Keep Fable 5 as architect / reviewer. Use GLM-5.2 as fast executor. Many teams report 85% tasks fully on GLM, 15% escalated to Fable — best cost/quality tradeoff.
Conclusion
GLM-5.2 is not just another model release. It's proof that 753B MoE at 52B active with MIT license can match a $15/1M frontier model at $4.40 and run on hardware you can rent for $18/hr.
The open-weight earthquake that started with DeepSeek V3 in December 2024 just got its June 2026 aftershock — and this time it's wearing an MIT license and doing your front-end tickets.
Try it via Z.ai or Fireworks today. If you're self-hosting agents, the ROI is immediate.
Next: We'll benchmark GLM-5.2 vs Grok 4.5 on real repo refactoring. Subscribe to get it.
Internal Cluster: AI Model Roundup June 2026 | Chinese vs American AI June 2026 | Claude Fable 5 Mythos | Migrating to Edge-Native Agent Swarms | Beyond Power Laws