Z.ai's GLM-5.2 supports a million-tokenThe chunk of text a model reads and writes in — roughly three-quarters of a word — and the unit AI usage is billed in.Full definition →context windowThe maximum amount of text a model can consider at once — its working memory for the current conversation or task.Full definition →, allowing long coding sessions to retain more material within a model request. Its architecture report describes reducing part of the processing cost by sharing the selection of earlier text to attend to across groups of four model layers.
This reuse avoids repeating the same selection work at every layer. Memory remains a separate constraint: the authors say the stored attentionThe mechanism that lets a model weigh which earlier words matter for the word it's currently processing — the core operation of a transformer.Full definition → data does not shrink proportionally with the arithmetic cost. Serving long sessions therefore also requires changes to memory management, scheduling, and data movement.
Terms in this piece · Glossary
token — The chunk of text a model reads and writes in — roughly three-quarters of a word — and the unit AI usage is billed in.
context window — The maximum amount of text a model can consider at once — its working memory for the current conversation or task.
attention — The mechanism that lets a model weigh which earlier words matter for the word it's currently processing — the core operation of a transformer.