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

SP²ec:面向视觉语言模型的自适应自投机解码算法

SP$^2$ec: Adaptive Self-Speculative Decoding for Vision-Language Models

National University of Singapore(新加坡国立大学);Yale University(耶鲁大学)

Yuqi Huang, Xingyao Li, Yunlong Hou, Fengzhuo Zhang, Jiachun Pan, Vincent Y. F. Tan

AI总结:

针对视觉语言模型自投机解码的草稿配置选择问题,提出无需训练的SP²ec算法,通过最小化墙时间遗憾实现自适应调整,在两类模型的多任务上较原方法最高提升11%。

摘要:

投机解码(SD)已被证明可有效加速大语言模型推理,但对于视觉语言模型(VLMs)而言,多样的输入模态使得小型训练的草稿模型难以始终实现高吞吐量。自投机解码将目标模型的部分组件复用为草稿模型,保留了VLMs的多模态能力,但其效率取决于为每个提示选择合适的草稿配置。我们提出单峰投机解码算法(SP²ec),这是一种无需训练的多臂老虎机算法,可在生成过程中自适应调整草稿配置。SP²ec利用现有自投机方法(包括SWIFT、KnapSpec、SpecVLM及我们提出的简单cosSim)中观察到的单峰吞吐量模式,其算法设计明确最小化每个查询的新颖墙时间遗憾概念,对应经验墙时间延迟。墙时间遗憾的理论保证表明,SP²ec可利用最优草稿配置,且探索成本可忽略不计。在Qwen2.5-VL-7B-Instruct和LLaVA-NeXT-Mistral-7B上针对视觉和文本任务开展的大量实验显示,与原始自投机方法相比,SP²ec实现了最高达11%的一致性能提升,证明了所提SP²ec算法的广泛适用性。

英文摘要:

Speculative Decoding (SD) has demonstrated its efficacy in accelerating large language model inference, but for Vision-Language Models (VLMs), the diverse input modalities make it difficult for a small trained drafter to achieve consistently high throughput. Self-speculative decoding reuses parts of the target model as a drafter which retains the multi-modal capability of the VLMs, yet its efficiency depends on choosing a suitable draft configuration for each prompt. We propose Single-Peak SPeculative decoding (SP$^2$ec), a training-free bandit algorithm that adapts the draft configuration during generation. SP$^2$ec exploits the single-peak throughput pattern observed in existing self-speculative methods, including SWIFT, KnapSpec, SpecVLM, and our simple cosSim. Our algorithmic design explicitly minimizes a novel notion of wall-time regret for each given query, corresponding to the empirical wall-time latency. Theoretical guarantees on the wall-time regret show that SP$^2$ec can exploit the optimal draft configuration, with negligible exploration cost. Extensive experiments on Qwen2.5-VL-7B-Instruct and LLaVA-NeXT-Mistral-7B across visual and textual tasks show consistent improvements of up to 11% over the original self-speculative methods, demonstrating the wide applicability of the proposed SP$^2$ec algorithm.

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

↑