GLM 5.2 Review: We Tested Z.ai's Open Model
GLM 5.2 is Z.ai's June 2026 open-weight flagship — a ~753B-parameter Mixture-of-Experts model, MIT-licensed, with a genuine 1M-token context window. Most reviews stop at the vendor benchmark table on its Hugging Face card. We went further: we ran GLM 5.2 ourselves through our executed 9-task coding benchmark, scoring each answer by running the generated code against hidden tests. It scored 9/9 at about $1.99 in measured cost per 1,000 tasks (priced on July 17, 2026, the day of the sweep) — and it is served on DataLLM Lab at $0.72 / $2.27 per 1M tokens as of July 29, 2026, down from $0.93 / $3.00 earlier in the month. This review covers what GLM 5.2 is, exactly how it did in our test, the pricing, the open-weights/self-host story, and how it stacks up against rivals.
What GLM 5.2 is
GLM 5.2 is Z.ai's June 2026 open-weight flagship — a ~753B-parameter Mixture-of-Experts model, MIT-licensed, with a 1M-token context window. It shipped on June 13, 2026 and is the current top of Z.ai's GLM line. The weights live on Hugging Face at zai-org/GLM-5.2; the safetensors metadata lists 753B total parameters, and independent inference recipes put roughly 40B active per token (256 experts, 8 activated). It is text-only, adds two thinking-effort levels so you can trade reasoning depth against throughput, and uses an IndexShare mechanism that reuses one indexer across every four sparse-attention layers — Z.ai says this cuts per-token FLOPs by 2.9x at 1M context, which is what keeps the long window usable rather than nominal.
How GLM 5.2 did in our test
We did not take the leaderboard on faith — we ran GLM 5.2 ourselves. Our executed-code coding benchmark gives every model the same nine programming tasks and scores each answer by running the generated code against hidden tests — no self-report, no vibes. Here is exactly how GLM 5.2 did:
| Our benchmark metric | GLM 5.2 result |
|---|---|
| Tasks passed (executed against hidden tests) | 9 / 9 |
| Misses | None — clean sweep of all nine |
| Measured cost per 1,000 tasks (priced 2026-07-17) | ~$1.99 |
| Average latency per task | 12.3 s |
| Reasoning tokens (across 9 tasks) | ~5,000 (~560 per task) |
The correctness is frontier-level: 9/9 — a clean sweep of all nine tasks — puts GLM 5.2 in the same tier as the closed leaders on this set. The nuance is cost. Real spend is price × tokens generated, not the sticker rate, and GLM reasons moderately (~560 tokens per task). That, plus a ~12.3s average, put its true cost at about $1.99 per 1,000 tasks: below Claude Opus 4.8's $4.05 in the same run, but well above lean coders like DeepSeek V4-Flash ($0.13) and Qwen3 Coder Next ($0.10). One date-keeping note: every per-task figure in this section was priced on July 17, 2026, the day of the sweep, when GLM 5.2 listed at $0.93 / $3.00. Z.ai has since cut it to $0.72 / $2.27, so the identical token usage would bill roughly 23% lower — around $1.51 to $1.54 per 1,000 tasks, depending on the input/output split — at the July 29, 2026 rate. We leave the measured number as measured and date it rather than quietly restating it.
GLM 5.2 spec sheet
The confirmed facts, in one place — official card facts first, medium-confidence items flagged:
| Spec | Value | Source |
|---|---|---|
| Developer | Z.ai (Zhipu) | Official |
| Released | June 13, 2026 | Independent (medium) |
| Architecture | Mixture-of-Experts (MoE), text-only | Official |
| Total parameters | 753B (safetensors metadata) | Official (HF card) |
| Active parameters / token | ~40B (256 experts, 8 active) | Independent (medium) |
| License | MIT (open weights) | Official |
| Context window | 1M tokens | Official |
| Max output | 131,072 tokens | Independent (medium) |
| Reasoning control | Two thinking-effort levels | Official |
| Efficiency feature | IndexShare (−2.9x FLOPs at 1M ctx) | Official |
| On DataLLM Lab | $0.72 in / $2.27 out per 1M | DataLLM Lab catalog (July 29, 2026) |
Vendor benchmarks (read them carefully)
Every headline number on the GLM 5.2 card is vendor-reported — strong, but not yet independently reproduced. Z.ai now prints a benchmark table on the Hugging Face card; treat these as vendor framing until third parties like Artificial Analysis reproduce them:
| Benchmark | GLM 5.2 (vendor-reported) |
|---|---|
| Humanity's Last Exam (HLE) | 40.5 |
| HLE with tools | 54.7 |
| SWE-bench Pro | 62.1 |
| AIME 2026 | 99.2 |
| GPQA-Diamond | 91.2 |
| Terminal Bench 2.1 (Terminus-2) | 81.0 (82.7 best harness) |
The honest read: these are frontier-competitive figures, and they line up directionally with what we saw in our own executed test (strong coding, strong reasoning). But vendor and independent numbers deserve different weight — our 9/9 is the one figure on this page we generated ourselves. Where GLM 5.2 lands against the broader open field is tracked in our best open-source LLM guide.
Pricing on DataLLM Lab
As of July 29, 2026, GLM 5.2 is served on DataLLM Lab at $0.72 input / $2.27 output per 1M tokens, with the full 1M-token context window. That is a cut from the $0.93 / $3.00 it listed at earlier in July, and a fraction of closed-frontier pricing — Claude Opus 4.8, for comparison, is $5 / $25, roughly seven times GLM 5.2 on input and eleven times on output. But as our test showed, the rate card is the start of the cost question, not the end: GLM 5.2's reasoning verbosity means you pay for more output tokens than a terse model would emit. Budget on real per-task spend — ~$1.99 per 1,000 coding tasks in our run, measured and priced on July 17, 2026 at the older rate, or roughly $1.5 if you reprice the same token usage at today's $0.72 / $2.27 — not the sticker rate alone. List prices move; see the live GLM 5.2 model page or the full pricing table for current numbers.
Open weights & self-host
GLM 5.2 is MIT-licensed with open weights — the most permissive footing an open flagship can ship on. MIT means no regional limits and no field-of-use clause: you can self-host, fine-tune, and ship commercially. The weights (including FP8 variants) are on Hugging Face under zai-org/GLM-5.2, and community inference recipes cover serving it on vLLM.
The practical catch is scale: at ~753B total parameters this is a multi-GPU server, not a laptop — so most teams call it over an API and reserve self-hosting for data-control or fine-tuning needs. If you are weighing local deployment, our running LLMs locally guide covers the hardware math, and DeepSeek R1 vs gpt-oss is a useful reference point for how open reasoners compare on self-host cost.
GLM 5.2 vs rivals
Among the models we serve, GLM 5.2 is the open-weights value pick for reasoning-heavy and long-context work. A note on honesty first: of the models below, GLM 5.2 is the only one we have first-party executed on this benchmark — the rest we position on confirmed specs and pricing, not on numbers we invented.
| Model | License | Context | We tested? | Best for |
|---|---|---|---|---|
| GLM 5.2 | MIT (open) | 1M | Yes — 9/9 | Open-weights reasoning & long context |
| Claude Opus 4.8 | Closed | See page | Yes (same run) | Top-end closed frontier, at a premium |
| Nemotron 3 Ultra | Open | See page | Not yet | NVIDIA open stack / enterprise |
| Mistral Medium 3.5 | See page | See page | Not yet | Balanced European alternative |
Where GLM 5.2 wins is the combination: frontier-adjacent correctness, a real 1M window, and MIT weights — none of which a closed flagship offers together. Where it loses is per-task frugality; if you want a cheaper coder and can trade a little accuracy, our best coding LLM guide ranks the lean options. And if you route a mix of models, a gateway lets you A/B GLM 5.2 against these rivals on one key — see what an LLM gateway is.
How to call GLM 5.2
GLM 5.2 is served on DataLLM Lab through our OpenAI-compatible endpoint — point the OpenAI SDK at our base URL and use the model id:
from openai import OpenAI
client = OpenAI(base_url="https://www.datallmlab.com/v1", api_key="$DATALLMLAB_API_KEY")
resp = client.chat.completions.create(
model="z-ai/glm-5.2",
messages=[{"role": "user", "content": "Plan and implement this feature end to end..."}],
)
print(resp.choices[0].message.content)
Because the endpoint is OpenAI-compatible, the same code reaches 300+ other models by swapping the model id — so you can benchmark GLM 5.2 against Claude Opus 4.8 or a lean coder without touching your integration. Prefer to run the weights yourself? Download them from Hugging Face (zai-org/GLM-5.2) and self-host.
Call GLM 5.2 and 300+ models with one key
GLM 5.2 at $0.72 / $2.27 with a 1M context, alongside Claude Opus 4.8, Nemotron 3 Ultra and Mistral Medium 3.5 — one OpenAI-compatible endpoint, live price comparison, automatic failover.
FAQ
What is GLM 5.2?
Z.ai's June 2026 open-weight flagship: a ~753B MoE model (~40B active/token), MIT-licensed, with a 1M-token context window and a ~131K output cap. Released June 13, 2026, with two thinking-effort levels.
How did GLM 5.2 do in your test?
In our executed 9-task coding benchmark it scored 9/9 (a clean sweep), averaged 12.3s per task, and emitted ~560 reasoning tokens per task — putting real cost at ~$1.99 per 1,000 tasks, priced July 17, 2026.
How much does GLM 5.2 cost?
On DataLLM Lab, $0.72 input / $2.27 output per 1M tokens with a 1M context, as of July 29, 2026 — down from $0.93 / $3.00. Real per-task spend was ~$1.99 per 1,000 coding tasks in our run, priced July 17, 2026 at the older rate (~$1.5 if repriced today). MIT weights are also free to self-host.
Is GLM 5.2 open source and can I self-host it?
Yes — MIT-licensed open weights on Hugging Face (zai-org/GLM-5.2), including FP8 variants. Self-host, fine-tune, ship commercially. At ~753B total it needs a multi-GPU server, so many teams call it via API instead.
What is GLM 5.2's context window?
1M tokens, with output capped at 131,072 per response. IndexShare cuts per-token FLOPs ~2.9x at 1M context, which keeps the long window usable.
Is GLM 5.2 good for coding?
In our executed benchmark, yes — 9/9 correct. Vendor-reported SWE-bench Pro is 62.1 and Terminal Bench 2.1 is 81.0 (not yet independently reproduced). Accurate at moderate cost, pricier per task than lean coders but far below the closed flagships.
How does GLM 5.2 compare to closed frontier models?
Frontier-adjacent on correctness at a fraction of the price — it matched the closed frontier on our set (9/9) while costing far less per task than Claude Opus 4.8, and it is open-weights, which no closed flagship is.
DataLLM Lab