arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.20503cs.CL
收藏

ReaDy:将循环状态作为混合线性注意力大语言模型中推测解码的动态上下文

ReaDy: Recurrent States as Dynamic Context for Speculative Drafting in Hybrid Linear Attention Large Language Models

StartLux;University of Chinese Academy of Sciences(中国科学院大学);The University of Hong Kong(香港大学)

Bohan Sun, Zunhai Su, Xialie Zhuang, Jianjin Li, Ngai Wong, Chuan-Wei Kuo

AI总结:

ReaDy是首个利用混合线性注意力(HLA)循环状态进行位置特定上下文检索的推测解码方法,基于DSpark适配后,在7个基准测试中以Qwen3.8-27B实现平均3.16倍解码加速,性能优于DSpark。

摘要:

推测解码通过每一步生成多个token来加速自回归生成,但基于特征的草稿生成器依赖目标隐藏特征,其上下文重点可能与后续草稿位置的需求不一致。混合线性注意力(HLA)模型维护紧凑的循环状态,这些状态会累积历史关联,为推测解码提供高效的补充上下文来源。我们提出ReaDy,据我们所知,这是首个利用HLA循环状态在草稿生成期间进行位置特定上下文检索的推测解码方法。ReaDy为每个草稿位置配备了一个学习到的查询,可直接从目标的已提交循环状态中检索补充上下文。轻量级状态读取器通过残差更新将此上下文整合到草稿表示中,同时低秩状态读取和融合算子可将额外的计算和I/O开销保持在较低水平。ReaDy基于DSpark的并行主干和顺序预测头,采用轻量级两阶段适配策略,通过消融研究对读取器容量、状态源和残差位置进行了检验。在涵盖数学、代码生成和对话的7个基准测试中,ReaDy在单个NVIDIA B200 GPU上使用Qwen3.8-27B实现了比自回归解码平均3.16倍的解码加速,在所有基准测试中均优于DSpark,平均吞吐量提升7.97%,接受长度提升8.50%。我们的代码可在该https URL获取。

英文摘要:

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.16\times$ 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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