arXiv:2412.13303cs.CVcs.AI2024-12CVPR被引 93

提升视觉语言模型的图像编码效率,实现高速低延迟的高分辨率图像理解。

FastVLM: Efficient Vision Encoding for Vision Language Models

  • 提出新型混合视觉编码器FastViTHD,减少高分辨率图像的视觉标记数量。
  • 在1152×1152分辨率下,首次生成时间快85倍,且模型体积缩小3.4倍。
  • 无需额外剪枝,仅通过提升输入分辨率即可实现性能与速度的最优平衡。

提高输入图像分辨率对增强视觉语言模型(VLM)性能至关重要,尤其在文本密集型图像理解任务中。然而,主流视觉编码器如ViT在高分辨率下因堆叠自注意力层导致令牌数量激增和编码延迟过高而效率下降。针对不同运行分辨率,可从降低编码延迟和减少传递给大语言模型的视觉令牌数两个维度优化。基于对图像分辨率、视觉延迟、令牌数量与大语言模型规模之间相互作用的全面分析,本文提出FastVLM,实现延迟、模型尺寸与准确率之间的优化权衡。FastVLM引入FastViTHD——一种新型混合视觉编码器,显著减少高分辨率图像的输出令牌数并大幅降低编码时间。与以往方法不同,FastVLM仅通过调整输入图像分辨率即可实现视觉令牌数与图像分辨率的最佳平衡,无需额外的令牌剪枝,简化了模型设计。在LLaVA-1.5设置下,相比先前工作,FastVLM在时间到首个令牌(TTFT)上提升3.2倍,同时保持相似的基准性能。相较于相同0.5B LLM的LLaVa-OneVision,在最高分辨率1152×1152下,FastVLM在SeedBench、MMMU和DocVQA等关键基准上表现更优,但TTFT快85倍,视觉编码器体积缩小3.4倍。代码与模型已在https://github.com/apple/ml-fastvlm发布。

原文摘要 · Abstract (English)

Scaling the input image resolution is essential for enhancing the performance of Vision Language Models (VLMs), particularly in text-rich image understanding tasks. However, popular visual encoders such as ViTs become inefficient at high resolutions due to the large number of tokens and high encoding latency caused by stacked self-attention layers. At different operational resolutions, the vision encoder of a VLM can be optimized along two axes: reducing encoding latency and minimizing the number of visual tokens passed to the LLM, thereby lowering overall latency. Based on a comprehensive efficiency analysis of the interplay between image resolution, vision latency, token count, and LLM size, we introduce FastVLM, a model that achieves an optimized trade-off between latency, model size and accuracy. FastVLM incorporates FastViTHD, a novel hybrid vision encoder designed to output fewer tokens and significantly reduce encoding time for high-resolution images. Unlike previous methods, FastVLM achieves the optimal balance between visual token count and image resolution solely by scaling the input image, eliminating the need for additional token pruning and simplifying the model design. In the LLaVA-1.5 setup, FastVLM achieves 3.2$\times$ improvement in time-to-first-token (TTFT) while maintaining similar performance on VLM benchmarks compared to prior works. Compared to LLaVa-OneVision at the highest resolution (1152$\times$1152), FastVLM achieves better performance on key benchmarks like SeedBench, MMMU and DocVQA, using the same 0.5B LLM, but with 85$\times$ faster TTFT and a vision encoder that is 3.4$\times$ smaller. Code and models are available at https://github.com/apple/ml-fastvlm.

视觉编码高效模型多模态低延迟

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