GLM-5.2 Matches Frontier Coding Scores - With a Catch

Z.ai's GLM-5.2 hits frontier-level coding benchmarks with an MIT license and a price roughly 7x below GPT-5.5 output rates. Here's what the numbers don't tell you.

Cover art for GLM-5.2 Matches Frontier Coding Scores - With a Catch

A developer on your team pastes a benchmark table into Slack. GLM-5.2, MIT-licensed, from Z.ai - scores 74.4 on FrontierSWE, above GPT-5.5's 72.6 and just 0.7 points below Claude Opus 4.8. The price on Fireworks: $1.40 input, $4.40 output per million tokens, against GPT-5.5's roughly $30 per million on output. The table is real. The conclusion - "let's just switch" - is where things get complicated.

GLM-5.2 is the most interesting open-weight model release of mid-2026. It is also the one most likely to be misread. This post goes past the benchmark row and into what a team actually needs to know before routing work to it.

What GLM-5.2 actually is

GLM-5.2 is a Mixture-of-Experts model with 753 billion total parameters. During inference it activates roughly 40 billion of those parameters, routing each input through a gating network that selects the relevant subset of expert weights for the task. The practical upshot: it carries frontier-scale knowledge without paying the full compute cost of a dense model at the same scale - in theory.

The total parameter count is identical to GLM-5.1, its predecessor. The performance improvements come from training data and alignment advances rather than scale, which makes the capability jump between the two more interesting as a signal about what's driving progress in this generation of open models.

Z.ai released the GLM-5.2 weights under the permissive MIT license on June 16, 2026. They can be served with vLLM or SGLang on your own GPUs, fine-tuned, and deployed air-gapped.

Z.ai shipped the weights first and numbers second, which compressed the usual launch-narrative window into a 72-hour discovery period.

What the benchmark table is actually saying

GLM-5.2 reached 51 on the Artificial Analysis Intelligence Index, the new open-weight SOTA and 4th overall behind Fable 5, Opus 4.8, and GPT-5.5 (xhigh).

On GDPval-AA v2 - a real-world agentic benchmark - it scores 1524, effectively level with GPT-5.5 (xhigh, 1514).

On coding specifically, GLM-5.2 is the strongest open-weight coding model released in 2026 so far. Scores like 62.1 on SWE-bench Pro, 81.0 on Terminal-Bench 2.1, and 74.4 on FrontierSWE put it within striking distance of closed frontier models from Anthropic and OpenAI, at roughly one-sixth the API cost.

Here's the comparison that matters for routing decisions:

Model FrontierSWE AA Intelligence Index Output $/M tokens License
Claude Opus 4.8 75.1 ~52 ~$30 Closed
GPT-5.5 72.6 ~52 ~$30 Closed
GLM-5.2 74.4 51 $4.40 MIT
DeepSeek V4 Pro ~65 44 ~$2-5 Open

The gap on raw scoring is small. The price gap is not. Z.ai's GLM-5.2 API is priced at roughly $1.40/M input tokens and $4.40/M output tokens. GPT-5.5 runs about $5/M input and $30/M output, making GLM-5.2's API roughly 7x cheaper on output for comparable coding quality.

One thing the table hides: GLM-5.2 uses 43k output tokens per Intelligence Index task, of which 37k is reasoning. This is up from GLM-5.1 (26k) and higher than open-weight peers MiniMax-M3 (24k) and Kimi K2.6 (35k), placing it among the less token-efficient open-weight models at its intelligence level. If you are paying per token, that reasoning budget matters. The 7x cost advantage shrinks when the model spends more tokens thinking than its peers do.

Beagle in action#eng-platform, 11:22am
The ask
'can we get a cost estimate if we route our PR review agent from GPT-5.5 to GLM-5.2?'
Beagle drafts
pulls last 30 days of token logs from the linked Notion doc, drafts a comparison with current and projected monthly spend at both rates, notes the 43k-token-per-task caveat
You approve
you approve; the estimate posts in the thread with source links before the next standup
Do this in your workspace

The self-hosting reality check

This is where the "free weights" framing collides with physics.

To serve GLM-5.2 at full quality you need roughly 750 GB of GPU memory for the official FP8 weights, which in practice means a single node of 8× NVIDIA H200 SXM5 (1,128 GB total) once you leave headroom for the KV cache and activations.

For a MoE model, this is critical: even though only ~40B parameters activate per forward pass, all 744B parameters must reside in GPU memory at all times. Expert routing cannot page weights in and out at inference latency. You are paying for the full model, not just the active fraction.

At roughly $41,000-$42,000/month for a production-grade AWS or GCP deployment on 8× H100s, self-hosting GLM-5.2 is not cheap infrastructure. It is a capital commitment that needs a defined payback period before it belongs in a budget.

At $26.48/hr on spot, running 24/7 costs roughly $19,066/month for an 8×H200 cluster. Against Z.ai's API at $4.40/M output tokens, the break-even sits at roughly 4.3 billion output tokens per month. That volume requires sustained high-concurrency batch workloads.

