@ziv_ravid: I read the GLM-5.2 report and saw they use IndexShare, which is a cool, simple trick. Regular attention makes every tok…
Summary
IndexShare is a technique in the GLM-5.2 report that shares a single indexer across multiple layers in sparse attention, reducing FLOPs by 2.9x at 1M context by avoiding redundant top-key selections per layer.
View Cached Full Text
Cached at: 06/18/26, 04:07 AM
I read the GLM-5.2 report and saw they use IndexShare, which is a cool, simple trick.
Regular attention makes every token look at every other token, which is the quadratic cost everyone keeps trying to kill. Sparse attention is a workaround where each token only looks at a small set of relevant tokens instead of all of them. In DSA the way you pick that set is a small “indexer” that scores the keys and keeps the top-k. The indexer stays cheap but still picks well because it’s trained to imitate the real attention distribution with a KL loss, and ranking which tokens matter turns out to be a much easier job than computing the exact attention, so it can run in FP8.
The problem is that the indexer is itself quadratic, and it runs at every layer. so at 1M context most of your compute goes into deciding what to attend to, not into the attention.
The trick with IndexShare is that instead of running it every layer, you share one indexer across a group of 4 layers and let the other 3 reuse that selection. they got 2.9x fewer FLOPs per token at 1M! the idea is betting the set of tokens worth attending to barely changes from one layer to the next, so recomputing it every layer is wasted work.
This idea of sharing across different layers is not new, of course. things like HySparse or Kascade do similar reuse but keep a few real dense-attention layers around to compute the “true” selection. GLM takes it one step further and reuses the output of an indexer that was already an approximation, and it holds up because the model is trained that way from mid-training, not switched on at inference. Super simple!
Similar Articles
zai-org/GLM-5
zai-org releases GLM-5 series, with GLM-5.2 achieving top open-source performance on coding benchmarks with 1M-token context and improved architecture using IndexShare sparse attention.
zai-org/GLM-5.2-FP8
Z.AI releases GLM-5.2, a flagship open-source model with a solid 1M-token context, improved coding capabilities, and a new IndexShare sparse attention architecture that reduces FLOPs by 2.9x at 1M context.
@mervenoyann: GLM-5.2 is comparable to Opus 4.8 with 1M context > new IS attention reuses one indexer every 4 sparse layers (2.9× per…
GLM-5.2 is a new model comparable to Opus 4.8, featuring 1M context, new IS attention, improved speculative decoding, and flexible thinking-effort levels. It is released under MIT license with day-0 support in transformers, vLLM, and SGLang.
LiteTopK: Exploiting the Curse of Dimensionality for a Fused Indexer-TopK Kernel in Long-Context Sparse Attention
LiteTopK is a fused indexer-top-k kernel for long-context sparse attention that exploits the curse of dimensionality to reduce memory traffic and improve efficiency, accelerating GLM 5.2 by 1.2x during prefill.
MISA: Mixture of Indexer Sparse Attention for Long-Context LLM Inference
The paper introduces MISA, a method that applies a mixture-of-experts approach to the indexer heads in sparse attention mechanisms, significantly reducing computational costs for long-context LLM inference while maintaining performance.