# GLM-4-9B

> Tsinghua/Zhipu's open 9B model — GLM-4-9B-Chat does 128K context, tool calling and 26 languages, beating Llama-3-8B.

- Maker: Z.ai (Zhipu / GLM)
- Line: GLM-4 (open 9B)
- Canonical page: https://ai-tldr.dev/models/glm-4-9b/
- Updated: 2026-06-18

## In short

GLM-4-9B is the open 9-billion-parameter model in Zhipu AI's GLM-4 family (the lab now operates as Z.ai), released on 2024-06-05 by Team GLM at Tsinghua University and published under the THUDM organization on Hugging Face. It has a 128K-token context window. You can use it through OpenRouter and Hugging Face.

## Facts

| Fact | Value | Source |
| --- | --- | --- |
| Context window | 128K (max output Not publicly disclosed) | [1] |
| Input price | Free | [2] |
| Output price | Free | [2] |
| Licence | GLM-4 License (custom open weights) · open weights | [1] |
| Released | 5 June 2024 | [3] |
| Parameters | 9B | [1] |
| Knowledge cutoff | Not publicly disclosed | [1] |

## Sources

1. [GLM-4-9B-Chat — Hugging Face model card](https://huggingface.co/THUDM/glm-4-9b-chat)
2. [GLM-4-9B — OpenRouter (free endpoint)](https://openrouter.ai/thudm/glm-4-9b:free)
3. [Z.ai (Zhipu / GLM) — official site](https://z.ai)

## Overview

GLM-4-9B is the open 9-billion-parameter model in Zhipu AI's GLM-4 family (the lab now operates as Z.ai), released on 2024-06-05 by Team GLM at Tsinghua University and published under the THUDM organization on Hugging Face. It succeeds the earlier ChatGLM line and ships in several forms: the GLM-4-9B base model, the human-preference-aligned GLM-4-9B-Chat, a long-context GLM-4-9B-Chat-1M variant, and the separate GLM-4V-9B vision model.

GLM-4-9B-Chat is the flagship of the line. It supports a 128K-token context window (with a 1M-token variant available), built-in tool calling, web browsing, and code execution, and works across 26 languages including Japanese, Korean and German. According to its model card and the ChatGLM technical report, GLM-4-9B and GLM-4-9B-Chat outperform Llama-3-8B across semantics, math, reasoning, code and knowledge evaluations.

Because the weights are open, GLM-4-9B can be run locally or self-hosted, and it is also served free of charge through aggregators such as OpenRouter. The detailed methodology behind the family is documented in the paper 'ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Tools' (arXiv:2406.12793).

## Benchmarks

- MMLU (GLM-4-9B-Chat): 72.4% ([source](https://huggingface.co/THUDM/glm-4-9b-chat))
- C-Eval (GLM-4-9B-Chat): 75.6% ([source](https://huggingface.co/THUDM/glm-4-9b-chat))
- GSM8K (GLM-4-9B-Chat): 79.6% ([source](https://huggingface.co/THUDM/glm-4-9b-chat))
- MATH (GLM-4-9B-Chat): 50.6% ([source](https://huggingface.co/THUDM/glm-4-9b-chat))
- HumanEval (GLM-4-9B-Chat): 71.8% ([source](https://huggingface.co/THUDM/glm-4-9b-chat))
- IFEval (GLM-4-9B-Chat): 69% ([source](https://huggingface.co/THUDM/glm-4-9b-chat))
- AlignBench-v2 (GLM-4-9B-Chat): 6.61% ([source](https://huggingface.co/THUDM/glm-4-9b-chat))
- MT-Bench (GLM-4-9B-Chat): 8.35% ([source](https://huggingface.co/THUDM/glm-4-9b-chat))
- MMLU (GLM-4-9B base): 74.7% ([source](https://huggingface.co/THUDM/glm-4-9b/blob/main/README_en.md))
- C-Eval (GLM-4-9B base): 77.1% ([source](https://huggingface.co/THUDM/glm-4-9b/blob/main/README_en.md))
- GSM8K (GLM-4-9B base): 84% ([source](https://huggingface.co/THUDM/glm-4-9b/blob/main/README_en.md))
- GPQA (GLM-4-9B base): 34.3% ([source](https://huggingface.co/THUDM/glm-4-9b/blob/main/README_en.md))
- HumanEval (GLM-4-9B base): 70.1% ([source](https://huggingface.co/THUDM/glm-4-9b/blob/main/README_en.md))

## Pricing

- Input: Free / 1M tokens
- Output: Free / 1M tokens

Served free of charge via OpenRouter (thudm/glm-4-9b:free). Open weights can also be self-hosted at no licensing cost.

Source: https://openrouter.ai/thudm/glm-4-9b:free

## Strengths

- Strong capability-per-parameter for a 9B model — beats Llama-3-8B on the lab's reported semantics, math, reasoning, code and knowledge evals
- 128K context in GLM-4-9B-Chat, with a dedicated 1M-token long-context variant
- Native tool calling, web browsing and code execution support
- Multilingual across 26 languages (incl. Japanese, Korean, German)
- Open weights — runs locally / self-hosted, small enough for single-GPU or on-device use
- Available free through OpenRouter for low-cost experimentation

## Best for

- Local and on-device chat assistants where a small open model is preferred
- Long-document analysis using the 128K / 1M context variants
- Tool-using and function-calling agents on a self-hosted model
- Multilingual chat and translation across 26 languages
- Research and fine-tuning on a permissively distributed open-weight base
- Cost-sensitive prototyping via the free OpenRouter endpoint

## How to access

- [OpenRouter](https://openrouter.ai/thudm/glm-4-9b:free) — model id `thudm/glm-4-9b:free`
- [Hugging Face](https://huggingface.co/THUDM/glm-4-9b-chat) — model id `THUDM/glm-4-9b-chat`

## GLM-4 (open 9B) versions

- GLM-4-9B (5 June 2024) — this page

## FAQ

### Is GLM-4-9B open source?

The weights are openly released by Team GLM (THUDM / Zhipu) on Hugging Face under the custom GLM-4 License, so you can download, run and fine-tune the model locally. Use of the weights must comply with the GLM-4 LICENSE terms in the repository.

### What context length does GLM-4-9B support?

GLM-4-9B-Chat supports up to 128K tokens. There is also a dedicated GLM-4-9B-Chat-1M variant that extends the context to 1M tokens. The plain base model uses a shorter window.

### How does GLM-4-9B compare to Llama-3-8B?

Per its model card and the ChatGLM technical report, both GLM-4-9B and the aligned GLM-4-9B-Chat outperform Llama-3-8B across semantics, math, reasoning, code and knowledge evaluations. GLM-4-9B-Chat scores 72.4 on MMLU, 79.6 on GSM8K, 50.6 on MATH and 71.8 on HumanEval.

### Can GLM-4-9B handle images?

The text GLM-4-9B model is text-only. For vision, the family includes a separate multimodal model, GLM-4V-9B, built on the same 9B base, which handles image understanding.

## Links

- [Z.ai (Zhipu / GLM) — official site](https://z.ai)
- [GLM-4-9B-Chat — Hugging Face model card](https://huggingface.co/THUDM/glm-4-9b-chat)
- [GLM-4-9B (base) — Hugging Face README](https://huggingface.co/THUDM/glm-4-9b/blob/main/README_en.md)
- [GLM-4 — GitHub repository](https://github.com/zai-org/GLM-4)
- [ChatGLM: GLM-130B to GLM-4 All Tools — technical report](https://arxiv.org/abs/2406.12793)
- [GLM-4-9B — OpenRouter (free endpoint)](https://openrouter.ai/thudm/glm-4-9b:free)

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