---
title: "glm-5.2"
publisher: "z-ai"
type: "endpoint"
updated: "2026-07-02T19:07:42.168Z"
description: "GLM-5.2 is a flagship LLM for agentic workflows, coding, and long-horizon reasoning tasks."
canonical: "https://build.nvidia.com/z-ai/glm-5.2"
---

# GLM-5.2

## Description: <br>
GLM-5.2 is the latest flagship large language model from Z.ai (zai-org), designed for long-horizon tasks with a solid 1M-token context window. It represents a substantial leap in extended-context capability over its predecessor GLM-5.1, featuring the IndexShare architecture that reuses the same indexer across every four sparse attention layers, reducing per-token FLOPs by 2.9x at 1M context length. GLM-5.2 delivers state-of-the-art performance across reasoning, coding, and agentic benchmarks, with multiple thinking effort levels to balance performance and latency. <br>
GLM-5.2 was developed by Z.ai (zai-org) as a part of the GLM model family. <br>

*This model is ready for commercial or non-commercial use.* <br>

## Third-Party Community Consideration <br>
This model is not owned or developed by NVIDIA. This model has been developed and built to a third-party's requirements for this application and use case; see link to Non-NVIDIA [GLM-5.2 Model Card](https://huggingface.co/zai-org/GLM-5.2). <br>

