ReaDy:混合线性注意力大语言模型中作为动态上下文的循环状态用于推测性起草
研究论文 · 2026/10/19
ReaDy 是一种用于混合线性注意力(HLA)大语言模型的推测解码方法,它利用 HLA 模型维护的紧凑循环状态作为动态上下文,为每个草稿位置提供位置特定的上下文检索。通过轻量级状态读取器将检索到的上下文以残差方式融入草稿表示,并采用低秩状态读取与融合算子降低开销。在七个基准测试中,ReaDy 平均实现 3.16 倍解码加速,吞吐量比 DSpark 提升 7.97%,接受长度提升 8.50%。
ReaDy 为混合线性注意力模型的推测解码提供了新思路,显著提升解码速度且不牺牲输出质量,对高效大模型推理有重要参考价值。
Speculative decoding accelerates autoregressive generation by drafting multiple tokens per step, yet feature-based drafters rely on target hidden features whose contextual emphasis may not align with the needs of subsequent draft positions. Hybrid linear attention (HLA) models maintain compact recurrent states that accumulate historical associations, offering an efficient source of complementary context for speculative drafting. We introduce ReaDy, the first speculative decoding method, to the best of our knowledge, to leverage HLA recurrent states for position-specific context retrieval during drafting. ReaDy equips each draft position with a learned query to retrieve supplementary context directly from the target's committed recurrent states. A lightweight state reader integrates this context into draft representations through residual updates, while low-rank state reads and fused operators keep additional computation and I/O overhead low. Building on DSpark's parallel backbone and sequential prediction head, ReaDy employs a lightweight two-stage adaptation strategy, with reader capacity, state sources, and residual placement examined through ablation studies. Across seven benchmarks spanning mathematics, code generation, and dialogue, ReaDy achieves an average 3.16times decoding speedup over autoregressive decoding with Qwen3.8-27B on a single NVIDIA B200 GPU. It outperforms DSpark on every benchmark, improving throughput by 7.97% and acceptance length by 8.50% on average. Our code is available at https://github.com/StartLuxLabs/ReaDy.