Skip to content
Docs

Using GLM-5 on Chutes

GLM-5 is Z.ai's 744B-parameter Mixture-of-Experts flagship for systems engineering and long-horizon agentic work, released under the MIT license. On Chutes it is served FP8 inside a Trusted Execution Environment through the standard OpenAI-compatible gateway, so any OpenAI SDK can call it with a one-line base URL change.

Overview

GLM-5 scales the GLM line from GLM-4.5's 355B parameters (32B active) to 744B parameters with 40B active per token, pre-trained on 28.5T tokens. The architecture (GlmMoeDsaForCausalLM) combines a 78-layer MoE transformer, 256 routed experts plus 1 shared expert with 8 routed experts active per token, and DeepSeek Sparse Attention (DSA), which reduces deployment cost while preserving a 202,752-token context window. Post-training used slime, Z.ai's asynchronous reinforcement-learning infrastructure.

On the model card's benchmarks GLM-5 reaches 77.8 on SWE-bench Verified, 56.2 on Terminal-Bench 2.0, 89.7 on tau-2 Bench, 62.0 on BrowseComp (75.9 with context management), and 30.5 on Humanity's Last Exam (50.4 with tools). Z.ai describes it as best-in-class among open-source models on reasoning, coding, and agentic tasks at release.

Model specifications

PropertyValue
Parameters744B total, 40B active per token
ArchitectureMoE transformer with DeepSeek Sparse Attention; 78 layers, hidden size 6144
Experts256 routed + 1 shared; 8 routed active per token
Context length202,752 tokens
LicenseMIT
Precision on ChutesFP8 (official zai-org/GLM-5-FP8 build; upstream BF16)
ModalitiesText in, text out
ReleaseFebruary 2026

Quick start

The chute runs on the shared OpenAI-compatible gateway. Base URL https://llm.chutes.ai/v1, model zai-org/GLM-5-TEE, Bearer auth with your Chutes API key.

curl -X POST "https://llm.chutes.ai/v1/chat/completions" \
  -H "Authorization: Bearer $CHUTES_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "zai-org/GLM-5-TEE",
    "messages": [{"role": "user", "content": "Refactor this function to be idempotent."}],
    "stream": true,
    "max_tokens": 1024,
    "temperature": 0.7
  }'
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://llm.chutes.ai/v1",
    api_key=os.environ["CHUTES_API_KEY"],
)

response = client.chat.completions.create(
    model="zai-org/GLM-5-TEE",
    messages=[{"role": "user", "content": "Plan a migration from REST to gRPC."}],
    max_tokens=2048,
    temperature=0.7,
)
print(response.choices[0].message.content)
const res = await fetch("https://llm.chutes.ai/v1/chat/completions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.CHUTES_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "zai-org/GLM-5-TEE",
    messages: [{ role: "user", content: "Summarize this stack trace." }],
    stream: false,
    max_tokens: 1024,
    temperature: 0.7,
  }),
});
const data = await res.json();
console.log(data.choices[0].message.content);

Parameters and tuning

Key request fields and their chute defaults, from the live llms.txt:

FieldDefaultNotes
max_tokens1024Raise for long answers; GLM-5 is a thinking model and benefits from generous output budgets
temperature0.7Upstream generation_config.json defaults to 1.0 with top_p 0.95; the card used 0.7 for SWE-bench coding runs
streamtrue (streaming endpoint)Server-sent events on both chat and raw completions
seed42Set for reproducibility
top_p, top_k, min_p1 / -1 / 0Full vLLM sampling surface, including presence, frequency, and repetition penalties

For reasoning-heavy tasks, temperature 1.0 with top_p 0.95 matches Z.ai's own evaluation setup. For agentic coding, temperature 0.7 with top_p 0.95 matches their SWE-bench configuration.

What it's best at

  • Repository-scale software engineering. 77.8 on SWE-bench Verified and 73.3 on SWE-bench Multilingual make it one of the strongest open models for autonomous bug-fixing and multi-file edits.
  • Long-horizon agents. Trained for sustained tool-use loops: 89.7 on tau-2 Bench, 67.8 on MCP-Atlas public set, 56.2 on Terminal-Bench 2.0.
  • Web research. 62.0 on BrowseComp, rising to 75.9 with context management, for search-and-synthesize agent pipelines.
  • Complex reasoning with tools. 50.4 on Humanity's Last Exam with tools, using contexts up to the full 202K window.

It is not the right choice for image, audio, or video inputs (text only), for latency-critical short completions where a 40B-active MoE is oversized, or for workloads that need more than ~200K tokens of context, where GLM-5.2's 1M window is the better fit.

How Chutes serves this model

This chute serves the official FP8 release (zai-org/GLM-5-FP8: e4m3 weights, dynamic activation scaling) inside a TEE, meaning inference runs on attested confidential-compute hardware and prompts and outputs are processed within the enclave. It runs on the vLLM template with the OpenAI-compatible surface: POST /v1/chat/completions, POST /v1/completions, and GET /v1/models, all with streaming. Requests are flat JSON bodies with Bearer authentication. See the model page, llms.txt, and openapi.json.

FAQ

What context window does GLM-5 support on Chutes?

The model's config.json sets max_position_embeddings to 202,752 tokens, roughly a 200K context. The chute's default max_tokens is 1,024, so raise max_tokens explicitly for long outputs.

Does GLM-5 support function calling and tool use?

Yes. GLM-5 is trained for agentic tool use (89.7 on tau-2 Bench, 67.8 on MCP-Atlas public set per the model card), and upstream serving stacks run it with a tool-call parser and auto tool choice. Send OpenAI-style tools in your chat completion request.

What does the TEE suffix mean?

TEE stands for Trusted Execution Environment. This deployment runs inference inside attested confidential-compute hardware, so your prompts and the model's outputs are processed within a hardware-isolated enclave rather than on an open host.

Can I use GLM-5 commercially?

Yes. GLM-5 is released under the MIT license, which permits commercial use, modification, and redistribution without regional restrictions.

How do I call it from the OpenAI SDK?

Point the client at base_url https://llm.chutes.ai/v1 with your Chutes API key, and set model to zai-org/GLM-5-TEE. Chat completions, raw completions, and streaming all work through the standard SDK methods.

What sampling settings should I use?

The upstream generation_config.json defaults to temperature 1.0 and top_p 0.95, which Z.ai also used for reasoning benchmarks. For coding-agent runs the model card used temperature 0.7 with top_p 0.95. The chute's own default temperature is 0.7.

Is this the full-precision model?

The chute serves zai-org/GLM-5-FP8, Z.ai's official FP8-quantized build of GLM-5 (e4m3 weights with dynamic activation scaling). The original checkpoint is BF16; FP8 substantially reduces memory and cost with minimal quality impact.

Sources