### License/Terms of Use: <br>
**GOVERNING TERMS:** The trial service is governed by the [NVIDIA API Trial Terms of Service](https://assets.ngc.nvidia.com/products/api-catalog/legal/NVIDIA%20API%20Trial%20Terms%20of%20Service.pdf). Use of the model is governed by the [NVIDIA Open Model Agreement](https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-open-model-license/). Additional Information: [MIT License](https://huggingface.co/datasets/choosealicense/licenses/blob/main/markdown/mit.md).

### Deployment Geography: <br>
Global

### Use Case: <br>
Developers and researchers can use GLM-5.2 for long-horizon reasoning tasks requiring extended context, complex software engineering and agentic workflows, mathematical reasoning, coding and debugging, terminal-based automation, and general conversational AI applications requiring sustained multi-turn context. <br>

### Release Date:  <br>
**Build.Nvidia.com:** 07/02/2026 via [link](https://build.nvidia.com/z-ai/glm-5_2) <br>
**HuggingFace:** 06/16/2026 via [link](https://huggingface.co/zai-org/GLM-5.2) <br>

## Reference(s):
- [GLM-5.2 on Hugging Face](https://huggingface.co/zai-org/GLM-5.2) <br>
- [GLM-5 Technical Report (arXiv:2602.15763)](https://arxiv.org/abs/2602.15763) <br>
- [IndexCache: Accelerating Sparse Attention via Cross-Layer Index Reuse (arXiv:2603.12201)](https://arxiv.org/abs/2603.12201) <br>
- [Z.ai API Platform](https://docs.z.ai/guides/llm/glm-5.2) <br>
- [GitHub Repository](https://github.com/zai-org/GLM-5) <br>

## Model Architecture: <br>
**Architecture Type:** Mixture of Experts (MoE)  <br>
**Network Architecture:** GLM (General Language Model) with DSA (Dense-Sparse-Alternating) and IndexShare sparse attention <br>

**This model was developed based on GLM-5.1.** <br>
**Number of model parameters:** 753B <br>

## Input: <br>
**Input Type(s):** Text <br>
**Input Format(s):** String <br>
**Input Parameters:** One Dimensional (1D) <br>
**Other Properties Related to Input:** Supports multi-turn conversations, tool calling, system prompts, and extended agentic sessions. Input context length: 1,000,000 tokens. <br>

## Output: <br>
**Output Type(s):** Text <br>
**Output Format:** String <br>
**Output Parameters:** One Dimensional (1D) <br>
**Other Properties Related to Output:** Supports streaming, structured output, reasoning traces, and tool call responses. Output context length: 1,000,000 tokens. <br>

Our AI models are designed and/or optimized to run on NVIDIA GPU-accelerated systems. By leveraging NVIDIA's hardware (e.g. GPU cores) and software frameworks (e.g., CUDA libraries), the model achieves faster training and inference times compared to CPU-only solutions. <br>

## Software Integration: <br>
**Runtime Engine(s):** <br>
* SGLang (v0.5.13.post1+) <br>
* vLLM (v0.23.0+) <br>
* KTransformers (v0.5.12+) <br>
* Transformers (v0.5.12+) <br>

**Supported Hardware Microarchitecture Compatibility:** <br>
* NVIDIA Blackwell <br>
* NVIDIA Hopper <br>

**Supported Operating System(s):** <br>
* Linux <br>

The integration of foundation and fine-tuned models into AI systems requires additional testing using use-case-specific data to ensure safe and effective deployment. Following the V-model methodology, iterative testing and validation at both unit and system levels are essential to mitigate risks, meet technical and functional requirements, and ensure compliance with safety and ethical standards before deployment. <br>

## Model Version(s):
GLM v5.2 <br>

## Training, Testing, and Evaluation Datasets:

### Training Dataset
**Data Modality:** Text (English, Chinese, multilingual)  
**Text Training Data Size:** Undisclosed  
**Training Data Collection:** Undisclosed  
**Training Labeling:** Undisclosed  
**Training Properties:** Undisclosed

### Testing Dataset
**Testing Data Collection:** Undisclosed  
**Testing Labeling:** Undisclosed  
**Testing Properties:** Undisclosed

### Evaluation Dataset
**Evaluation Benchmark Score:** Evaluated on multiple benchmarks including HLE, AIME 2026, GPQA-Diamond, SWE-bench Pro, NL2Repo, Terminal Bench 2.1, MCP-Atlas, and Tool-Decathlon. GLM-5.2 achieves state-of-the-art results across reasoning, coding, and agentic benchmarks, outperforming its predecessor GLM-5.1 across all major evaluations.  
**Evaluation Data Collection:** Automated  
**Evaluation Labeling:** Manually-Collected  
**Evaluation Properties:** GLM-5.2 is benchmarked against GLM-5.1, Qwen3.7-Max, MiniMax M3, DeepSeek-V4-Pro, Claude Opus 4.8, GPT-5.5, and Gemini 3.1 Pro across coding, mathematical reasoning, and agentic benchmarks.

### Evaluation Results

<details>
<summary><strong>Detailed Benchmark Results</strong></summary>

### Reasoning

| Benchmark | Dataset | GLM-5.2 | GLM-5.1 |
|-----------|---------|---------|---------|
| HLE | [cais/hle](https://huggingface.co/datasets/cais/hle) | **40.5** | 31.0 |
| HLE (w/ Tools) | [cais/hle](https://huggingface.co/datasets/cais/hle) | **54.7** | 52.3 |
| AIME 2026 | [MathArena/aime_2026](https://huggingface.co/datasets/MathArena/aime_2026) | **99.2** | 95.3 |
| GPQA-Diamond | [Idavidrein/gpqa](https://huggingface.co/datasets/Idavidrein/gpqa) | **91.2** | 86.2 |

### Coding & Engineering

| Benchmark | Dataset | GLM-5.2 | GLM-5.1 |
|-----------|---------|---------|---------|
| SWE-bench Pro | [ScaleAI/SWE-bench_Pro](https://huggingface.co/datasets/ScaleAI/SWE-bench_Pro) | **62.1** | 58.4 |
| NL2Repo | — | **48.9** | 42.7 |
| Terminal Bench 2.1 (Terminus-2) | — | **81.0** | 63.5 |

### Tool Use & Agentic

| Benchmark | Dataset | GLM-5.2 | GLM-5.1 |
|-----------|---------|---------|---------|
| MCP-Atlas | — | **76.8** | 71.8 |
| Tool-Decathlon | — | **48.2** | 40.7 |

</details>

## Inference:
**Acceleration Engine:** SGLang <br>

**Test Hardware:** <br>
* NVIDIA Grace Blackwell GB200x4 <br>
* NVIDIA Grace Blackwell GB300x4 <br>

## Ethical Considerations:
NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. Developers should work with their internal model team to ensure this model meets requirements for the relevant industry and use case and addresses unforeseen product misuse.

Please report model quality, risk, security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).  <br>

## Specifications

- **Parameters:** 753,329,940,480

## Capabilities

- **Function Calling:** Not supported

## Prototype

```python
from openai import OpenAI
import os
import sys

_USE_COLOR = sys.stdout.isatty() and os.getenv("NO_COLOR") is None
_REASONING_COLOR = "\033[90m" if _USE_COLOR else ""
_RESET_COLOR = "\033[0m" if _USE_COLOR else ""

client = OpenAI(
base_url = "https://integrate.api.nvidia.com/v1",
api_key = "$NVIDIA_API_KEY"
)

completion = client.chat.completions.create(
model="",
messages=[{"role":"user","content":""}],
temperature=,
top_p=,
max_tokens=,

stream=NaN
)

print(completion.choices[0].message.content)
```

```python
from langchain_nvidia_ai_endpoints import ChatNVIDIA

client = ChatNVIDIA(
model="",
api_key="$NVIDIA_API_KEY", 
temperature=,
top_p=,
max_tokens=,

)

response = client.invoke([{"role":"user","content":""}])
print(response.content)
```

```javascript
import OpenAI from 'openai';

const openai = new OpenAI({
apiKey: '$NVIDIA_API_KEY',
baseURL: 'https://integrate.api.nvidia.com/v1',
})

async function main() {
const completion = await openai.chat.completions.create({
model: "",
messages: [{"role":"user","content":""}],
temperature: ,
top_p: ,
max_tokens: ,

stream: 
})

process.stdout.write(completion.choices[0]?.message?.content || '');

}

main();
```

```bash
invoke_url='https://integrate.api.nvidia.com/v1/chat/completions'

authorization_header='Authorization: Bearer '
accept_header='Accept: application/json'
content_type_header='Content-Type: application/json'

data=$'{
"messages": [
{
"role": "user",
"content": ""
}
]
}'

response=$(curl --silent -i -w "\n%{http_code}" --request POST \
--url "$invoke_url" \
--header "$authorization_header" \
--header "$accept_header" \
--header "$content_type_header" \
--data "$data"
)

echo "$response"
```