> For the complete documentation index, see [llms.txt](https://docs.clore.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clore.ai/guides/language-models/glm-5-2.md).

# GLM-5.2 (MIT, 1M Context)

Run GLM-5.2, Z.ai's MIT-licensed 1M-context coding flagship, on a big multi-GPU rig from the Clore.ai marketplace

{% hint style="info" %}
**Status (August 2026):** Z.ai released **GLM-5.2** on **13 June 2026** under the **MIT licence** — no regional limits, no revenue clause. Weights: [zai-org/GLM-5.2](https://huggingface.co/zai-org/GLM-5.2) and [zai-org/GLM-5.2-FP8](https://huggingface.co/zai-org/GLM-5.2-FP8). Sparse-attention MoE, roughly **750B total parameters with \~40B active**, a **solid 1M-token context**, and the strongest open coding scores published so far.
{% endhint %}

GLM-5.1 was already the open model to beat on software engineering. GLM-5.2 raises Terminal-Bench 2.1 from 63.5 to **81.0** and SWE-bench Pro from 58.4 to **62.1**, and it does it with an MIT licence while the rest of the frontier moved toward custom terms with revenue gates.

The catch is size. The FP8 checkpoint is **756GB**. This is not a single-card model and never will be. What makes it interesting on Clore.ai is that the quantized builds land inside the ceiling of the biggest rigs on the marketplace.

### Key Specs

| Property        | Value                                                                               |
| --------------- | ----------------------------------------------------------------------------------- |
| Parameters      | \~750B total, \~40B active (MoE)                                                    |
| Architecture    | 78 layers, 256 routed experts, 8 active per token, IndexShare sparse attention, MTP |
| Context         | 1,000,000 tokens                                                                    |
| License         | MIT                                                                                 |
| Release Date    | 13 June 2026                                                                        |
| Weights         | FP8 756GB · Q2\_K\_XL GGUF 254GB · IQ1\_S GGUF 217GB                                |
| Primary Tooling | SGLang ≥ 0.5.13.post1, vLLM ≥ 0.23.0, llama.cpp                                     |

### What is new versus GLM-5.1

* **Solid 1M context** — not a headline number but a window that holds up across long-horizon work
* **IndexShare** — one indexer reused across every four sparse-attention layers, cutting per-token FLOPs by **2.9× at 1M context**
* **Better MTP** — speculative-decoding acceptance length up by as much as 20%
* **Flexible thinking effort** — trade latency against depth per request
* **Still MIT** — the weights carry no usage restriction

***

## Requirements

{% hint style="warning" %}
**This model needs a rig, not a card.** FP8 at 756GB exceeds every machine on the Clore.ai marketplace. The largest listed boxes are 4× RTX PRO 6000 Blackwell (380GB) and 10–11× RTX 5090 (310–341GB). Quantized GGUF is the only route here; full-precision serving belongs on [bare metal](https://clore.ai/bare-metal).
{% endhint %}

| Build        | Size  | Where it runs on Clore.ai                                          |
| ------------ | ----- | ------------------------------------------------------------------ |
| `UD-IQ1_S`   | 217GB | 8× RTX 5090 (248GB) — 47 servers listed at ≥242GB                  |
| `UD-IQ2_M`   | 239GB | 8× RTX 5090, tight                                                 |
| `UD-Q2_K_XL` | 254GB | 10× RTX 5090 (310GB) or 4× RTX PRO 6000 (380GB)                    |
| `UD-Q3_K_M`  | 343GB | 4× RTX PRO 6000 (380GB) only — 2 such servers listed               |
| `UD-IQ4_XS`  | 365GB | 4× RTX PRO 6000, no headroom                                       |
| FP8 official | 756GB | Not on the marketplace → [bare metal](https://clore.ai/bare-metal) |

Add 10–15% on top of the weight size for the KV cache and activations at working context lengths, and check system RAM: these rigs need enough to stage the weights during load.

***

## Deploy with llama.cpp on a multi-GPU rig

The realistic path on marketplace hardware. Rent a 10× RTX 5090 rig (roughly **$5.00/hr** at the last snapshot) and split the model across all cards:

```bash
# ~254GB — leave the rig some headroom
huggingface-cli download unsloth/GLM-5.2-GGUF \
  --include "*UD-Q2_K_XL*" --local-dir /workspace/glm52

llama-server -m /workspace/glm52/*UD-Q2_K_XL*-00001-of-*.gguf \
  --host 0.0.0.0 --port 8080 \
  -ngl 999 --split-mode layer \
  -c 131072 --flash-attn \
  --no-mmap
```

{% hint style="info" %}
`--no-mmap` matters on rented hardware: the weights are pulled fresh onto a disk you do not keep, and mmap-ing a 254GB file over a slow disk turns first-token latency into minutes. Budget 30–60 minutes for the download itself and pick a server with a fast link.
{% endhint %}

## Deploy with vLLM or SGLang (FP8, dedicated hardware)

If you have the capacity — bare metal, or your own cluster — Z.ai supports both engines directly:

```bash
# vLLM >= 0.23.0
vllm serve zai-org/GLM-5.2-FP8 \
  --tensor-parallel-size 8 \
  --max-model-len 1000000 \
  --enable-expert-parallel \
  --gpu-memory-utilization 0.92

# SGLang >= 0.5.13.post1
python3 -m sglang.launch_server \
  --model-path zai-org/GLM-5.2-FP8 \
  --tp 8 --context-length 1000000 \
  --speculative-algorithm EAGLE
```

Ready-made quantized checkpoints for other stacks: [`nvidia/GLM-5.2-NVFP4`](https://huggingface.co/nvidia/GLM-5.2-NVFP4) for Blackwell, [`cyankiwi/GLM-5.2-AWQ-INT4`](https://huggingface.co/cyankiwi/GLM-5.2-AWQ-INT4) for AWQ stacks, [`amd/GLM-5.2-MXFP4`](https://huggingface.co/amd/GLM-5.2-MXFP4) for Instinct.

***

## Clore.ai GPU Recommendations

| Setup                     | Total VRAM | Build                 | Clore.ai cost                             |
| ------------------------- | ---------- | --------------------- | ----------------------------------------- |
| 8× RTX 5090               | 248GB      | IQ1\_S / IQ2\_M       | \~$2.00–3.50/hr                           |
| **10× RTX 5090**          | **310GB**  | **Q2\_K\_XL**         | **\~$5.00/hr**                            |
| 4× RTX PRO 6000 Blackwell | 380GB      | Q2\_K\_XL or Q3\_K\_M | \~$5.00/hr                                |
| Dedicated 8× H200         | 1,128GB    | FP8, full 1M ctx      | [bare metal](https://clore.ai/bare-metal) |

Only a handful of rigs this size exist at any moment — 47 servers at ≥242GB, 9 of them free at the last snapshot. Check the marketplace before planning around one.

***

## Benchmarks

From Z.ai's own model card (13 June 2026). Independent reproductions exist for the coding suites; treat the reasoning numbers as vendor-reported.

| Benchmark                         | GLM-5.2  | GLM-5.1 | DeepSeek-V4-Pro (Preview) | MiniMax M3 |
| --------------------------------- | -------- | ------- | ------------------------- | ---------- |
| Terminal-Bench 2.1 (Terminus-2)   | **81.0** | 63.5    | 64                        | 65         |
| Terminal-Bench 2.1 (best harness) | **82.7** | 69      | —                         | —          |
| SWE-bench Pro                     | **62.1** | 58.4    | 55.4                      | 59         |
| NL2Repo                           | **48.9** | 42.7    | 35.5                      | 42.1       |
| DeepSWE                           | **46.2** | 18      | 8                         | 20         |
| HLE                               | 40.5     | 31      | 37.7                      | 37         |
| AIME 2026                         | 99.2     | 95.3    | 94.6                      | —          |
| GPQA-Diamond                      | 91.2     | 86.2    | 90.1                      | 93         |

***

## Use Cases

* **Autonomous coding agents** — the Terminal-Bench and DeepSWE jumps are exactly the long-horizon behaviour agents need
* **Whole-repository reasoning** — 1M context with sparse attention that stays affordable at length
* **Migration and refactor work** — NL2Repo measures building a repo from a spec, and GLM-5.2 leads the open field
* **Self-hosted alternative to closed frontier APIs** — MIT means you can ship it inside a product
* **Batch evaluation harnesses** — rent a big rig by the minute, run the sweep, close the order

***

## Troubleshooting

| Issue                       | Fix                                                                                                         |
| --------------------------- | ----------------------------------------------------------------------------------------------------------- |
| Download takes forever      | 254GB at Q2 — filter the marketplace for high-bandwidth servers and use `--include` to fetch one quant only |
| OOM spread across GPUs      | `--split-mode layer` in llama.cpp; in vLLM raise `--tensor-parallel-size` to the full GPU count             |
| First token takes minutes   | Drop `--mmap`, keep the model on local NVMe, and pre-warm with a short prompt                               |
| vLLM rejects the config     | Needs ≥ 0.23.0; SGLang needs ≥ 0.5.13.post1                                                                 |
| Quality feels off at IQ1    | It is a 1-bit build of a 750B model. Move to Q2\_K\_XL or higher if the rig allows                          |
| Rig disappears mid-download | Someone else rented it. Use on-demand rather than spot for long setup work                                  |

***

## Next Steps

* **Predecessor:** [GLM-5.1](/guides/language-models/glm-5-1.md) — the April 744B release
* **Fits on one card instead:** [Qwen3.8-27B](/guides/language-models/qwen38-27b.md) — Apache 2.0, 15GB at Q4
* **Same weight class:** [MiniMax M3](/guides/language-models/minimax-m3.md) · [Nemotron 3 Ultra](/guides/language-models/nemotron-3-ultra.md) · [DeepSeek V4](/guides/language-models/deepseek-v4.md)
* **Rig sizing:** [GPU Pricing & Availability](/guides/getting-started/pricing.md) · [Multi-GPU Setup](/guides/advanced/multi-gpu-setup.md)

### Links

* [GLM-5.2 on Hugging Face](https://huggingface.co/zai-org/GLM-5.2) · [FP8](https://huggingface.co/zai-org/GLM-5.2-FP8) · [GGUF](https://huggingface.co/unsloth/GLM-5.2-GGUF)
* [Z.ai blog](https://z.ai/blog/glm-5.2) · [GLM-5 GitHub](https://github.com/zai-org/GLM-5)
* [vLLM recipe](https://recipes.vllm.ai/zai-org/GLM-5.2) · [SGLang cookbook](https://cookbook.sglang.io/autoregressive/GLM/GLM-5.2)
* **Rent a GPU:** [RTX 5090](https://clore.ai/rent-5090.html) · [Marketplace](https://clore.ai/marketplace) · [Bare metal](https://clore.ai/bare-metal)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.clore.ai/guides/language-models/glm-5-2.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
