让视觉语言模型实时理解无限长视频流,内存和延迟都不涨。
StreamingVLM: Real-Time Understanding for Infinite Video Streams
- 用注意力缓存复用机制,保持长期上下文连贯性。
- 在超长视频上实现66.18%胜率,单卡实现实时8帧/秒。
- 无需专门训练,通用问答能力也显著提升。
视觉语言模型(VLMs)可驱动实时助手与自主智能体,但面临理解近乎无限视频流时延迟与内存持续增长的挑战。全注意力处理整个视频会导致计算复杂度呈二次增长,且在长视频上表现不佳;而简单的滑动窗口方法要么破坏上下文连贯性,要么因重复计算导致高延迟。本文提出StreamingVLM,一种专为无限视觉输入实时稳定理解设计的统一框架。推理时通过重用注意力缓存、近期视觉标记短窗口与近期文本标记长窗口,维持紧凑的键值缓存。该流式能力通过简单监督微调(SFT)策略实现:在训练中对重叠的短视频块应用全注意力,有效模拟推理时的注意力模式,无需训练超长上下文。评估方面,我们构建了Inf-Streams-Eval基准,包含平均超过两小时的视频,要求帧与文本每秒精准对齐。在该基准上,StreamingVLM相较GPT-4O mini取得66.18%胜率,并在单张NVIDIA H100上实现最高8帧/秒的稳定实时性能。值得注意的是,该SFT策略无需任何针对VQA的微调,即在LongVideoBench上提升+4.30,在OVOBench Realtime上提升+5.96。代码已开源:https://github.com/mit-han-lab/streaming-vlm。
原文摘要 · Abstract (English)
Vision-language models (VLMs) could power real-time assistants and autonomous agents, but they face a critical challenge: understanding near-infinite video streams without escalating latency and memory usage. Processing entire videos with full attention leads to quadratic computational costs and poor performance on long videos. Meanwhile, simple sliding window methods are also flawed, as they either break coherence or suffer from high latency due to redundant recomputation. In this paper, we introduce StreamingVLM, a model designed for real-time, stable understanding of infinite visual input. Our approach is a unified framework that aligns training with streaming inference. During inference, we maintain a compact KV cache by reusing states of attention sinks, a short window of recent vision tokens, and a long window of recent text tokens. This streaming ability is instilled via a simple supervised fine-tuning (SFT) strategy that applies full attention on short, overlapped video chunks, which effectively mimics the inference-time attention pattern without training on prohibitively long contexts. For evaluation, we build Inf-Streams-Eval, a new benchmark with videos averaging over two hours that requires dense, per-second alignment between frames and text. On Inf-Streams-Eval, StreamingVLM achieves a 66.18% win rate against GPT-4O mini and maintains stable, real-time performance at up to 8 FPS on a single NVIDIA H100. Notably, our SFT strategy also enhances general VQA abilities without any VQA-specific fine-tuning, improving performance on LongVideoBench by +4.30 and OVOBench Realtime by +5.96. Code is available at https://github.com/mit-han-lab/streaming-vlm.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。