Vibeleaderboard
← All Intel
Intel / article

GLM-5.2 ships open weights with a usable 1M context

Source
huggingface.co
Publisher
Z.ai
Author
Z.ai
Date

Context

Z.ai's case that GLM-5.2's million-token is usable, not just advertised, rests on three pieces of work rather than the headline number. The context window is how much text the model can consider in one request; for a it decides how much of a codebase and its own earlier work stays in view. In its launch blog, Z.ai says it substantially expanded 1M-context training on coding-agent tasks, changed the model's attention so long inputs cost less to process, and reworked its serving engine for the memory that long prompts consume. The weights themselves are a 753-billion-parameter model published on Hugging Face under the MIT license, with listed support for local runtimes including SGLang, vLLM and Transformers.

The attention change is called IndexShare. GLM-5.2 uses sparse attention: rather than comparing each new token with every earlier one, a lightweight component called an indexer picks a top-scoring subset of earlier tokens to attend to. In GLM-5.2, the indexer at the first of every four layers makes that selection and the next three layers reuse it, skipping their own scoring and selection. Z.ai says this cuts per-token compute by 2.9 times at a 1M context length. It also says the saving does not proportionally shrink the , the stored per-token attention data that spares the model from recomputing earlier context, so raising the maximum from 200K to 1M tokens made cache memory, rather than computation, the main serving bottleneck. Its serving answer builds on LayerSplit, a scheme from its earlier account of debugging GLM-5 serving in which each GPU holds the cache for only a subset of the model's layers.

The evidence that the long context turns into results is Z.ai's own reporting. On long-horizon benchmarks that the model card says were run at 1M context by outside evaluators, it lists GLM-5.2 at 74.4 on FrontierSWE against 75.1 for Claude Opus 4.8 and 72.6 for GPT-5.5, but 13.0 on SWE-Marathon against 26.0 for Opus 4.8, a gap the company acknowledges as room to grow. These are figures Z.ai publishes about its own model, so they are vendor evidence of long-context usefulness rather than settled proof. The Hugging Face page now also flags GLM-5.3 as a newer version.

Terms in this piece · Glossary
  • Context and context window — Context is the information available for a generation; the context window is the capacity available to hold it.
  • Agent mode — A mode in which one agent can inspect, edit, run commands, and iterate toward an outcome.
  • KV cache — The memory a model keeps about text it has already read, so generating each new token doesn't require reprocessing the whole conversation.
  • Reasoning effort — The inference-time budget a reasoning model spends before answering.

Get the Brief

A cited digest of what matters for people building with AI, every morning. Unsubscribe anytime. See today’s edition

Read the source huggingface.co
More from Z.ai
Recommended reads