arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2410.04417cs.CV
收藏

SparseVLM:面向高效视觉-语言模型推理的视觉令牌稀疏化

SparseVLM: Visual Token Sparsification for Efficient Vision-Language Model Inference

Fudan University(复旦大学);UC Berkeley(加州大学伯克利分校);Panasonic Holdings Corporation(松下控股公司)

Yuan Zhang, Chun-Kai Fan, Junpeng Ma, Wenzhao Zheng, Tao Huang, Kuan Cheng, Denis Gudovskiy, Tomoyuki Okuno, Yohei Nakata, Kurt Keutzer, Shanghang Zhang

AI总结:

SparseVLM提出一种文本引导的免训练视觉令牌剪枝机制,通过自注意力评分、基于排名的自适应稀疏化和令牌回收,在保持97%准确率的同时将LLaVA的FLOPs降低54%、CUDA延迟降低37%。

摘要:

在视觉-语言模型(VLMs)中,尽管与文本令牌相比,视觉令牌中的信息具有稀疏性,但它们通常仍带来显著的计算开销。为了解决这一问题,大多数现有方法利用特定训练数据学习一个网络来剪除冗余的视觉令牌。与之不同,我们提出了一种文本引导的免训练令牌优化机制,称为SparseVLM,它消除了对额外参数或微调成本的需求。鉴于视觉令牌在VLM的语言推理中对文本令牌起补充作用,我们选择相关的文本令牌,利用自注意力矩阵来评估视觉令牌的重要性,然后使用所提出的策略剪除视觉令牌,以在保留信息的同时最大化稀疏性。特别地,我们引入了一种基于排名的策略来自适应地确定每一层的稀疏化比例,同时引入了一种令牌回收方法,将被剪除的令牌压缩为更紧凑的表示。实验结果表明,SparseVLM在多个图像和视频理解任务中提高了各种VLM的效率。例如,配备SparseVLM的LLaVA实现了54%的FLOPs降低和37%的CUDA延迟降低,同时保持了97%的原始准确率。我们的代码可在https://github.com/Gumpest/SparseVLMs获取。

英文摘要:

In vision-language models (VLMs), visual tokens usually bear a significant amount of computational overhead despite sparsity of information in them when compared to text tokens. To address this, most existing methods learn a network to prune redundant visual tokens using certain training data. Differently, we propose a text-guided training-free token optimization mechanism dubbed SparseVLM that eliminates the need of extra parameters or fine-tuning costs. Given that visual tokens complement text tokens in VLM's linguistic reasoning, we select relevant text tokens to rate the significance of visual tokens using self-attention matrices and, then, prune visual tokens using the proposed strategy to maximize sparsity while retaining information. In particular, we introduce a rank-based strategy to adaptively determine the sparsification ratio for each layer, alongside a token recycling method that compresses pruned tokens into more compact representations. Experimental results show that SparseVLM increases the efficiency of various VLMs in a number of image and video understanding tasks. For example, LLaVA when equipped with SparseVLM achieves 54% reduction in FLOPs, 37% decrease in CUDA latency while maintaining 97% of its original accuracy. Our code is available at https://github.com/Gumpest/SparseVLMs.

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

↑