The middle path most teams will actually land on: because GLM-5.2 is MIT-licensed, several inference providers now serve it on per-token billing - OpenRouter, Fireworks, DeepInfra, SiliconFlow, and Featherless among them. That gives a middle option between renting Z.ai's API and standing up your own GPUs: you skip the cluster management but still get a choice of host and pricing. It does not, however, give you the in-boundary data control that full self-hosting does.

Adding GLM-5.2 to an agentic coding pipeline
Without Beagle
team compares the benchmark table, assumes 7x cost reduction, starts migration - then discovers output tokens per task are nearly double the incumbent model's
With Beagle
a quick token-log analysis against the actual task profile shows the effective savings are 3-4x, not 7x, and the routing decision is made on real numbers

The AISI finding nobody is talking about enough

A useful external data point arrived in July 2026 from the UK AI Security Institute - and it reframes the open-weight gap question in a way most benchmark coverage misses.

AISI evaluated the cyber capabilities of leading open and closed weight AI models, and found that recent open models GLM-5.2 and DeepSeek V4-Pro perform similarly to frontier closed models released 4 to 7 months before them - a narrower gap than the 6 to 10 months measured through most of 2025.

The interesting number here is not the capability score - it is the cost. The report found that a full 100-million-token autonomous range run costs approximately $1.19 on DeepSeek V4-Pro and $46 on GLM-5.2, compared to roughly $85 for closed-model counterparts. Narrow-task costs were similarly lower, with DeepSeek V4-Pro at $0.28 per task versus $12.50 for Opus 4.5.

AISI frames this as a security concern - a "preparation window" for defenders before frontier-class capabilities become freely accessible. That is a fair frame. The same data also tells you something practical: the capability gap between open and closed models is shrinking faster than most teams have updated their routing assumptions. OpenRouter traffic tells one version of that story: Chinese open-weight providers combined now account for more than 45% of all tokens flowing through the aggregator, up from under 2% a year ago.

The non-obvious consequence: if your team defaulted to a closed frontier model six months ago because open-weight wasn't good enough for your use case, that assumption is worth re-checking - specifically on code and formal reasoning, where the open-weight frontier is narrowing the gap faster than on knowledge work, and that asymmetry matters for production routing.

Where does a teammate like Beagle fit in? Routing decisions are easier when someone has already pulled the token logs, compared the costs, and drafted a recommendation before the meeting. That is exactly the kind of lookup that should not require a calendar invite.

Beagle in action#ai-infra, Thursday
The ask
'is GLM-5.2 actually worth switching to for the doc-gen agent?'
Beagle drafts
reads the linked token usage sheet, drafts a per-task cost comparison at both rates with a break-even estimate
You approve
the channel has a concrete answer with source links before anyone has opened their laptop
Do this in your workspace

GLM-5.2 open weight model: common questions

Is GLM-5.2 actually as good as GPT-5.5 on coding tasks?

On narrow coding benchmarks like FrontierSWE, GLM-5.2 scores 74.4 versus GPT-5.5's 72.6 - effectively the same, with GLM-5.2 slightly ahead. On real-world agentic evals (GDPval-AA v2), they are also level. The gap opens on frontier reasoning and knowledge tasks, where closed models still lead. For coding pipelines specifically, the scores are competitive.

Can I self-host GLM-5.2 without a data center?

Not at full quality. The FP8 weights require roughly 750 GB of GPU memory, which means an 8×H200 node. A quantized INT4 version needs around 411 GB - achievable on a 10× RTX PRO 6000 setup, with some quality trade-off. Most teams without dedicated GPU infrastructure are better served by a third-party inference provider like Fireworks or OpenRouter on the MIT-licensed weights.

What does the AISI cyber benchmark finding mean for using GLM-5.2?

AISI found GLM-5.2 matches closed frontier models from roughly four months earlier on offensive cyber tasks. For most teams using it for coding or knowledge work, this is not directly relevant. The finding matters for compliance and governance teams deciding how to classify the model, and for security teams who need to understand that open-weight refusal training can be removed once weights are distributed.

How does the per-token pricing compare once you account for token usage?

GLM-5.2's API is roughly 7x cheaper than GPT-5.5 on output tokens at list price. But GLM-5.2 uses an average of 43k output tokens per benchmark task - nearly double MiniMax-M3's 24k - because it generates more reasoning tokens. On tasks where extended thinking is the bottleneck, the effective cost advantage is narrower than the headline rate implies. Measure against your own task profile before budgeting.

What is the break-even for self-hosting GLM-5.2 versus the API?

Using Z.ai's API at $4.40/M output tokens as the baseline, the break-even against a spot 8×H200 cluster (roughly $19,000/month) sits at approximately 4.3 billion output tokens per month. That requires sustained high-concurrency batch work. Below that volume, the API is cheaper. Self-hosting makes sense for data-residency requirements regardless of volume, or for teams already operating GPU infrastructure at scale.

Or just watch me work

Point me at your website.

I will read up on your business and come back with what I would run for you. No account, no card, about a minute.

I only read what is public. Nothing is saved to your name until you say so.

Keep reading

Beagle does this work for you, in your Slack.1,000 free credits. No card.Hire Beagle