Dev.to
6/30/2026

GML5 IndexCache
Short summary
IndexCache optimizes DeepSeek Sparse Attention by selectively running token-selection indexers at key layers and caching results for reuse, eliminating 75% of redundant computations. Adjacent layers share 70-100% identical top-k token selections, enabling a training-free greedy search to identify which layers can skip their own indexer. Empirical validation on a 30B model confirms full performance preservation with only 25% of original indexers active.
- •Indexer redundancy: standard sparse attention runs O(NL²) indexer cost per layer; IndexCache discovers 70-100% overlap between layers
- •Solution: mark layers as Full (run indexer, cache result) or Shared (reuse prior cache); greedy search identifies which layers to mark as Shared
- •Results: 75% indexer reduction with no performance loss on 30B parameter models
Generated with AI, which can make mistakes.
Is this a good recommendation for you?


