Tencent open-sources Hy4 Preview at 770B — IndexCache cross-layer index reuse — What does it mean?
The news. On August 29, 2026, Tencent published Hy4 Preview on Hugging Face under Apache-2.0: a 770B-parameter Mixture-of-Experts model that activates 49B parameters per token across 78 layers, supports a 1M-token context, and ships in BF16 and FP8 with deployment recipes for vLLM and SGLang. Its attention is Gated DeepSeek Sparse Attention with IndexCache to reuse sparse indices across layers; a native MTP layer (10B total, 0.7B activated) supplies draft tokens for speculative decoding. Read the model card →
Picture the ticket rail above the pass. A runner walks out to table twelve, writes down what the table actually wants, and spikes that one ticket where every station can see it. The grill reads it. The sauté station reads it. Nobody walks back into the dining room to ask again, because the expensive part was the trip, not the reading.
Sparse attention has the same shape. A model carrying a million tokens of context cannot have every query score every cached token — that is dense attention, and its cost grows with the square of the sequence length. So a sparse scheme sends a cheap indexer out first: it scores the cached past, keeps the top handful, and hands the attention math a short list. Deciding which cached tokens a query is scored against is the whole game; the arithmetic that follows is the easy part.
The catch is that a transformer is not one attention layer. Hy4 Preview has 78 of them, and a sparse scheme conventionally sends a fresh runner from every single one. IndexCache spikes the ticket on the rail instead: the index is computed, stored, and read by later layers rather than rebuilt by each. Tencent's model card names the mechanism and its purpose — reusing sparse indices across layers — but does not publish how many layers share one index, so treat the sharing pattern itself as undocumented.
Reuse is only free if the layers actually want the same tokens. A query vector at layer 2 is not the query vector at layer 60 — every layer has rotated and reshaped its representation on the way up, so in principle each one would pick a slightly different top-k. Sharing an index means a later layer attends to an earlier layer's choice rather than its own. That is a genuine approximation, and it is the price IndexCache pays for the trip it skips.
The bet behind it is that sparse selections are largely shared between nearby layers — that which cached tokens matter for a given query is more a property of the content than of the layer doing the asking. Tencent publishes no evidence for that bet in the model card, and no ablation against a per-layer index. What is on the record is that the mechanism shipped inside a released open-weight model, which is weaker evidence than a measured accuracy delta and should be read that way.
| Scheme | What each query attends to | How often the index is built |
|---|---|---|
| Dense (full) attention | every earlier token — there is no index | not applicable |
| DeepSeek Sparse Attention | the individual tokens a lightning indexer scores highest | conventionally, inside each attention layer |
| MiniMax Sparse Attention | whole KV blocks rather than single tokens | conventionally, inside each attention layer |
| Lookahead Sparse Attention | the cached chunks a neural memory indexer predicts will be needed | conventionally, inside each attention layer |
| Hy4: Gated DSA + IndexCache | the same token-level selection as DSA | once, then reused across layers — sharing pattern not published |
Where the saving actually lands
Hold three things fixed: a 1M-token context, the 78 layers Tencent documents, and one token being decoded. An indexer that runs per layer has to score all one million cached positions to pick its top-k, so that single decoded token costs 78 × 1M = 78 million index scores before any attention arithmetic happens at all. Build the index once and let the other layers read it, and the same token costs 1 million — a 78× cut in indexer work. (Illustrative: Tencent does not publish how many layers share one index. If it refreshes every six layers the factor is 13×, not 78×.)
Two things keep that number honest. The indexer is deliberately cheap — a few operations per cached position, against a full attention head's worth of work for each token it selects — so this is not a 78× speedup of the model. And the saving is a compute saving, not a memory one: the KV cache still holds all million tokens, because a reused index still points at them. What IndexCache removes is a fixed overhead that sparse attention adds back on top of the cache, and that overhead is the thing that grows with depth. The deeper the model, the more of the sparse-attention tax IndexCache refunds.
Goes deeper in: LLM Internals → Attention → Computing Attention Scores
Related explainers
- Tencent open-sources Hy4 Preview at 770B — Identity Hyper-Connections — the other architecture change in the same model: four residual streams between layers instead of one.
- MiniMax M3 — MiniMax Sparse Attention (MSA) — the block-level alternative to the token-level selection Hy4 caches.