Abstract
State-of-the-art transformer-based large multimodal models (LMMs) struggle to handle hour-long video inputs due to the quadratic complexity of the causal self-attention operations, leading to high computational costs during training and inference. Existing token compression-based methods reduce the number of video tokens but often incur information loss and remain inefficient for extremely long sequences. In this paper, we explore an orthogonal direction to build a hybrid Mamba-Transformer model (VAMBA) that employs Mamba-2 blocks to encode video tokens with linear complexity. Without any token reduction, VAMBA can encode more than 1024 frames (640$\times$360) on a single GPU, while transformer-based models can only encode 256 frames. On long video input, VAMBA achieves at least 50% reduction in GPU memory usage during training and inference, and nearly doubles the speed per training step compared to transformer-based LMMs. Our experimental results demonstrate that VAMBA improves accuracy by 4.3% on the challenging hour-long video understanding benchmark LVBench over prior efficient video LMMs, and maintains strong performance on a broad spectrum of long and short video understanding tasks.
Introduction
Processing long-form video content remains a significant challenge for Large Multimodal Models (LMMs). Standard architectures like Qwen2-VL or LLaVA rely on causal self-attention, which scales quadratically ($O(L^2)$) with sequence length. For hour-long videos, which can translate into tens of thousands of tokens, this complexity leads to prohibitive memory and compute requirements. Current solutions often resort to aggressive token compression or frame dropping, which sacrifices temporal resolution and fine-grained detail. VAMBA addresses this "quadratic bottleneck" by introducing a hybrid architecture that leverages the linear scaling of Mamba-2 for video processing.
The VAMBA Architecture
VAMBA departs from the monolithic Transformer approach by bifurcating the processing of video and text modalities. The architecture integrates Mamba-2 blocks to handle long video sequences with linear complexity, while retaining standard self-attention for text tokens to preserve linguistic reasoning capabilities.
Key components include:
- Mamba-2 for Video Encoding: Video tokens are processed through Mamba-2 layers, which support large state dimensions and multi-head structures, making them ideal for capturing complex temporal dynamics without the memory explosion of Transformers.
- Cross-Attention Reasoning: Text tokens serve as queries to attend to video tokens (keys/values). This cross-attention remains efficient because the text sequence is typically short.
- Weight Recycling: To accelerate training, VAMBA initializes its cross-attention layers using weights from the pretrained Qwen2-VL model, facilitating faster multimodal alignment.
Efficiency and Scalability
The primary advantage of VAMBA is its ability to scale to extremely long contexts. On a single A800 (80GB) GPU, VAMBA can process over 1024 frames at 360p resolution, a fourfold increase over the 256-frame limit of standard Transformer-based LMMs.
As shown in the efficiency analysis, VAMBA achieves:
- 50% Reduction in GPU Memory: Significant savings are observed during both training and pre-filling stages. For instance, while Qwen2-VL-7B hits Out-of-Memory (OOM) limits at 256 frames during pre-filling, VAMBA continues to scale efficiently to 1024 frames.
- Double Training Throughput: The linear complexity translates to nearly twice the training speed per step for sequences exceeding 64 frames.
- Reduced FLOPs: Prefilling FLOPs are substantially lower, enabling faster inference on long videos.
Experimental Results
VAMBA was evaluated across a suite of benchmarks ranging from short-form reasoning (MVBench, NExT-QA) to hour-long video understanding (LVBench, HourVideo).
- Long Video Performance: VAMBA achieved a state-of-the-art 42.1% accuracy on LVBench, outperforming other efficient LMMs like LongVU and Video-XL. This performance gain is largely attributed to its ability to ingest more frames without information loss.
- Short Video Consistency: Despite the architectural shift, VAMBA maintains competitive performance on short-video tasks, demonstrating that the hybrid approach does not compromise general multimodal capabilities.
Conclusion
VAMBA demonstrates that architectural innovation is a powerful, orthogonal alternative to token compression for long-video understanding. By combining the linear scaling of Mamba-2 with the reasoning power of Transformers, VAMBA enables the processing of hour-long videos with unprecedented efficiency and accuracy. Future work will explore scaling training data and integrating adaptive token-dropping techniques to push the boundaries toward 10-hour video comprehension.
Summary updated