arXiv:2411.03312cs.CVcs.AI2024-11ICLR被引 27

大模型推理最优时需极少视觉令牌,更多参数。

Inference Optimal VLMs Need Fewer Visual Tokens and More Parameters

论文配图:Inference Optimal VLMs Need Fewer Visual Tokens and More Parameters
图 1 · 摘自论文原文
  • 用提示词压缩实现高比例视觉令牌减少
  • 单令牌输入下仍保持强视觉推理能力
  • 适合追求低延迟部署的高效模型设计

视觉语言模型(VLMs)在多类视觉理解与推理任务中表现优异,得益于将图像表示嵌入大型语言模型(LLM)的输入令牌。然而,实际部署常受高推理延迟制约,因LLM处理大量图像生成的输入令牌所需计算量巨大。为降低推理成本,可缩小LLM规模或减少图像输入令牌数,后者成为近期研究重点。本文通过建立缩放定律,首次刻画了视觉令牌数与LLM参数量之间的最优权衡关系。结果显示:在固定推理预算下,视觉推理任务的最优策略是采用尽可能大的LLM,同时将视觉令牌数降至最低——通常仅需一个令牌。尽管现有令牌压缩研究多聚焦于5-10倍的适度压缩,本研究揭示,计算最优的推理范式要求更高压缩比。基于此,我们提出首个面向高压缩场景的提示式令牌压缩算法。工作表明,在低视觉令牌环境下具备显著性能与效率优势,亟需针对性压缩算法支持。代码已公开于 https://github.com/locuslab/llava-token-compression。

原文摘要 · Abstract (English)

Vision Language Models (VLMs) have demonstrated strong capabilities across various visual understanding and reasoning tasks, driven by incorporating image representations into the token inputs of Large Language Models (LLMs). However, their real-world deployment is often constrained by high latency during inference due to the substantial compute required by the LLM to process the large number of input tokens, predominantly arising from the image. To reduce inference costs, one can either downsize the LLM or reduce the number of input tokens needed to represent the image, the latter of which has been the focus of many recent efforts around token compression. However, it is unclear what the optimal trade-off is given a fixed inference budget. We first characterize this optimal trade-off between the number of visual tokens and LLM parameters by establishing scaling laws that capture variations in performance with these two factors. Our results reveal a surprising trend: for visual reasoning tasks, the inference-optimal behavior in VLMs is achieved by using the largest LLM that fits within the inference budget while minimizing visual token count - often to a single token. While the token reduction literature has mainly focused on maintaining base model performance by modestly reducing the token count (e.g., $5-10\times$), our results indicate that the compute-optimal inference regime requires operating under even higher token compression ratios. Based on these insights, we take the first steps toward designing token compression algorithms tailored for high-compression settings, utilizing prompt-based compression of tokens. Our work underscores the performance and efficiency benefits of operating in low visual token regimes and the importance of developing tailored token reduction algorithms for such conditions. Code is available at https://github.com/locuslab/llava-token-compression.

视觉语言模型令牌压缩推理优化高效部署

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。