In the rapidly evolving world of Large Language Models (LLMs), "long context" is the new frontier. Whether it's an agent navigating a complex trajectory of tool calls or a researcher analyzing a 100,000-token document, LLMs are increasingly asked to "remember" vast amounts of information. However, as context grows, inference hits a massive wall: the memory-bound nature of the attention mechanism.
A new paper from researchers at the University of Southern California introduces ASPIRE, a framework that reimagines how we batch speculative decoding to make long-context inference significantly faster.
TL;DR
ASPIRE introduces a non-synchronized framework for batched self-speculative decoding, allowing individual requests in a batch to draft and verify tokens at their own optimal pace. By combining a unified mixed forward pass with a lightweight context-refresh mechanism, ASPIRE achieves up to a 4.58× throughput increase over standard autoregressive decoding in long-context scenarios.
What Problem Does This Paper Address?
The primary bottleneck in long-context LLM inference is the Key-Value (KV) cache. For every new token generated, the model must read the entire history of keys and values from memory. As sequences get longer, these memory reads dominate the runtime, making the process "memory-bound."
Self-speculative decoding is a popular fix: the model "drafts" several tokens quickly using a cheap approximation (like sparse attention) and then "verifies" them all at once using full attention. Because the expensive full-context KV cache is only read once during verification, you save a lot of time.
However, current systems have a "synchronization" problem. In a batch of multiple requests, everyone is forced to draft and verify in lock-step. This is inefficient because some requests are "easier" to predict than others. Forcing a request that could successfully draft 20 tokens to stop and verify after 5 (because its neighbor in the batch is struggling) leaves a massive amount of performance on the table.
Methods
ASPIRE tackles this with three core innovations:
- Unified Mixed Forward: This is the "secret sauce" that enables asynchrony. It allows requests in different states—some drafting with sparse attention, others verifying with full attention—to coexist in the same batched GPU forward pass. This eliminates the need for global "draft phases" and "verify phases."
- Online Speculation Scheduler: Each request has its own "brain." The scheduler tracks the acceptance rate of drafted tokens for each specific request and uses a batch-aware cost model to decide the optimal moment to switch from drafting to verifying.
- Intra-Draft Refresh Layer: Sparse attention can become "stale" as the model drafts more tokens. ASPIRE designates a single layer (the "refresh layer") to perform full attention even during the drafting phase. This updates the list of "important" tokens in the context at every step with minimal overhead, keeping the drafter accurate for longer sequences.
Datasets
The researchers evaluated ASPIRE across a diverse set of models (Qwen3-1.7B, Qwen3-8B, and DeepSeek-R1-Distill-LLaMA-8B) and benchmarks:
- Short-Context Reasoning: AIME 2025 (Mathematics) and CodeElo (Competitive Programming).
- Long-Context Benchmarks: LongBench (16k–18k tokens) and LongBench-v2 (ranging from 30k up to 100k tokens).
Key Insights and Ideas
- The Heterogeneity of Thought: The authors found that the optimal draft length varies wildly—from 2.5 to 20 tokens—not just between different requests, but even within a single request as it generates text. This proves that synchronized batching is fundamentally suboptimal.
- Cross-Layer Stability: A key "aha!" moment was discovering that attention patterns are more stable across layers than they are across time. This justifies the "Refresh Layer": using one layer's full attention to predict what the other layers should look at is much more effective than relying on old attention maps from previous tokens.
- The "N-2" Sweet Spot: Through empirical testing, the authors found that the second-to-last transformer layer ($N-2$) is the most effective "refresh" source, as the very last layer is often too specialized for next-token prediction to be a good general proxy for context importance.
Key Results
- Massive Speedups: ASPIRE consistently outperformed autoregressive baselines, achieving speedups of 1.70× to 4.58×.
- Superiority over Baselines: It consistently beat prior state-of-the-art self-speculative methods like SpecAttn and MagicDec, particularly as context lengths increased.
- Scaling with Context: The crazier the context, the better ASPIRE performs. On the 80k-100k token benchmark, ASPIRE showed its strongest gains, proving it is purpose-built for the "infinite context" era.
Limitations and Future Work
While ASPIRE is a major step forward, the authors note a few areas for growth:
- Cost Model Fitting: The batch-aware cost model currently relies on coefficients ($\beta$) fitted to runtime traces offline. Making this model fully dynamic and hardware-agnostic could improve portability.
- Memory Overhead: While ASPIRE is more memory-efficient than some competitors (like SpecAttn, which stores scores for all layers), managing the mixed-batch KV cache still requires sophisticated paged attention implementations.
- Future Directions: The authors suggest exploring more complex "refresh" strategies or applying these asynchronous principles to multi-model speculative decoding (where a smaller "assistant" model does the drafting).
ASPIRE proves that in the world of LLM serving, the fastest way forward is to let every request run its own race.
Summary updated