Skip to content
Regolo Logo

GLM5.2

GLM-5.2 is Z.ai's flagship model for long-horizon tasks, with a significant leap over GLM-5.1 and, for the first time, a stable 1M-token context. The architecture introduces IndexShare, which reuses the same indexer every four sparse attention layers, cutting FLOPs per token by 2.9× at 1M context, and an improved MTP layer that boosts speculative decoding acceptance length by up to 20%.

Getting Started

pip install requestsCode language: Bash (bash)
import requests

api_url = "https://api.regolo.ai/v1/chat/completions"
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_REGOLO_KEY"
}
data = {
  "model": "glm-5.2",
  "messages": [
    {
      "role": "user",
      "content": "Write a Python function to calculate the factorial of a number using recursion."
    }
  ],
  "reasoning_effort": "low"
}

response = requests.post(api_url, headers=headers, json=data)
print(response.json())Code language: Python (python)

Output

{
  "id": "chatcmpl-a4988541-84b1-41a5-843f-06790a11f7fc",
  "created": 1769560420,
  "model": "hosted_vllm/glm5.2-beta",
  "object": "chat.completion",
  "choices": [
    {
      "finish_reason": "stop",
      "index": 0,
      "message": {
        "content": "The capital of Italy is Rome (Italian: Roma). Rome belongs to the Lazio region.",
        "role": "assistant"
      }
    }
  ],
  "usage": {
    "completion_tokens": 62,
    "prompt_tokens": 45,
    "total_tokens": 107
  }
}Code language: JavaScript (javascript)

Additional Info


Applications & Use Cases

  • Long-horizon coding agents: multi-file refactoring, SWE-bench Pro tasks, and extended terminal sessions thanks to the stable 1M-token context.
  • RAG over entire repositories and long documentation: cross-file analysis without aggressive chunking, leveraging the 1M-token window.
  • Agentic workflows with tool use: high scores on MCP-Atlas and Tool-Decathlon make it suitable for pipelines involving shell, databases, and external APIs.
  • Math and scientific reasoning: 99.2 on AIME 2026 and 91.2 on GPQA-Diamond for research, formal verification, and advanced problem solving.
  • Constraint-free on-premise deployment: MIT license with support for vLLM, SGLang, Transformers, KTransformers, and Unsloth, including Ascend NPUs.

Model details

  • Category: Chat
  • Provider: Z.ai (zai-org)
  • Release Date: 2026
  • License: MIT