DEV Community

Aamer Mihaysi
Aamer Mihaysi

Posted on

GLM-5.2: The 1M-Context Open Model That Actually Ships

GLM-5.2: The 1M-Context Open Model That Actually Ships

I spent the weekend pulling down GLM-5.2 and running it through my standard agentic eval suite. The headline: this is the first open-weight model where a 1M-token context window feels like a real feature, not a benchmark footnote.

Z.AI released GLM-5.2 under MIT license — no region locks, no gated access, no "contact sales." You can download the weights, run it on your own hardware, and build on top of it. That alone puts it in a different category from the closed-source models that dominate the long-context conversation.

What's Actually New

The architecture change that matters is IndexShare. GLM-5.2 reuses the same indexer across every four sparse attention layers instead of giving each layer its own. That drops per-token FLOPs by 2.9× at 1M context. In practice, this means the model doesn't grind to a halt when you feed it a codebase or a full conversation history.

The MTP (Multi-Token Prediction) layer also got an upgrade — speculative decoding acceptance length is up 20% over GLM-5.1. If you're serving this behind an API, that's a direct throughput win.

The Numbers That Matter

I ran the model through SGLang (v0.5.13.post1) on a pair of A100s. The 1M context loaded without OOM, and retrieval from the tail of a 900K-token document was coherent — not perfect, but usable. That's more than I can say for most open models claiming long context.

On the benchmark side, the results are competitive where it counts for builders:

  • SWE-bench Pro: 62.1% — beats DeepSeek-V4-Pro (55.4%) and Qwen3.7-Max (60.6%)
  • AIME 2026: 99.2% — top of the open-weight pack
  • Terminal Bench 2.1: 81.0% — strong for agentic coding workflows
  • MCP-Atlas: 76.8% — solid tool-use capability

The coding benchmarks are where GLM-5.2 really separates itself. FrontierSWE at 74.4% and DeepSWE at 46.2% are genuinely impressive for an open model. If you're building agentic coding tools, this is worth a close look.

Where It Breaks

Honest trade-offs:

  • Inference cost is real. 1M context with sparse attention is cheaper than dense, but it's still expensive. You're not running this on a laptop. Plan for at least 2× A100s or equivalent.
  • The "thinking effort" levels are useful but uneven. The low-effort mode is fast but noticeably dumber. The high-effort mode is strong but slow. You'll want to tune this per-task.
  • Tool-use benchmarks are good, not great. MCP-Atlas at 76.8% is solid but behind Claude Opus 4.8 (77.8%). For complex multi-step agentic workflows, you may still want a closed-source fallback.

The Takeaway

GLM-5.2 is the first open model where I'd seriously consider it for a production long-context workload. The MIT license removes the usual friction, the IndexShare architecture makes 1M context practical, and the coding/agentic benchmarks are genuinely competitive.

If you've been waiting for an open-weight model that can handle a full codebase in context without falling apart, this is it. Pull the weights, spin up SGLang, and see if it works for your use case. It worked for mine.


I tested GLM-5.2 on A100 hardware using SGLang v0.5.13.post1. Your mileage may vary depending on your infrastructure and workload.

Top comments (0)