关注关键内容,验证实际收益:面向视觉语言模型的负载自适应投机解码
Seeing What Matters, Verifying What Pays: Load-Adaptive Speculative Decoding for Vision-Language Models
AI总结:
本文提出 Uni-LaSpec 框架,通过复用验证器注意力提升草稿质量,按 GPU 负载动态分配验证资源,在多模型多基准测试中大幅提升 VLM 推理吞吐量并降低延迟。
摘要:
投机解码可在不改变输出分布的前提下加速视觉语言模型(VLM)的推理过程,但存在两个因素限制其性能提升。现有草稿模型要么缺乏视觉 grounding token 所需的图像证据,要么会对每个视觉 token 进行条件计算,而实际上短草稿块通常仅依赖少数图像区域。此外,验证额外候选的价值会随 GPU 负载变化,因此固定的验证结构无法在不同服务条件下保持高效。本文提出 Uni-LaSpec,一种块并行投机解码框架,以解决上述两个问题。为提升草稿质量,Uni-LaSpec 复用验证器自身的注意力机制:从先前验证中保留的查询对缓存的 int8 量化视觉键进行排序,跨层投票选择少数视觉 token,草稿模型通过门控交叉注意力融合这些 token;接受感知训练进一步按每个草稿位置对接受前缀的贡献进行加权。为分配验证资源,采用边际成本准则为每个请求和每一轮选择验证结构:在轻负载下,草稿树可利用空闲的验证器容量;在重负载下,动态头部会截断线性草稿。在来自三个模型家族的六个 VLM 以及 17 个文本和多模态基准测试中,选择八个视觉 token 可保留至少 98.6% 从完整图像获得的接受率,且选择成本低于毫秒级。在并发度为 1 的贪心解码下,Uni-LaSpec 相比自回归解码实现了最高 5.11 倍的文本吞吐量和 3.24 倍的多模态吞吐量。在六个负载水平和三种 GPU 类型下,其在所有设置中均优于自回归解码,且在 144 个设置中的 123 个里匹配或超越最佳固定验证策略;在突发到达场景下,相比线性验证,其将平均端到端延迟降低了 47.6%。
英文摘要:
Speculative decoding accelerates vision-language model (VLM) inference without altering the output distribution, yet two factors limit its gains. Existing drafters either lack the image evidence required for visually grounded tokens or pay to condition on every visual token, although a short draft block typically depends on only a few image regions. Moreover, the value of verifying additional candidates varies with GPU load, so no fixed verification structure is efficient across serving conditions. We present Uni-LaSpec, a block-parallel speculative decoding framework that addresses both factors. To improve draft quality, Uni-LaSpec reuses the verifier's own attention: the query retained from the preceding verification ranks the cached, int8-quantized visual keys, and a cross-layer vote selects a few visual tokens that the drafter fuses through gated cross-attention. Acceptance-aware training further weights each draft position by its contribution to the accepted prefix. To allocate verification, a marginal-cost criterion selects the structure per request and per round: draft trees exploit idle verifier capacity under light load, whereas a dynamic head truncates linear drafts under heavy load. Across six VLMs from three model families and 17 text and multimodal benchmarks, selecting eight visual tokens retains at least 98.6% of the acceptance obtained from the full image at sub-millisecond selection cost. With greedy decoding at concurrency one, Uni-LaSpec achieves up to 5.11x text and 3.24x multimodal throughput over autoregressive decoding. Across six load levels and three GPU types, it outperforms autoregressive decoding in every setting and matches or exceeds the best fixed verification strategy in 123 of 144 settings; under bursty arrivals, it reduces mean end-to-end latency by 47.6% relative to linear verification.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。