StreamingVLM: Compreensão em Tempo Real para Fluxos de Vídeo Infinitos
StreamingVLM: Real-Time Understanding for Infinite Video Streams
October 10, 2025
Autores: Ruyi Xu, Guangxuan Xiao, Yukang Chen, Liuning He, Kelly Peng, Yao Lu, Song Han
cs.AI
Resumo
Modelos de visão e linguagem (VLMs) podem impulsionar assistentes em tempo real e agentes autônomos, mas enfrentam um desafio crítico: compreender fluxos de vídeo quase infinitos sem aumentar a latência e o uso de memória. Processar vídeos inteiros com atenção completa resulta em custos computacionais quadráticos e desempenho ruim em vídeos longos. Enquanto isso, métodos simples de janela deslizante também são falhos, pois ou quebram a coerência ou sofrem com alta latência devido à recomputação redundante. Neste artigo, apresentamos o StreamingVLM, um modelo projetado para a compreensão estável e em tempo real de entradas visuais infinitas. Nossa abordagem é um framework unificado que alinha o treinamento com a inferência em streaming. Durante a inferência, mantemos um cache KV compacto reutilizando estados de "attention sinks", uma janela curta de tokens visuais recentes e uma janela longa de tokens de texto recentes. Essa capacidade de streaming é instilada por meio de uma simples estratégia de ajuste fino supervisionado (SFT) que aplica atenção completa em segmentos curtos e sobrepostos de vídeo, o que efetivamente imita o padrão de atenção no tempo de inferência sem treinar em contextos proibitivamente longos. Para avaliação, construímos o Inf-Streams-Eval, um novo benchmark com vídeos que duram em média mais de duas horas e exigem alinhamento denso, por segundo, entre quadros e texto. No Inf-Streams-Eval, o StreamingVLM alcança uma taxa de vitória de 66,18% contra o GPT-4O mini e mantém um desempenho estável e em tempo real de até 8 FPS em uma única NVIDIA H100. Notavelmente, nossa estratégia SFT também aprimora as habilidades gerais de VQA sem qualquer ajuste fino específico para VQA, melhorando o desempenho no LongVideoBench em +4,30 e no OVOBench Realtime em +5,96. O código está disponível em https://github.com/mit-han-lab/streaming-vlm.
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.