用低秩压缩提升语言模型头速度,实现更快的推测解码。
SlimSpec: Low-Rank Draft LM-Head for Accelerated Speculative Decoding

- 对轻量级草稿模型的词表头进行低秩参数化压缩,减少计算开销。
- 在三种目标模型上实现4到5倍加速,端到端速度提升8%~9%。
- 无需修改训练流程,适合各类草稿模型架构快速部署。
推测解码通过两步流程加速大语言模型的自回归生成:轻量级草稿模型提出候选词,目标模型单次前向传播验证。尽管草稿模型本身较小,其语言模型头仍需将隐藏表示投影至大规模词表,成为主要计算瓶颈。现有方法多采用静态或动态词表截断,但引入额外复杂性,如特殊词表设计、复杂的推理逻辑或训练流程修改。本文提出SlimSpec,对草稿模型的语言模型头采用低秩参数化,在不缩减输出词表的前提下压缩内部表示。我们在EAGLE-3草稿模型上评估该方法,覆盖三个目标模型及多种基准测试,在延迟和吞吐受限的推理场景中均表现优异。SlimSpec相较标准语言模型头实现4~5倍加速,端到端速度提升达8%~9%,优于现有方法。该方法仅需极小调整训练与推理流程,适用于多种草稿模型架构,是高效推测解码的理想选择。
原文摘要 · Abstract (English)
Speculative decoding speeds up autoregressive generation in Large Language Models (LLMs) through a two-step procedure, where a lightweight draft model proposes tokens which the target model then verifies in a single forward pass. Although the drafter network is small in modern architectures, its LM-head still performs projection to a large vocabulary, becoming one of the major computational bottlenecks. In prior work this issue has been predominantly addressed via static or dynamic vocabulary truncation. Yet mitigating the bottleneck, these methods bring in extra complexity, such as special vocabulary curation, sophisticated inference-time logic or modifications of the training setup. In this paper, we propose SlimSpec, a low-rank parameterization of the drafter's LM-head that compresses the inner representation rather than the output, preserving full vocabulary support. We evaluate our method with EAGLE-3 drafter across three target models and diverse benchmarks in both latency- and throughput-bound inference regimes. SlimSpec achieves $4\text{-}5\times$ acceleration over the standard LM-head architecture while maintaining a competitive acceptance length, surpassing existing methods by up to $8\text{-}9\%$ of the end-to-end speedup. Our method requires minimal adjustments of training and inference pipelines. Combined with the aforementioned speedup improvements, it makes SlimSpec a strong alternative across wide variety of draft LM-head architectures.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。