arXiv:2611.06133cs.CLNov 2026

Manuscript Offprint

arXiv:2611.06133

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

João Eduardo Batista, Emil Vatai, Mohamed Wahib

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

The full-attention layers of large language models (LLMs) make every generated token more expensive than the previous one, slowing models down on long-context tasks. Hybrid models reduce this cost by replacing most full-attention layers with linear-attention layers, but the first still dominate decoding at long contexts. We accelerate these remaining layers without any training or weight changes using combined sparse attention: each layer attends to a sliding window of recent tokens, a pinned prefix, and a fixed budget of most relevant tokens in the context. The window size and budget are found on a per-layer basis using a multi-objective search algorithm. Across six hybrid models from three families, from 4B to 397B parameters, the selected configurations preserve their baseline model's accuracy on 21 long-context datasets. Decoding 64k/256k tokens becomes up to 1.26x/2.22x faster on Qwen3.5-4B, 1.20x/2.23x on Qwen3.5-122B-A10B, and 1.16x/2.06x on Ornith-1.0-397B.

1 INTRODUCTION

Current implementations of self-attention (flash-attention (Dao et al., 2022)) cost O(L2)O(L^2) time and O(L)O(L) memory in the sequence length LL. For autoregressive inference, the memory capacity is usually the binding constraint: the KV cache grows linearly with every generated token and with every concurrent request. At long context, the full-attention layers consume the majority of the decode-step budget and determine how many concurrent requests a deployment can serve (Figure 1).

Two lines of work have emerged to defuse this bottleneck. The first is architectural: replace softmax attention with a recurrent, convolutional, or windowed mixer whose per-step cost is constant in LL. Mamba (Gu & Dao, 2024), RWKV (Peng et al., 2023), Hyena (Poli et al., 2023), Gated DeltaNet (Yang et al., 2025b), and the sliding-window layers of Gemma 4 (Gemma Team et al., 2026) belong here, together with the hybrid models (Qwen3.5 (Qwen Team, 2026), Gemma 4, gpt-oss (OpenAI et al., 2025), MiniMax-Text-01 (MiniMax et al., 2025), Kimi-K3 (Kimi Team, 2026)) that interleave a minority of full-attention layers with cheaper attention layers. The accuracy of hybrids is competitive, but decisions such as how many full-attention layers to use, where to place them, and their window size are frozen into the released weights at pretraining time.

Figure

Figure 1. Time spent decoding one token by Qwen3.5-4B in each kernel (averaging 256 tokens), at different context lengths.

The second line is post-training linearization: take a pretrained Transformer, swap its attention for a linear variant, and recover the accuracy with continued training. Most works focus on smaller models, up to 8B parameters; LoL-Cats (Zhang et al., 2025) is one exception, applied to Llama 3.1 405B. Besides focusing on smaller models, these works often require large amounts of training data, with SUPRA (Mercat et al., 2024) reporting 5% of pretraining, and LawCat (Liu et al., 2025) reporting 0.1% of pretraining. LoL Cats use a model with size comparable to our work, and report spending 454 H100 GPU-hours in attention transfer and LoRA fine-tuning. Although Jet-Nemotron-2B obtained a 12.0x speedup over its base model at a 64k-token context, it was trained on 600B tokens, using 18,328 H100 GPU-hours (Gu et al., 2025). It is not practical to expend this compute and data cost for every new released model, motivating the search for cheaper alternatives.

¹RIKEN Center for Computational Science, Kobe, Hyogo, Japan. Correspondence to: João E. Batista joao.batista@riken.jp.

Preprint. November 5, 2026.

This work builds upon hybrid models whose remaining full-attention layers still carry the long-context cost, and reduces their computational cost without further training by limiting their attention. Qwen3.5-27B keeps 16 full-attention layers out of 64; gpt-oss-120b, 18 out of 36; Ornith-397B, 15 out of 60. These layers read LL keys per step, and they are the ones that would benefit from optimizations. The question that motivates this work is therefore:

Given a pre-trained hybrid model, how much can we restrict the attention of its full-attention layers at no accuracy degradation, without retraining and without editing weights?

Attention maps are known to be highly concentrated, making training-free KV eviction (H2O (Zhang et al., 2023), DuoAttention (Xiao et al., 2025)) work, but this is an empirical claim, and recent large-scale evaluation (Nawrot et al., 2026) shows it is strongly task- and scale-dependent. We hypothesize that, since attention is sparse at long context, each query only needs the keys of a small, query-dependent subset of positions. By reducing attention in models, we obtain speedups by skipping the bottleneck of decoding in long-context tasks, full attention (Figure 1). This motivates searching for configurations that minimize the cost of attention through linearization techniques, while aiming to preserve the accuracy of the baseline models.

Our challenge is therefore twofold: first, identifying which positions carry information depending on the query and the layer, not only on the position; second, minimizing the attention budget on a layer-by-layer basis. We combine a plain sliding window (Beltagy et al., 2020; Zaheer et al., 2020; Jiang et al., 2023) with a dynamic query-aware top-kk selection on paged KV (Quest (Tang et al., 2024)) on a layer-by-layer basis, and let a multi-objective search decide the window and budget of every layer.

References (30)