Accelerating Long-Context Decoding in Large-Scale Hybrid LLMs Without Retraining

João Eduardo Batista, Emil Vatai, Mohamed WahibarXiv 2026

TL;DR

This paper presents a training-free method to significantly accelerate long-context decoding in hybrid Large Language Models (LLMs) like Qwen3.5 and Gemma 4. By using a multi-objective genetic algorithm to find optimal, per-layer sparse attention patterns—combining sliding windows, pinned prefixes, and dynamic token selection—the authors achieve up to a 2.23x speedup at 256k context lengths while maintaining baseline accuracy on 100B+ parameter models.

What Problem Does This Paper Address?

As we push LLMs toward massive context windows (100k+ tokens), the "attention bottleneck" becomes critical. Standard self-attention has a computational cost that grows quadratically with sequence length ($O(L^2)$). To mitigate this, researchers have developed hybrid models that interleave a few full-attention layers with cheaper linear or sliding-window layers.

However, even in these hybrids, the remaining full-attention layers eventually dominate the decoding time as the context grows. Existing solutions to "linearize" these layers typically require expensive retraining or fine-tuning, which is impractical for frontier-scale models (100B+ parameters). Training-free methods exist but often struggle to maintain accuracy across diverse tasks or fail to account for the fact that different layers in a model "attend" to information differently.

Methods

The authors propose a Combined Sparse Attention mechanism that replaces full attention in selected layers without changing a single model weight. Each modified layer attends to three distinct sets of keys:

  1. Sliding Window ($W$): The most recent $W$ tokens to maintain local coherence.
  2. Pinned Prefix: The first 256 tokens of the sequence, which act as "attention sinks."
  3. Dynamic Sinks (Quest): A budget of $Q$ tokens selected dynamically from the KV cache based on their relevance to the current query. To save on computation, these are re-selected every $R$ steps (default $R=32$).
Visual representation of the combined sparse attention mask, showing the static prefix, sliding window, and dynamic Quest-selected tokens.

The core innovation is treating $W$ and $Q$ as per-layer hyperparameters. Instead of a "one-size-fits-all" approach, the authors use a multi-objective search algorithm (NSGA-II) to find the Pareto front of configurations that maximize accuracy while minimizing estimated decoding cost.

Figure 2. Overview of the pipeline used to obtain configurations using NSGA-II. (1) We fill an table with measured times with different window/budget values to be used by the surrogate cost function; (2) we generate the initial solutions; (3) the solutions are evaluated in the evaluation samples and using the cost function; (4) the best solutions are combined and mutated, and (5) when the search is over, we extract 3 configurations from the Pareto front.

Datasets

The search and evaluation were conducted across a broad suite of long-context benchmarks:

  • Search: A subset of BABILong-qa1 (64k context) and LongBench Qasper.
  • Evaluation: 21 datasets in total, including the full BABILong suite (qa1–qa5) and 16 English subsets of LongBench covering single/multi-document QA, summarization, few-shot learning, and code completion.

Key Insights and Ideas

  • Layer Heterogeneity is Real: The search results confirmed that layers are not created equal. Some layers require large sliding windows to function, while others can be heavily pruned or rely almost entirely on dynamic retrieval.
  • The "Weight Loading" Wall: The paper highlights that for dense models, the time spent loading weights from memory is a major bottleneck. This makes attention optimization most effective for Mixture-of-Experts (MoE) models or smaller dense models where the compute-to-memory ratio is more favorable.
  • Dynamic vs. Static: Static KV eviction (throwing away tokens permanently) is risky. By using the dynamic Quest mechanism, the model can "re-discover" important information that was previously outside its immediate window.
  • Scaling Training-Free Methods: This is the first work to demonstrate that training-free sparse attention can successfully scale to models as large as the 397B parameter Ornith-1.0.

Key Results

The method delivers substantial throughput gains at long contexts without sacrificing the model's reasoning capabilities.

  • Speedups at 256k Context:
    • Qwen3.5-4B: 2.22x faster.
  • Qwen3.5-122B-A10B: 2.23x faster.
  • Ornith-1.0-397B: 2.06x faster.
  • Accuracy Preservation: Across all six tested models, at least one discovered configuration preserved baseline accuracy within 0.5 percentage points on average across 21 datasets.
  • Efficiency: The search process is relatively cheap, costing between 8.6 and 58.4 GPU-hours depending on the model size—a fraction of the cost required for any retraining-based approach.
Throughput comparison showing that while the baseline is faster for short sequences, the sparse configurations provide significant gains as context length increases.

Limitations and Future Work

  • Short-Context Overhead: The method introduces a computational overhead for scoring and selecting pages. Consequently, it is actually slower than the baseline for short sequences (typically under 16k–32k tokens). It is a specialized optimization for long-context workloads.
  • Memory Footprint: While the method reduces computation, it does not reduce the KV cache memory footprint. Because any page might be dynamically selected in the future, the full KV cache must be maintained in memory.
  • Future Directions: The authors suggest exploring ways to reduce the memory footprint and investigating more efficient search heuristics to explore the massive configuration space of larger models more thoroughly.

Summary updated

BibTeX
@misc{batista2026accelerating,
  author = {João Eduardo Batista and Emil Vatai and Mohamed Wahib},
  title = {{Accelerating Long-Context Decoding in Large-Scale Hybrid LLMs Without Retraining}},
  year = {2026},
  eprint = {2611.06133},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.06133},
}
Figure