SparseEngine: Sparse-First Inference Engine With 12.1x Decode Throughput

SparseEngine (arXiv:2609.39068) is an open-source, sparse-first LLM inference engine uniting 15 dynamic sparsity, KV eviction, compression, and quantization methods under a shared lifecycle contract, achieving 9.8–12.1x vanilla vLLM 128K decode throughput with KV eviction and 2.24x multi-turn agent replay speedups.
SparseEngine: Sparse-First Inference Engine With 12.1x Decode Throughput: SparseEngine (arXiv:2609.39068) is an open-source, sparse-first LLM inference engine uniting 15 dynamic sparsity, KV eviction, compression, and quantization methods under a shared lifecycle contract, achieving 9.8–12.1x vanilla vLLM 128K decode throughput with KV eviction and 2.24x multi-turn agent replay speedups. 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.
- 9.8–12.1x Vanilla vLLM Throughput: On 128K-token inputs at maximum supported batch sizes, KV eviction delivers up to 12.1x aggregate decode throughput.
- 15 Sparse Methods Under One Contract: Supports Quest, SnapKV, OmniKV, PyramidKV, R-KV, StreamingLLM, and MLA hybrid attention with continuous batching.
- Chain Cache Across Agent Turns: Resumes eviction-based requests directly from compacted KV states and method metadata without re-prefilling raw history.
- Prefix Cache Pruning: Reclaims KV blocks from stale tool-output regions while preserving logical prefix matching for multi-turn agent workflows.
import { createAgent } from '@smoke-monkey/harness';const longContextAgent = createAgent({agentId: 'sparseengine-128k-repo-agent',provider: 'openai-compatible',model: 'Qwen/Qwen3-30B-A3B-Instruct-2507-FP8',baseUrl: 'http://127.0.0.1:8000/v1',workspacePath: process.cwd(),permissions: {read_file: 'allow',write_file: 'allow',run_command: 'ask',},});async function analyzeLargeCodebase() {const result = await longContextAgent.run('Trace cross-module memory leaks across 90K tokens of logs and patch the worker pool.');console.log('SparseEngine Agent Summary:', result.summary);}analyzeLargeCodebase().catch(console.error);
Watch: Related Video Guides
LLM Inference Why 90% Sparsity Gives No Speedup: 2:4 Structured Sparsity Explained
OSDI '26 - Kairox: Adaptive GPU-CPU Hybrid LLM Inference via Online Neuron Balancing
What Is SparseEngine? Method-Owned KV Contracts & Cross-Turn Reuse
SparseEngine (arXiv:2609.39068) is a ground-up, sparse-first LLM inference engine designed to serve heterogeneous KV-cache sparsity, eviction, compression, and quantization methods inside shared continuous-batching infrastructure. Its shared lifecycle contract combines fine-grained execution hooks with method-owned cache storage, eliminating layout incompatibilities across 15 sparse algorithms.
Conventional engines like vanilla vLLM hard-code uniform block layouts that break when algorithms retain non-uniform token budgets per head, store page-level min/max bounding summaries (Quest), or combine prefill eviction (SnapKV) with dynamic decode-time layer skipping (OmniKV). SparseEngine also introduces Chain Cache to resume evicted multi-turn states without re-running prefill, and Prefix Cache Pruning to discard transient tool traces while keeping logical prefix keys intact.
Decode Throughput & Accuracy Benchmarks (LongBench, AIME 2024 & Claw-Eval)
Evaluated on Qwen3-30B-A3B-Instruct-2507-FP8 with long-context workloads, composing dynamic sparsity (OmniKV) with prefill eviction (SnapKV) and FP8 KV storage raises decode speed from 272.0 tokens/s to 979.4 tokens/s (3.6x) while holding LongBench accuracy flat at 53.2.
Method (Qwen3-30B-A3B-FP8) | KV Format | LongBench Score | Decode Throughput | Speedup |
|---|---|---|---|---|
| Dense Baseline | BF16 | 53.2 | 272.0 tok/s | 1.0x |
| SnapKV | BF16 | 53.1 | 640.3 tok/s | 2.4x |
| Quest | BF16 | 53.3 | 639.6 tok/s | 2.4x |
| OmniKV | BF16 | 53.2 | 691.8 tok/s | 2.5x |
| Quest + SnapKV | BF16 / FP8 | 53.4 / 53.1 | 723.5 / 796.6 tok/s | 2.7x / 2.9x |
| OmniKV + SnapKV | BF16 / FP8 | 53.4 / 53.2 | 897.2 / 979.4 tok/s | 3.3x / 3.6x |
On Qwen3-4B-Thinking AIME 2024 reasoning traces, SnapKV (H) actually improves accuracy from 81.7% to 85.0% at 1.05x speedup, while OmniKV achieves 80.0% at 1.51x. Across 128K-token batched inputs, SparseEngine reaches 9.8–12.1x vanilla vLLM aggregate decode throughput and 2.24x end-to-end speedup on multi-turn agent replay.
Combine OmniKV + SnapKV + FP8 for Multi-Turn Agents
Composing prefill eviction (SnapKV) with dynamic decode sparsity (OmniKV) and FP8 KV storage yields the highest 3.6x single-batch speedup with zero LongBench degradation (53.2 vs 53.2).
Deploying SparseEngine & Benchmarking Long-Context Agent Replay
Clone the official CURRENTF/SparseEngine repository and configure composable sparse KV policies across your serving cluster.
# Clone and install SparseEngine from official source
git clone https://github.com/CURRENTF/SparseEngine.git
cd SparseEngine
pip install -e .
# Launch SparseEngine with composed OmniKV + SnapKV + FP8 KV cache
python -m sparseengine.entrypoints.openai.api_server \
--model Qwen/Qwen3-30B-A3B-Instruct-2507-FP8 \
--kv-method omnikv_snapkv \
--kv-cache-dtype fp8 \
--enable-chain-cache \
--enable-prefix-pruning \
--max-model-len 131072 \
--port 8000Integrating Prefix Cache Pruning With Smoke Monkey Harness
Multi-turn Smoke Monkey Harness loops accumulate tens of thousands of transient read_file, test-log, and grep tokens between edits. Wiring SparseEngine's Prefix Cache Pruning hook lets the harness mark finished tool-output spans as prunable once summarized into working memory—preserving logical prefix hits for the system prompt and codebase map while freeing GPU KV capacity for higher subagent concurrency.
Frequently Asked Questions
Q:How much faster is SparseEngine than vanilla vLLM on 128K contexts?
At each configuration's largest tested batch size on 128K-token inputs, SparseEngine achieves 9.8–12.1x vanilla vLLM aggregate decode throughput with KV eviction, over 2.5x with dynamic sparsity at matched concurrency, and up to 2.24x end-to-end speedup on multi-turn agent replay.
Q:What is Chain Cache in SparseEngine?
Chain Cache persists compacted KV states alongside method-specific metadata (such as Quest page bounds or SnapKV indices) between agent turns, letting multi-turn requests resume immediately without reconstructing full attention prefixes.
Q:Can SparseEngine compose multiple sparse KV algorithms together?
Yes. Its shared lifecycle contract supports 15 sparse methods and allows composing orthogonal techniques—such as combining SnapKV prefill eviction, OmniKV dynamic decode sparsity, and FP8 KV quantization for 3.6x decode speedup on Qwen3-30B-A3B.
Q:Does SparseEngine support Multi-Head Latent Attention (MLA) models?
Yes. Unlike HiSparse and Tangram, SparseEngine's method-owned cache contract supports compressed MLA architectures alongside standard GQA models.
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.