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

推理最优视觉语言模型需要更少的视觉令牌和更多的参数

Inference Optimal VLMs Need Fewer Visual Tokens and More Parameters

Carnegie Mellon University(卡内基梅隆大学);Bosch Center for Artificial Intelligence(博世人工智能中心)

Kevin Y. Li, Sachin Goyal, Joao D. Semedo, J. Zico Kolter

AI总结:

本研究通过缩放定律揭示了视觉语言模型在固定推理预算下的最优权衡:使用最大LLM并最小化视觉令牌数量(甚至单个令牌)可实现推理最优,并据此提出高压缩比下的令牌压缩算法。

摘要:

视觉语言模型(VLMs)通过将图像表示融入大语言模型(LLMs)的令牌输入中,在各种视觉理解和推理任务上展示了强大的能力。然而,由于LLM处理大量输入令牌(主要来自图像)需要大量计算,其实际部署常常受到推理期间高延迟的限制。为了降低推理成本,可以缩小LLM的规模或减少表示图像所需的输入令牌数量,后者是近期许多关于令牌压缩工作的重点。然而,在给定推理预算的情况下,最优权衡尚不明确。我们首先通过建立捕捉性能随这两个因素变化的缩放定律,来刻画视觉令牌数量与LLM参数之间的最优权衡。我们的结果揭示了一个令人惊讶的趋势:对于视觉推理任务,视觉语言模型中的推理最优行为是通过使用在推理预算内最大的LLM同时最小化视觉令牌数量(通常降至单个令牌)来实现的。虽然令牌压缩文献主要关注通过适度减少令牌数量(例如,5-10倍)来维持基础模型性能,但我们的结果表明,计算最优的推理机制需要在更高的令牌压缩比率下运行。基于这些见解,我们迈出了为高压缩设置量身定制令牌压缩算法的第一步,利用基于提示的令牌压缩。我们的工作强调了在低视觉令牌机制下运行的性能和效率优势,以及为此类条件开发定制令牌减少算法的重要性。代码可在https://github.com/locuslab/llava-token-compression获取。

英文摘要:

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.

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

↑