GLM-5.2 — The 1M-Context Flagship GLM Model

GLM-5.2 is the flagship open-weight GLM model, built for long-horizon task completion and agentic coding rather than single-turn chat. It is the release that took the family's usable context from 200,000 tokens to a solid one million, introduced explicit effort levels, and rebuilt the sparse-attention stack around a shared indexer. For a team evaluating open-weight alternatives to the closed frontier, this is the GLM model that actually competes on the evaluations those teams care about — and it does so under an MIT license with weights published openly.

Measured against its predecessor GLM-5.1, GLM-5.2 is not an incremental refresh. Terminal-Bench 2.1 moves from 63.5 to 81.0, DeepSWE from 18.0 to 46.2 and FrontierSWE Dominance from 30.5 to 74.4 — all figures as published by the model authors, none of them measured here. The practical consequence is that a coding agent can hold an entire repository, its test output and its own prior attempts inside one trajectory instead of re-reading fragments through a retrieval layer.

1M
token context
raised from 200K and trained to stay usable across the window
81.0
Terminal-Bench 2.1
published for GLM-5.2, up from 63.5 on GLM-5.1
MIT
open-source license
open weights, no regional limits

Free AI Playground — Try a Live Open-Source LLM

No sign-up, no account, no credits. Type a prompt and get a streamed answer.

Response will stream here...

This playground runs a free open-source LLM via OpenRouter. It is not GLM-5.2 and does not use GLM weights — it's here so you can test a live model while you read the published GLM benchmark data below.

What the 1M Context Window Actually Buys You

A one-million-token context changes what you build, not just how much you can paste. Instead of a retrieval pipeline feeding the model small, lossy snippets, you can load a whole repository, a complete API reference or several days of logs into one prompt and let the model reason across all of it at once. That is what makes cross-file dependencies and systemic failures visible: the bug that only appears when the service boundary, the migration and the test fixture are all in view at the same time. GLM-5.2 was trained on long-context coding-agent trajectories covering large-scale implementation, automated research, performance optimisation and complex debugging, which is why the model authors describe the window as solid rather than merely accepted — quality is meant to hold deep into the context instead of degrading once a run gets messy.

Context window
1,000,000 tokens
License
MIT open source
Effort levels
Non-Thinking · High · Max
Max output
128,000 tokens
Weights host
HuggingFace · ModelScope

GLM-5.2 Benchmark Results

Scores as published by the model authors.

The published GLM-5.2 column is strongest exactly where the model was designed to be: agentic coding and long-horizon execution. It posts 81.0 on Terminal-Bench 2.1 under the Terminus-2 harness and 82.7 under Claude Code, 76.8 on the MCP-Atlas public set, and 74.4 on FrontierSWE Dominance, where individual tasks run up to twenty hours. On pure reasoning it reports 99.2 on AIME 2026 and 91.2 on GPQA-Diamond. Across all three long-horizon evaluations — FrontierSWE, PostTrainBench and SWE-Marathon — it is the highest-ranked open-source model in the published comparison set.

See all 17 GLM benchmarks in detail →

How GLM-5.2 Compares

Comparison on SWE-bench Pro, as published by the model authors.

On SWE-bench Pro, GLM-5.2's 62.1 trails Claude Opus 4.8's 69.2 but clears GPT-5.5 at 58.6 and Gemini 3.1 Pro at 54.2 — and it clears its own predecessor GLM-5.1 at 58.4. That shape repeats across the table: the closed frontier still leads several standard coding evaluations, while GLM-5.2 sits at the top of the open-weight field and takes individual rows outright, including Terminal-Bench 2.1 under the Claude Code harness (82.7 against 78.9) and AIME 2026 (99.2 against 95.7).

Read the full GLM vs Claude comparison →

Where GLM-5.2 Sits in the GLM Model Lineup

GLM-5.2 is the current head of a line that runs GLM-4.5-Air and GLM-4.7 through GLM-5, GLM-5-Turbo and GLM-5.1. Each step carried a different priority — GLM-4.7 focused on programming and front-end generation, GLM-5-Turbo on long-chain agent execution, GLM-5.1 on multi-hour autonomous work — and GLM-5.2 folds those gains into one model with a far larger window. If your hardware budget rules out the flagship, the lightweight GLM-4.7-Flash and GLM-4.5-Air tiers are the same family under the same MIT license.

More GLM Models

View all

GLM-5.2 FAQ

What makes GLM-5.2 different from GLM-5.1?
GLM-5.2 raises the usable context from 200,000 to a solid 1,000,000 tokens and rebuilds sparse attention around IndexShare, which cuts per-token FLOPs by 2.9× at 1M context length. The published benchmark deltas are large: Terminal-Bench 2.1 goes 63.5 to 81.0, DeepSWE 18.0 to 46.2 and FrontierSWE Dominance 30.5 to 74.4. It also introduces the Non-Thinking, High and Max effort levels.
Is GLM-5.2 open source?
Yes. The core GLM-5.2 weights are released under an MIT license with no regional restrictions, published on HuggingFace and ModelScope. You can download them, fine-tune them and serve them on your own hardware without asking permission, and without your prompts leaving your own infrastructure.
Can I run the GLM-5.2 model locally?
Yes. The model authors list support for transformers, vLLM, SGLang, xLLM and ktransformers. Serving the full 1M context is a memory problem more than a compute one — past a few hundred thousand tokens the bottleneck becomes KV-cache capacity — so most self-hosted deployments run a shorter window on the same weights.
What are the effort levels in GLM-5.2?
Non-Thinking, High and Max control how much computation the model spends per task. On the published agentic coding curve that is roughly 63% at about 35K output tokens, 72% at about 43K and 74% at about 83K. High is the practical default; Max earns its token spend only on genuinely hard, long-horizon problems.
How does GLM-5.2 compare to Claude Opus 4.8?
Opus 4.8 leads most of the published table, including SWE-bench Pro at 69.2 against 62.1, NL2Repo and SWE-Marathon. GLM-5.2 takes Terminal-Bench 2.1 under the Claude Code harness at 82.7 against 78.9, plus AIME 2026 and IMOAnswerBench, and comes within a point on FrontierSWE. It also carries five times the context window and open weights.

Try a Live AI Model Free — No Account Needed

Read the GLM model benchmarks, then put a real model to work. The playground above is free and needs nothing from you; if you want a fuller AI toolkit, our partner's free tier starts here.