GateSight: Query-Agnostic KV Eviction for Hybrid Gated DeltaNet LLMs

GateSight (arXiv:2610.14754) solves the linear KV-cache bottleneck in hybrid recurrent-attention models like Qwen3.8-27B and 125B Qwen3.8-Flash-Next. Using lightweight, position-free MLPs driven by native Gated DeltaNet write, decay, and value-norm signals, GateSight retains 98.8% semantic accuracy at a 10% KV budget, achieves 90.6% on AIME24/25, and accelerates 260K decoding by 5.2x-12.2x.
GateSight: Query-Agnostic KV Eviction for Hybrid Gated DeltaNet LLMs: GateSight (arXiv:2610.14754) solves the linear KV-cache bottleneck in hybrid recurrent-attention models like Qwen3.8-27B and 125B Qwen3.8-Flash-Next. Using lightweight, position-free MLPs driven by native Gated DeltaNet write, decay, and value-norm signals, GateSight retains 98.8% semantic accuracy at a 10% KV budget, achieves 90.6% on AIME24/25, and accelerates 260K decoding by 5.2x-12.2x. Designed as a zero-dependency, open-source TypeScript architecture under the MIT License with native Model Context Protocol (MCP) support and deterministic phase state machines.
- 98.8% Full-Cache Semantic Accuracy at 10% Budget: Transfers zero-shot from 1K-token Nemotron training snippets to 262K-token SCBench prefill without queries.
- Superior 32K Reasoning Transfer (90.6% AIME24/25): Beats KVzap (86.1%), TriAttention (81.7%), KeyDiff (62.8%), and SnapKV (54.4%) on Qwen3.8-27B.
- 5.2x-12.2x 260K Decoding Throughput: Compacts retained entries contiguously into PagedAttention blocks with under 1.4% scoring latency overhead.
- Cross-Layer Gate-Proportional Allocation: Uses query output gate means (21.2x variance across layers) to boost accuracy by +2.9 to +6.9 points over flat eviction.
import { createAgent } from '@smoke-monkey/harness';// Serve long-horizon reasoning agents on Qwen3.8-27B with GateSight KV compactionconst agent = createAgent({agentId: 'gatesight-260k-reasoning-agent',provider: 'openai-compatible',baseUrl: 'http://127.0.0.1:8000/v1',model: 'Qwen/Qwen3.8-27B',workspacePath: process.cwd(),mcpServers: {vllmControl: {command: 'npx',args: ['-y', '@smoke-monkey/mcp-vllm-monitor', '--plugin', 'gatesight'],env: {GATESIGHT_KEPT_RATIO: '0.10',GATESIGHT_MIN_PER_LAYER: '4',GATESIGHT_COMPACT_INTERVAL: '128',},},},permissions: {read_file: 'allow',write_file: 'ask',run_command: 'ask',},});async function main() {const result = await agent.run('Analyze the 200K-token repository trace under a 10% KV budget and verify PagedAttention block reclamation.');console.log('Completed:', result.summary);}main().catch(console.error);
Watch: Related Video Guides
Jet-Nemotron, Gated DeltaNet, and the slow triumph of hybrid models
Hybrid Attention Explained: Gated DeltaNet + Full Attention
What Is GateSight and Why Do Hybrid GDN-Attention Models Still Bottleneck?
GateSight (arXiv:2610.14754) is a query-agnostic KV-cache eviction framework built specifically for hybrid Gated DeltaNet (GDN)–Attention architectures such as Qwen3.8-27B and 125B Qwen3.8-Flash-Next. By scoring future attention utility in O(n) linear time directly from preceding recurrent GDN gates, GateSight retains 98.8% of full-cache semantic accuracy at a 10% KV budget.
Although hybrid models replace 75% of attention layers with fixed-state GDN blocks, their remaining attention layers still accumulate linear KV caches across 262K-token contexts and 32K reasoning chains. Full-attention eviction heuristics ignore GDN state dynamics and collapse on multi-turn QA or long-chain math reasoning.
| Eviction Method (Qwen3.8-27B) | AIME24/25 Mean (4096 / 3072 / 2048 Cap) | Overall 60-Problem Mean | Utility Prediction Spearman (rho) | Top-10% Coverage (Cov@10) |
|---|---|---|---|---|
| FullKV (Uncompressed) | 96.7% / — / — | 95.0% | — | — |
| GateSight (Ours) | 93.3% / 91.7% / 86.7% | 90.6% | +0.523 (864 GDN) | 54.6% |
| KVzap | 93.3% / 88.3% / 76.7% | 86.1% | — | — |
| TriAttention | 88.3% / 85.0% / 71.7% | 81.7% | +0.389 | 44.0% |
| KeyDiff | 76.7% / 61.7% / 55.0% | 62.8% | +0.213 | 30.3% |
| SnapKV / StreamingLLM | 66.7% / 53.3% / 43.3% | 54.4% | +0.071 (Age) | 31.2% |
How Recurrent GDN Write/Decay Signals Anticipate Attention Utility
Instrumenting Qwen3.8-27B across 2,428 documents revealed that GDN heads form a parameter-anchored timescale hierarchy from fast (<5 tokens) to slow (>=1,000 tokens) heads around a 24-token median. Across random document pairs, head half-life rankings agree at Spearman rho = 0.990–0.997:
- Position-Free Within-Layer MLP Estimator: For attention layer
land KV headh, GateSight concatenates(beta, g, ||v||)across all 48 GDN value heads in a local window of up to 6 preceding GDN layers (864 features, 432 at the first attention layer). An independent864 -> 64 -> 1GELU-sigmoid MLP (3.4M total parameters on 27B; 1.3M on Flash-Next) predicts future leave-one-out utility in linear time without computing attention matrices or positional encodings. - Output-Gate Cross-Layer Allocation: Query-head output gates
w_lspan a 21.2x range (0.022 to 0.459) on Qwen3.8-27B. Allocating layer budgets viaK_l - n_prot = clip(lambda * w_l, k_min, n - n_prot)adds +6.9 points on SCBench-3 (53.7% to 60.6%) and +6.1 points on AIME24/25 (84.4% to 90.6%) over flat per-layer budgets. - Zero-Kernel vLLM 0.28 PagedAttention Compaction: GateSight retains head-uniform per-layer counts
K_lso evicted slots pack contiguously into leading PagedAttention blocks with zero head padding and zero custom CUDA kernels.
Preserve GDN Recurrent State Across Multi-Turn Reuse
Never discard the fixed-size GDN recurrent state tensors when compacting attention KV blocks. GateSight keeps all GDN states intact so multi-turn prompt prefixes and reasoning continuations resume cleanly after eviction.
Reproducible Gate-Proportional Layer Budget Allocation Check
Verify how GateSight redistributes a 10% KV budget across 16 attention layers in Qwen3.8-27B using offline output-gate weights and a k_min = 4 safety floor:
# Reproduce GateSight bounded gate-proportional layer allocation (Eq. 4)
def allocate_layer_budgets(w_layers, n_tokens=262144, kept_frac=0.10, n_prot=64, k_min=4):
total_allocatable = int(len(w_layers) * kept_frac * n_tokens) - len(w_layers) * n_prot
# Binary search lambda so sum(clip(lambda * w_l, k_min, n - n_prot)) == total_allocatable
lo, hi = 0.0, float(n_tokens * 100)
for _ in range(60):
mid = 0.5 * (lo + hi)
used = sum(min(max(mid * w, k_min), n_tokens - n_prot) for w in w_layers)
if used < total_allocatable:
lo = mid
else:
hi = mid
return [n_prot + int(round(min(max(lo * w, k_min), n_tokens - n_prot))) for w in w_layers]
sample_w = [0.022, 0.048, 0.095, 0.140, 0.210, 0.295, 0.380, 0.459] * 2
budgets = allocate_layer_budgets(sample_w)
print("Sample 16-layer K_l counts at 10% of 262K:", budgets[:8])Frequently Asked Questions
Q:Does GateSight require task-specific queries or prompts during training?
No. GateSight trains self-supervised once on 2,428 short (750-1,250 token) generic Nemotron text segments using leave-one-out continuation utility, then generalizes zero-shot to 262K prefill and 32K math reasoning.
Q:How does GateSight avoid ragged per-head paging overhead in vLLM?
While ranking tokens independently per KV head, GateSight enforces a shared per-layer kept count K_l across all heads in layer l, packing retained blocks contiguously into standard PagedAttention pages without padding.
Q:What is the runtime scoring overhead of GateSight MLPs at 260K context?
GateSight adds less than 1.4% scoring latency overhead because its position-free MLPs run in O(n) time over prefill GDN gate scalars without touching quadratic attention matrices.
Q:How well does GateSight perform on sparse-MoE hybrid models like Qwen3.8-Flash-Next?
On 125B Qwen3.8-Flash-Next (6B active, FP8, QSA), GateSight uses 24 lightweight MLPs (1.3M total params) pooled over 4-token QSA blocks and beats flat eviction by +3.8 points on SQuAD and +6.7 points on GSM8K.
Related Alternatives & Comparisons
Related Architecture Guides
View all guidesBest Open Source Coding Agents in 2026: Free, Local & Fully Hackable Harnesses
MCP Server Security Best Practices: Hardening Model Context Protocol Agents in 2026
Open Source Coding Agent Harness: Build a Forkable, Local AI Engineering Runtime
Build with Smoke Monkey Harness
Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.