π Project Page | π Arxiv (Coming Soon)
Figure 1. While standard Video-LLM models suffer from linear O(T)-memory growth, Video-MemComp maintains a strictly O(1)-memory via a Taylor expansion-guided hybrid strategy, enabling efficient streaming video understanding.
This repository contains the official implementation of Video-MemComp.
Video-MemComp is a structure-aware KV memory compression framework for long-form and streaming video understanding with Multimodal Large Language Models (MLLMs).
Unlike heuristic KV pruning or retrieval-based approaches, Video-MemComp is derived from a first-order Taylor expansion of error propagation and decomposes compression error into:
Local Approximation Error
Layer-wise Structural Sensitivity
Figure 2. Overview of our Video-MemComp Framework. Guided by Taylor expansion (top), we split global memory compression into two objectives: 1) Minimizing Local Approximation Error (middle) via Pre-RoPE Aggregation and Intra-layer KV Pruning. 2) Managing Structural Sensitivity (bottom) via a Tri-Hybrid Budget Allocation strategy.
The framework enables:
Table 1. Performance Comparison on Offline Video Understanding Benchmarks. We evaluate Video-MemComp against state-of-the-art compression methods and full-cache baselines. Our method meets or exceeds full-cache performance under strict memory constraints.
Figure 3. Performance on MLVU with Qwen2-VL-7B. Our method outperforms strong baselines across all memory budgets, and even surpasses the Full KV baseline at 6K, 12K, and 24K KV budgets, showing that Video-MemComp removes redundancy while preserving key semantics.
| Model | Status |
|---|---|
| Qwen2-VL-7B | β |
| Qwen2.5-VL-3B | β |
| Qwen2.5-VL-7B | β |
| LLaVA-OneVision-7B | β |
| InternVL-3.5 (2B) | β |
After downloading models and datasets, your directory should look like:
Video-MemComp/
βββ data/
β βββ egoschema/
β βββ mlvu/
β βββ videomme/
β βββ ovobench/
β
βββ model/
β βββ InternVL3_5/
β βββ Qwen2___5-VL-3B-Instruct/
β βββ Qwen2___5-VL-7B-Instruct/
β βββ qwen2vl/
β βββ llava-onevision-qwen2-7b-ov-hf/
β
βββ internvl/
βββ llavaov/
βββ qwen2_5vl/
βββ qwen2_vl/
β οΈ Model weights and datasets are NOT included in this repository and must be downloaded manually.
Please download the following models and place them under model/ as shown above.
Model: Qwen2-VL
Download from:https://huggingface.co/Qwen/Qwen2-VL-7B-Instruct
Place into:
model/qwen2vl/
Model: Qwen2.5-VL
Download from: https://huggingface.co/Qwen
Place into:
model/Qwen2___5-VL-3B-Instruct/
model/Qwen2___5-VL-7B-Instruct/
Model: LLaVA-OneVision
Download from:https://huggingface.co/llava-hf/llava-onevision-qwen2-7b-ov-hf
Place into:
model/llava-onevision-qwen2-7b-ov-hf/
Model: InternVL
Download from:https://huggingface.co/OpenGVLab/InternVL3_5-2B
Place into:
model/InternVL3_5/
Dataset: EgoSchema
Official repo:https://github.com/egoschema/EgoSchema
Expected structure:
data/egoschema/
βββ full.json
βββ subset_answers.json
βββ videos/
Dataset: MLVU
Official repo:https://github.com/MLVU-benchmark/MLVU
Place under:
data/mlvu/
Dataset: VideoMME
Official repo: https://github.com/VideoMME/VideoMME
Place under:
data/videomme/
Ensure videos are extracted into:
data/videomme/videos/
Dataset: OVO-Bench
Place under:
data/ovobench/
βββ chunked_videos/
βββ src_videos/
βββ ovo_bench_new.json
We recommend one Conda environment per backbone.
Example (Qwen2.5-VL):
conda env create -f qwen2_5vl/environment.yml
conda activate qwen2_5vl
pip install -r qwen2_5vl/requirements.txt
CUDA / PyTorch versions are backbone-specific.
Please follow the provided environment.yml.
All experiments are launched via provided shell scripts.
Example:
cd qwen2_5vl/scripts
bash eval_egoschema.sh
bash eval_mlvu.sh
bash eval_videomme.sh
bash eval_ovobench.sh
43 commits
Python
97.9%
Shell
2.1%
π Project Page | π Arxiv (Coming Soon)
Figure 1. While standard Video-LLM models suffer from linear O(T)-memory growth, Video-MemComp maintains a strictly O(1)-memory via a Taylor expansion-guided hybrid strategy, enabling efficient streaming video understanding.
This repository contains the official implementation of Video-MemComp.
Video-MemComp is a structure-aware KV memory compression framework for long-form and streaming video understanding with Multimodal Large Language Models (MLLMs).
Unlike heuristic KV pruning or retrieval-based approaches, Video-MemComp is derived from a first-order Taylor expansion of error propagation and decomposes compression error into:
Local Approximation Error
Layer-wise Structural Sensitivity
Figure 2. Overview of our Video-MemComp Framework. Guided by Taylor expansion (top), we split global memory compression into two objectives: 1) Minimizing Local Approximation Error (middle) via Pre-RoPE Aggregation and Intra-layer KV Pruning. 2) Managing Structural Sensitivity (bottom) via a Tri-Hybrid Budget Allocation strategy.
The framework enables:
Table 1. Performance Comparison on Offline Video Understanding Benchmarks. We evaluate Video-MemComp against state-of-the-art compression methods and full-cache baselines. Our method meets or exceeds full-cache performance under strict memory constraints.
Figure 3. Performance on MLVU with Qwen2-VL-7B. Our method outperforms strong baselines across all memory budgets, and even surpasses the Full KV baseline at 6K, 12K, and 24K KV budgets, showing that Video-MemComp removes redundancy while preserving key semantics.
| Model | Status |
|---|---|
| Qwen2-VL-7B | β |
| Qwen2.5-VL-3B | β |
| Qwen2.5-VL-7B | β |
| LLaVA-OneVision-7B | β |
| InternVL-3.5 (2B) | β |
After downloading models and datasets, your directory should look like:
Video-MemComp/
βββ data/
β βββ egoschema/
β βββ mlvu/
β βββ videomme/
β βββ ovobench/
β
βββ model/
β βββ InternVL3_5/
β βββ Qwen2___5-VL-3B-Instruct/
β βββ Qwen2___5-VL-7B-Instruct/
β βββ qwen2vl/
β βββ llava-onevision-qwen2-7b-ov-hf/
β
βββ internvl/
βββ llavaov/
βββ qwen2_5vl/
βββ qwen2_vl/
β οΈ Model weights and datasets are NOT included in this repository and must be downloaded manually.
Please download the following models and place them under model/ as shown above.
Model: Qwen2-VL
Download from:https://huggingface.co/Qwen/Qwen2-VL-7B-Instruct
Place into:
model/qwen2vl/
Model: Qwen2.5-VL
Download from: https://huggingface.co/Qwen
Place into:
model/Qwen2___5-VL-3B-Instruct/
model/Qwen2___5-VL-7B-Instruct/
Model: LLaVA-OneVision
Download from:https://huggingface.co/llava-hf/llava-onevision-qwen2-7b-ov-hf
Place into:
model/llava-onevision-qwen2-7b-ov-hf/
Model: InternVL
Download from:https://huggingface.co/OpenGVLab/InternVL3_5-2B
Place into:
model/InternVL3_5/
Dataset: EgoSchema
Official repo:https://github.com/egoschema/EgoSchema
Expected structure:
data/egoschema/
βββ full.json
βββ subset_answers.json
βββ videos/
Dataset: MLVU
Official repo:https://github.com/MLVU-benchmark/MLVU
Place under:
data/mlvu/
Dataset: VideoMME
Official repo: https://github.com/VideoMME/VideoMME
Place under:
data/videomme/
Ensure videos are extracted into:
data/videomme/videos/
Dataset: OVO-Bench
Place under:
data/ovobench/
βββ chunked_videos/
βββ src_videos/
βββ ovo_bench_new.json
We recommend one Conda environment per backbone.
Example (Qwen2.5-VL):
conda env create -f qwen2_5vl/environment.yml
conda activate qwen2_5vl
pip install -r qwen2_5vl/requirements.txt
CUDA / PyTorch versions are backbone-specific.
Please follow the provided environment.yml.
All experiments are launched via provided shell scripts.
Example:
cd qwen2_5vl/scripts
bash eval_egoschema.sh
bash eval_mlvu.sh
bash eval_videomme.sh
bash eval_ovobench.sh
43 commits
Python
97.9%
Shell
2.1%