GLM-5.2 on Run BiOS
glm-5.2
Top up $20 and we add 50% — that’s about 7.1M input tokens extra on GLM-5.2, on us.
Create an accountPricing
USD per 1M tokens| Input | $1.40 |
| Output | $3.40 |
| Cached input | $0.1490% below fresh input |
Billed per token with no minimum and no monthly fee. Price your workload
Capabilities and limits
- Context window
- 1M tokens
- Modality
- text
- Tool calling
- Supported
- Vision
- Not supported
- Reasoning
- Optional
- Reasoning effort
- low, medium, high
- Prompt caching
- Supported (automatic)
Measured performance
7d- Time to first token (p50)
- 800 ms
- Time to first token (p95)
- 6.0 s
- Throughput (avg)
- 43.6 tok/s
- Throughput (p50)
- 150.0 tok/s
Measured on real Run BiOS traffic over the trailing 7d. Your figures will vary with prompt shape and region.
curl https://api.runbios.ai/v1/chat/completions \
-H "Authorization: Bearer $BIOS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.2",
"messages": [{ "role": "user", "content": "Hello" }]
}'Existing OpenAI SDK code works by changing the base URL and the key. API overview
Model card
Curated by Run BiOS · benchmark figures, where present, are the card’s own, not our measurements
GLM-5.2 is the flagship open-weight language model from Z.ai (formerly Zhipu AI), released in June 2026 as the successor to GLM-5.1. Z.ai positions GLM-5.2 as a model "built for long-horizon tasks": it marks a substantial leap in long-horizon task capability over GLM-5.1 and, for the first time in the series, delivers that capability on a solid 1M-token context window. According to the Z.ai announcement, GLM-5.2 is the highest-ranked open-source model on all three of the long-horizon coding benchmarks it reports, showing that its 1M context translates into practical long-horizon delivery capability.
Headline capabilities highlighted by Z.ai:
- Solid 1M context — a 1M-token context (1,048,576 tokens) that stably sustains long-horizon work.
- Advanced coding with flexible effort — stronger coding capabilities with multiple thinking effort levels to balance performance and latency.
- Improved architecture — the new IndexShare technique reuses the same indexer across every four sparse attention layers, reducing per-token FLOPs by 2.9× at a 1M context length; the MTP (multi-token prediction) layer used for speculative decoding is also improved, increasing acceptance length by up to 20%.
- Pure open — an MIT open-source license, described by Z.ai as "no regional limits, technical access without borders."
Architecture
GLM-5.2 is a mixture-of-experts (MoE) model with sparse attention. Published specifications:
- Scale: 744B total parameters with 40B active per token (744B-A40B); BF16 weights (an FP8 variant is also published).
- Attention: DeepSeek Sparse Attention (DSA) with the new IndexShare mechanism, which shares one indexer across every four sparse attention layers (2.9× per-token FLOPs reduction at 1M context).
- Speculative decoding: an improved MTP layer increases acceptance length by up to 20%.
- Published model configuration: 78 hidden layers (the first 3 dense, the remainder sparse MoE), hidden size 6144, 256 routed experts with 8 routed experts active per token plus 1 shared expert, MoE intermediate size 2048, dense-layer intermediate size 12288, 64 attention heads, MLA-style attention with Q LoRA rank 2048 and KV LoRA rank 512, vocabulary size 154,880, and a maximum position embedding of 1,048,576 tokens.
Thinking and Reasoning Effort
Z.ai's documentation describes GLM-5.2's reasoning controls as follows:
- Deep thinking is enabled by default. GLM-5.2 uses dynamic thinking: the model automatically determines whether to think. Thinking can be disabled entirely for direct answers.
- Reasoning effort ladder. A
reasoning_effortcontrol (supported from GLM-5.2 onward) acceptsmax,xhigh,high,medium,low,minimal, andnone.maxis the default and recommended deep-reasoning level;highis enhanced reasoning;noneorminimalskips thinking; for compatibility,lowandmediumare mapped tohigh, andxhighis mapped tomax. - Generation defaults. Z.ai's API defaults for GLM-5.2 are
temperature1.0 andtop_p0.95, with up to 128K maximum output tokens. Z.ai's own evaluations usetemperature=1.0,top_p=0.95, and a maximum generation length of 163,840 tokens for reasoning tasks. - Tool use and caching. Z.ai documents function/tool calling for the GLM-5 series, and context caching (automatic reuse of repeated prefixes at a reduced rate) across the GLM-5 series.
Long-Horizon Performance (from the Z.ai announcement)
- On FrontierSWE, which measures whether an agent can complete open-ended technical projects at the scale of hours to tens of hours (systems optimization, large-scale code construction, applied ML research), GLM-5.2 trails Claude Opus 4.8 by only 1%, while edging out GPT-5.5 by 1% and Claude Opus 4.7 by 11%.
- On PostTrainBench, where each agent is given an H100 GPU and evaluated by how much it can improve small models through post-training, GLM-5.2 outperforms both Claude Opus 4.7 and GPT-5.5, ranking second only to Claude Opus 4.8.
- On SWE-Marathon, an ultra-long-horizon software engineering benchmark (building compilers, optimizing kernels, developing production-grade services), GLM-5.2 trails Claude Opus 4.8 by 13% while remaining second only to the Opus series.
- On standard coding benchmarks, GLM-5.2 is the strongest open-source model, improving on GLM-5.1 by a wide margin: 81.0 vs. 63.5 on Terminal-Bench 2.1 and 62.1 vs. 58.4 on SWE-bench Pro. On Terminal-Bench 2.1 (81.0) it lands within a few points of Claude Opus 4.8 (85.0) while staying ahead of Gemini 3.1 Pro.
Benchmarks
Full benchmark table as published in the official GLM-5.2 model card. Scores marked with * are from the full set (the default report is the text-only subset).
Reasoning
| Benchmark | GLM-5.2 | GLM-5.1 | Qwen3.7-Max | MiniMax M3 | DeepSeek-V4-Pro | Claude Opus 4.8 | GPT-5.5 | Gemini 3.1 Pro |
|---|---|---|---|---|---|---|---|---|
| HLE | 40.5 | 31 | 41.4 | 37 | 37.7 | 49.8* | 41.4* | 45 |
| HLE (w/ Tools) | 54.7 | 52.3 | 53.5 | - | 48.2 | 57.9* | 52.2* | 51.4* |
| CritPt | 20.9 | 4.6 | 13.4 | 3.7 | 12.9 | 20.9 | 27.1 | 17.7 |
| AIME 2026 | 99.2 | 95.3 | 97 | - | 94.6 | 95.7 | 98.3 | 98.2 |
| HMMT Nov. 2025 | 94.4 | 94 | 95 | 84.4 | 94.4 | 96.5 | 96.5 | 94.8 |
| HMMT Feb. 2026 | 92.5 | 82.6 | 97.1 | 84.4 | 95.2 | 96.7 | 96.7 | 87.3 |
| IMOAnswerBench | 91.0 | 83.8 | 90 | - | 89.8 | 83.5 | - | 81 |
| GPQA-Diamond | 91.2 | 86.2 | 90 | 93 | 90.1 | 93.6 | 93.6 | 94.3 |
Coding
| Benchmark | GLM-5.2 | GLM-5.1 | Qwen3.7-Max | MiniMax M3 | DeepSeek-V4-Pro | Claude Opus 4.8 | GPT-5.5 | Gemini 3.1 Pro |
|---|---|---|---|---|---|---|---|---|
| SWE-bench Pro | 62.1 | 58.4 | 60.6 | 59 | 55.4 | 69.2 | 58.6 | 54.2 |
| NL2Repo | 48.9 | 42.7 | 47.2 | 42.1 | 35.5 | 69.7 | 50.7 | 33.4 |
| DeepSWE | 46.2 | 18 | 18 | 20 | 8 | 58 | 70 | 10 |
| ProgramBench | 63.7 | 50.9 | - | - | 47.8 | 71.9 | 70.8 | 39.5 |
| Terminal Bench 2.1 (Terminus-2) | 81.0 | 63.5 | 75 | 65 | 64 | 85 | 84 | 74 |
| Terminal Bench 2.1 (Best Reported Harness) | 82.7 | 69 | - | - | - | 78.9 | 83.4 | 70.7 |
| FrontierSWE (Dominance) | 74.4 | 30.5 | - | - | 29.0 | 75.1 | 72.6 | 39.6 |
| PostTrainBench | 34.3 | 20.1 | - | - | - | 37.2 | 28.4 | 21.6 |
| SWE-Marathon | 13.0 | 1.0 | - | - | - | 26.0 | 12.0 | 4.0 |
Agentic
| Benchmark | GLM-5.2 | GLM-5.1 | Qwen3.7-Max | MiniMax M3 | DeepSeek-V4-Pro | Claude Opus 4.8 | GPT-5.5 | Gemini 3.1 Pro |
|---|---|---|---|---|---|---|---|---|
| MCP-Atlas (Public Set) | 76.8 | 71.8 | 76.4 | 74.2 | 73.6 | 77.8 | 75.3 | 69.2 |
| Tool-Decathlon | 48.2 | 40.7 | - | - | 52.8 | 59.9 | 55.6 | 48.8 |
Evaluation Notes (as published by Z.ai)
- Humanity's Last Exam (HLE) and other reasoning tasks: sampling parameters
temperature=1.0,top_p=0.95; maximum generation length 163,840 tokens. By default the text-only subset is reported; results marked with * are from the full set. For AIME, HMMT, and IMOAnswerBench, each question is evaluated with a system prompt asking for an explanation, an exact answer, and a confidence score between 0% and 100%; GPT-5.5 (medium) is used as the judge model. For HLE-with-tools, a maximum context length of 300,000 tokens is used with no context management strategy. - SWE-bench Pro: run with the OpenHands agent framework using a tailored instruction prompt;
temperature=1,top_p=1,max_new_tokens=32k, with a 400K context window. - NL2Repo: evaluated with
temperature=1.0,top_p=1.0,max_new_tokens=48kunder 400k context. To prevent hacking, rule-based and LLM-based judgement is used to prevent malicious behaviors (e.g., unauthorized package-installation or download commands). - DeepSWE: run with the official pier evaluation framework and the mini-swe-agent harness (
temperature=1.0,top_p=1.0,timeout=2h, 400K context). Each task is solved in an isolated container with 2 CPUs, 8 GB RAM, and no internet access. - ProgramBench: 200 instances evaluated with the Claude Code agent (version 2.1.156) using
temperature=1.0, top_p=1.0, max_tokens=64000, max_turns=2000, sample_timeout=6h, reasoning_effort=max, with a 400K context window. Each instance runs in a (4 CPUs, 8 GB RAM) sandbox with internet access disabled. - Terminal-Bench 2.1 (Terminus 2): evaluated with the Terminus-2 framework using
parser=json,timeout=4h,temperature=1.0,top_p=1.0,max_new_tokens=48k,max_episodes=500, with a 256K context window. Resource limits are capped at 4 CPUs and 8 GB RAM. - Terminal-Bench 2.1 (Claude Code harness): evaluated in Claude Code 2.1.167 with
temperature=1.0, top_p=0.95, max_new_tokens=131072; the 64k CLI output cap is overridden to 128k via a transparent proxy. Wall-clock time limits are removed while per-task CPU and memory constraints are preserved. Scores are averaged over 5 runs. - MCP-Atlas: all models evaluated in think mode on the 500-task public subset with a 10-minute timeout per task; Gemini-3.0-Pro is the judge model.
- Tool-Decathlon: official evaluation service with max_token set to 128K.
- FrontierSWE: evaluation conducted by Proximal with 1M context length, max effort level, and 128K maximum output tokens; dominance score reported as of 2026/06/16.
- PostTrainBench: evaluation conducted by the PostTrainBench project with 1M context length, max effort level, and 128K maximum output tokens.
- SWE-Marathon: evaluation conducted by Abundant AI with 1M context length, max effort level, and 128K maximum output tokens.
Training Notes
GLM-5.2 builds on the GLM-5 series. Per Z.ai's GLM-5 series materials: the series scales from GLM-4.5's 355B parameters (32B active) to 744B parameters (40B active) and increases pre-training data from 23T to 28.5T tokens; it integrates DeepSeek Sparse Attention (DSA) to largely reduce deployment cost while preserving long-context capacity; and post-training uses "slime", Z.ai's asynchronous reinforcement-learning infrastructure, which substantially improves training throughput and efficiency and enables more fine-grained post-training iterations. GLM-5.2 additionally proposes IndexShare (described in a separate Z.ai preprint) and an improved MTP layer. The GLM-5 technical report, "GLM-5: from Vibe Coding to Agentic Engineering," covers the series in detail.
License
GLM-5.2 is released under the MIT license — described in the announcement as "Pure Open: no regional limits, technical access without borders."
On Run BiOS
On the Run BiOS serverless catalog this model is served as glm-5.2 with its full 1,048,576-token context window, function calling, adjustable reasoning effort (exposed as a low / medium / high ladder; per Z.ai's mapping, low and medium run at the high level upstream, and the model's own default is the maximum deep-reasoning level), and prompt caching for repeated prefixes.