HySparse2 Slashes AI Agent Memory 4.5x While Cutting Prefill Work in Half
A research team introduces a two-level KV sharing scheme that cuts prefill compute by up to 5x while boosting long-context retrieval on 80B MoE models.
- Researchers introduce HySparse2, a hybrid sparse attention design built for long agentic contexts.
- Two-level KV sharing lets prefill skip the entire cross-decoder, cutting prefill FLOPs 2.92x versus HySparse.
- KV cache shrinks to 2.69 GB at 1M tokens, versus 12.09 GB for Hybrid SWA.
- Beats HySparse by 11.30 points on MRCR-v2 and 19.81 on RULER-v2 after post-training.
- Token-level selection replaces block-level, recovering scattered evidence in multi-turn agent traces.
- Prefill nodes need only half the model weights under prefill-decode disaggregation.
HySparse2 Cuts the Prefill Path for Tool-Using Agents
Researchers have described HySparse2, an attention architecture designed to reduce the cost of processing long tool responses. Tool-using language models often generate a short request, receive a long search result, document, or execution trace, and process that input before taking the next action. As the interaction history grows, this prefill work can consume more compute and memory than token generation.
HySparse2 combines YOCO-style cross-layer key-value sharing with sparse attention. According to the full paper, an 80-billion-parameter mixture-of-experts model using 3 billion parameters per token outperforms HySparse and a hybrid sliding-window baseline on long-context retrieval. The architecture also uses 2.92 times fewer prefill FLOPs than HySparse and 5.02 times fewer than the sliding-window configuration in the reported comparison.
Tool Responses Turn Prefill Into the Bottleneck
Prefill is the model pass that processes incoming tokens before generation begins. During that pass, each layer computes token representations and writes keys and values to the KV cache. The decoder later reuses that cache instead of recomputing the entire history for every generated token.
Agent workloads make this process unusually lopsided. A model may emit a short tool call and receive thousands of tokens in return, then repeat that pattern across several rounds. Each observation expands the history, increases attention work, and enlarges the cache that serving infrastructure must retain or transfer.
Existing efficiency methods reduce different parts of that cost:
- Sliding-window attention limits each token to nearby context, reducing compute while weakening access to distant evidence.
- Sparse attention selects a limited set of distant tokens, preserving broader retrieval while still running every model layer during prefill.
- YOCO-style sharing lets many decoder layers consume a shared KV cache, reducing cache duplication across the stack.
One Cache Plan, Two Sharing Layers
YOCO divides the transformer into a self-decoder followed by a cross-decoder. HySparse2 uses hybrid sliding-window attention in the self-decoder and hybrid sparse attention in the cross-decoder. In both halves, occasional full-attention layers provide global access while cheaper layers handle most of the sequence.
This story is for Pro members
You've reached the end of the free preview. Upgrade to AlphaSignal Pro to read the full article - and everything else behind the paywall.