# GLM-5

> Z.ai's open-weight 744B MoE flagship — "from vibe coding to agentic engineering," MIT-licensed with a 200K context.

- Maker: Z.ai (Zhipu / GLM)
- Line: GLM (flagship)
- Canonical page: https://ai-tldr.dev/models/glm-5/
- Updated: 2026-06-18

## In short

GLM-5 is the flagship large language model from Z.ai (Zhipu), released on 2026-02-11 as the first model in the GLM-5 generation. It is a Mixture-of-Experts model with roughly 744B total parameters and about 40B active per token, scaling up from the 355B-class GLM-4.5/4.6 line. It has a 200K-token context window and costs $1.00 per million input tokens and $3.20 per million output tokens. You can use it through Z.ai and OpenRouter.

## Facts

| Fact | Value | Source |
| --- | --- | --- |
| Context window | 200K (max output 128K) | [1] |
| Input price | $1.00 / 1M tokens (cached $0.20 / 1M tokens) | [2] |
| Output price | $3.20 / 1M tokens | [2] |
| Licence | MIT · open weights | [1] |
| Released | 11 February 2026 | [3] |
| Parameters | 744B total / 40B active (MoE) | [1] |

## Sources

1. [zai-org/GLM-5 — Hugging Face model card](https://huggingface.co/zai-org/GLM-5)
2. [Z.ai API pricing](https://docs.z.ai/guides/overview/pricing)
3. [GLM-5: From Vibe Coding to Agentic Engineering (official blog)](https://z.ai/blog/glm-5)

## Overview

GLM-5 is the flagship large language model from Z.ai (Zhipu), released on 2026-02-11 as the first model in the GLM-5 generation. It is a Mixture-of-Experts model with roughly 744B total parameters and about 40B active per token, scaling up from the 355B-class GLM-4.5/4.6 line. GLM-5 ships with open weights under the MIT license on Hugging Face (zai-org/GLM-5) and ModelScope, in both BF16 and FP8.

Z.ai positioned GLM-5 around the theme "from vibe coding to agentic engineering," pushing past quick prototyping toward long-horizon, multi-step engineering work: planning, coding, testing and fixing across large codebases. The architecture uses DeepSeek Sparse Attention (DSA) to keep long-context serving affordable, supports a 200K-token context window, and can generate up to 128K tokens in a single response with a dedicated thinking mode, function calling and structured output.

GLM-5 was pre-trained on about 28.5T tokens and, notably, trained entirely on Huawei Ascend hardware for supply-chain independence. It reports strong results on reasoning, coding and agentic benchmarks among open-weight models, and is priced aggressively through the official Z.ai API ($1.00 per million input tokens, $3.20 per million output).

## Benchmarks

- SWE-bench Verified: 77.8% ([source](https://huggingface.co/blog/mlabonne/glm-5))
- AIME 2026: 92.7% ([source](https://huggingface.co/blog/mlabonne/glm-5))
- GPQA-Diamond: 86% ([source](https://huggingface.co/blog/mlabonne/glm-5))
- BrowseComp: 62% ([source](https://huggingface.co/zai-org/GLM-5))

## Pricing

- Input: $1.00 / 1M tokens per 1M tokens
- Cached input: $0.20 / 1M tokens per 1M tokens
- Output: $3.20 / 1M tokens per 1M tokens

Official Z.ai API pricing for model id glm-5. Open weights are also available under MIT for free self-hosting.

Source: https://docs.z.ai/guides/overview/pricing

## Strengths

- Open weights under the permissive MIT license — free to self-host, fine-tune and deploy commercially, with FP8 weights for cheaper inference
- Large MoE capacity (744B total / ~40B active) with DeepSeek Sparse Attention to keep long-context serving costs down
- Built for agentic, long-horizon engineering: planning, multi-file coding, testing and fixing rather than one-shot snippets
- 200K-token context with up to 128K-token output and a built-in thinking mode for extended reasoning
- Competitive open-model scores on reasoning and software-engineering benchmarks (SWE-bench Verified, AIME 2026, GPQA-Diamond)
- Aggressive official API pricing ($1.00 in / $3.20 out per million tokens, $0.20 cached input)

## Best for

- Autonomous coding agents that plan, edit across many files, run tests and iterate on fixes
- Self-hosted or on-prem deployment where MIT-licensed open weights and data control matter
- Long-context analysis over large codebases, documents or logs up to ~200K tokens
- Math and science reasoning tasks (competition math, graduate-level QA)
- Tool-using and function-calling agents with structured JSON output
- Cost-sensitive production workloads that need frontier-class coding at a fraction of closed-model prices

## How to access

- [Z.ai](https://docs.z.ai/guides/llm/glm-5) — model id `glm-5`
- [OpenRouter](https://openrouter.ai/z-ai/glm-5) — model id `z-ai/glm-5`

## GLM (flagship) versions

- [GLM-5.2](https://ai-tldr.dev/models/glm-5-2/) (13 June 2026)
- [GLM-5.1](https://ai-tldr.dev/models/glm-5-1/) (7 April 2026)
- GLM-5 (11 February 2026) — this page
- [GLM-4.7](https://ai-tldr.dev/models/glm-4-7/) (22 December 2025)
- [GLM-4.6](https://ai-tldr.dev/models/glm-4-6/) (30 September 2025)
- [GLM-4.5](https://ai-tldr.dev/models/glm-4-5/) (28 July 2025)

## FAQ

### Is GLM-5 open source?

GLM-5 ships with open weights under the permissive MIT license. You can download the weights from Hugging Face (zai-org/GLM-5) or ModelScope in BF16 and FP8, and self-host, fine-tune and deploy them commercially without restriction. Note that open weights is not the same as fully open-source training data or code, but the MIT terms on the released model are very permissive.

### How big is GLM-5 and what is its architecture?

GLM-5 is a Mixture-of-Experts model with about 744B total parameters and roughly 40B active per token. It uses 256 routed experts plus one shared expert (8 activated per token) across 78 layers, and adopts DeepSeek Sparse Attention (DSA) to keep long-context inference affordable. It was pre-trained on about 28.5T tokens and trained entirely on Huawei Ascend hardware.

### What context window and output length does GLM-5 support?

GLM-5 supports a 200K-token context window (about 202,752 positions) and can generate up to 128K tokens (131,072) in a single response, with a thinking mode for extended reasoning. It is a text-only model.

### How much does GLM-5 cost to use via the API?

Through the official Z.ai API, GLM-5 (model id glm-5) costs $1.00 per million input tokens and $3.20 per million output tokens, with cached input at $0.20 per million. Because the weights are MIT-licensed, you can also run it yourself for the cost of your own hardware.

## Links

- [GLM-5: From Vibe Coding to Agentic Engineering (official blog)](https://z.ai/blog/glm-5)
- [zai-org/GLM-5 — Hugging Face model card](https://huggingface.co/zai-org/GLM-5)
- [zai-org/GLM-5 — GitHub](https://github.com/zai-org/GLM-5)
- [GLM-5 — Z.ai developer docs](https://docs.z.ai/guides/llm/glm-5)
- [Z.ai API pricing](https://docs.z.ai/guides/overview/pricing)
- [GLM-5: China's First Public AI Company Ships a Frontier Model (benchmark writeup)](https://huggingface.co/blog/mlabonne/glm-5)
- [GLM-5 on OpenRouter](https://openrouter.ai/z-ai/glm-5)
- [GLM-5 (Reasoning) — Artificial Analysis](https://artificialanalysis.ai/models/glm-5)

Source: AI/TLDR LLM registry, https://ai-tldr.dev/models/glm-5/
