arXiv:2411.08840cs.CV2024-11

用混合模型高效处理超长多模态输入,提升高分辨率图像和视频的推理速度。

Multimodal Instruction Tuning with Hybrid State Space Models

  • 采用Transformer与MAMBA混合架构,突破自注意力机制的计算瓶颈。
  • 可处理超过10万token的长上下文,推理效率比现有模型快约4倍。
  • 训练时用低分辨率数据,推理时能应对高分辨率图像和高帧率视频。

在处理高分辨率图像或高帧率视频等场景中,长上下文处理对多模态大语言模型(MLLM)的识别与理解能力至关重要。图像分辨率和帧率的提升导致输入令牌数量大幅增加,显著加重计算负担,且自注意力机制的二次复杂度进一步加剧这一问题。以往方法要么在长上下文上预训练模型而忽视效率,要么通过下采样(如选取关键图像块或帧)压缩上下文长度,易造成信息丢失。为在保持MLLM强大性能的同时克服此难题,我们提出一种新型混合Transformer-MAMBA模型,可高效处理多模态应用中的长上下文。我们的模型能有效处理超过10万令牌的输入,在多个基准测试中表现优于现有模型。尤为突出的是,相较于当前模型,该模型在高分辨率图像和高帧率视频上的推理效率提升约4倍,且随着图像分辨率或视频帧率升高,效率优势进一步扩大。此外,本模型是首个在低分辨率图像或低帧率视频上训练,却能直接推理高分辨率图像和高帧率视频的模型,具备跨场景灵活部署的能力。

原文摘要 · Abstract (English)

Handling lengthy context is crucial for enhancing the recognition and understanding capabilities of multimodal large language models (MLLMs) in applications such as processing high-resolution images or high frame rate videos. The rise in image resolution and frame rate substantially increases computational demands due to the increased number of input tokens. This challenge is further exacerbated by the quadratic complexity with respect to sequence length of the self-attention mechanism. Most prior works either pre-train models with long contexts, overlooking the efficiency problem, or attempt to reduce the context length via downsampling (e.g., identify the key image patches or frames) to decrease the context length, which may result in information loss. To circumvent this issue while keeping the remarkable effectiveness of MLLMs, we propose a novel approach using a hybrid transformer-MAMBA model to efficiently handle long contexts in multimodal applications. Our multimodal model can effectively process long context input exceeding 100k tokens, outperforming existing models across various benchmarks. Remarkably, our model enhances inference efficiency for high-resolution images and high-frame-rate videos by about 4 times compared to current models, with efficiency gains increasing as image resolution or video frames rise. Furthermore, our model is the first to be trained on low-resolution images or low-frame-rate videos while being capable of inference on high-resolution images and high-frame-rate videos, offering flexibility for inference in diverse scenarios.

多模态长上下文MAMBA推理效率

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