SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2503.00540 · ICLR · 2025

Streaming Video Question-Answering with In-context Video KV-Cache Retrieval

Hao Cheng, Hao Jiang, Haoyuan Li, Shangzhe Di, Zhelun Yu, Guanghao Zhang, Tao Zhong, Bolin Li, Wanggui He, Fangxun Shu

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 6 functions out of this paper's own repositories and ran 2 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
becomebright/rekv — 2 of 6
FunctionStatusWhere it lives
CudaCache Ran becomebright/rekv/model/attention/rekv_attention.py
pointer only (licence: NONE) · get_code("6a22c918328fa7e5")
VectorTensor Ran becomebright/rekv/model/attention/rekv_attention.py
pointer only (licence: NONE) · get_code("e88b9fb9be32e26b")
ContextManager Not yet run becomebright/rekv/model/attention/rekv_attention.py
pointer only (licence: NONE) · get_code("97e2fa43ed175c74")
MemoryUnit Not yet run becomebright/rekv/model/attention/rekv_attention.py
pointer only (licence: NONE) · get_code("5a1d7dcbc940dc65")
get_multi_stage_dot_production_attention Not yet run becomebright/rekv/model/attention/rekv_attention.py
pointer only (licence: NONE) · get_code("fce25f5f4aff13b2")
rekv_attention_forward Not yet run becomebright/rekv/model/attention/rekv_attention.py
pointer only (licence: NONE) · get_code("eb600d8a98496795")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

We propose ReKV, a novel training-free approach that enables efficient streaming video question-answering (StreamingVQA), by seamlessly integrating with existing Video Large Language Models (Video-LLMs). Traditional VideoQA systems struggle with long videos, as they must process entire videos before responding to queries, and repeat this process for each new question. In contrast, our approach analyzes long videos in a streaming manner, allowing for prompt responses as soon as user queries are received. Building on a common Video-LLM, we first incorporate a sliding-window attention mechanism, ensuring that input frames attend to a limited number of preceding frames, thereby reducing computational overhead. To prevent information loss, we store processed video key-value caches (KV-Caches) in RAM and disk, reloading them into GPU memory as needed. Additionally, we introduce a retrieval method that leverages an external retriever or the parameters within Video-LLMs to retrieve only query-relevant KV-Caches, ensuring both efficiency and accuracy in question answering. ReKV enables the separation of video encoding and question-answering across different processes and GPUs, significantly enhancing the efficiency of StreamingVQA. Through comprehensive experimentation, we validate the efficacy and practicality of our approach, which significantly boosts efficiency and enhances applicability over existing VideoQA models.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2503.00540")
get_code_for_paper("2503.00540")
have("2503.00540")

Connect an agent — have() is free.