SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2506.23825 · ICCV · 2025

Flash-VStream: Efficient Real-Time Understanding for Long Video Streams

Jiashi Feng, Yong Liu, Yansong Tang, Xiaojie Jin, Yiqin Wang, Haoji Zhang

arXiv · PDF · Open in the Atlas

Code that ran

7 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 7 failures of our instrument; 4 no recorded run), measured 2026-11-24; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2506.23825.json · badge: /api/ran/2506.23825.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
IVGSZ/Flash-VStream marked official in Papers with Code
Papers with Code archive
7 ran · 4 no recorded run
FunctionStatusWhere it lives
attention_feature Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
IVGSZ/Flash-VStream/Flash-VStream-Qwen/models/vstream_qwen2vl_realtime.py
code served (permissive licence) · get_code("c522c620944fcbb9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Define a simple attention function that takes two tensors and returns a combined result
def simple_attention_fn(memory, new_feature):
    """
    Simple attention function that combines memory and new_feature.
    memory: (T0*P, D)
    new_feature: (batch_size, D)
    returns: (T0*P, D)
    """
    # Simple implementation: average memory with expanded new_feature
    expanded_new = new_feature.mean(dim=0, keepdim=True).expand_as(memory)
    return (memory + expanded_new) / 2.0

# Set the function name for the print statement
simple_attention_fn.__name__ = 'simple_attention'

# Create img_feature tensor: shape (T, P, D)
# T=10 (total frames), P=3 (number of patches), D=4 (feature dimension)
T = 10
P = 3
D = 4
img_feature = torch.randn(T, P, D)

# video_max_frames: maximum frames to process at once
video_max_frames = 4

# attention_fn: callable function
attention_fn = simple_attention_fn

ARGS = {
    'img_feature': img_feature,
    'video_max_frames': video_max_frames,
    'attention_fn': attention_fn,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
drop_feature Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
IVGSZ/Flash-VStream/Flash-VStream-Qwen/models/vstream_qwen2vl_realtime.py
code served (permissive licence) · get_code("88e007251e2c289d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create small tensors for the function
# T=6 (time steps), P=2 (patches), D=4 (dimension)
T = 6
P = 2
D = 4

img_feature = torch.randn(T, P, D)

# video_max_frames should be less than T to trigger the dropping logic
video_max_frames = 3

# img_similarity can be None or a tensor
# When provided, it should have shape (T-1,) for cosine similarities between consecutive frames
img_similarity = None

ARGS = {
    'img_feature': img_feature,
    'video_max_frames': video_max_frames,
    'img_similarity': img_similarity,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
fast_weighted_kmeans_ordered_feature Ran
ran; our contract draft was wrong, not the code
IVGSZ/Flash-VStream/Flash-VStream-Qwen/models/vstream_qwen2vl_realtime.py
code served (permissive licence) · get_code("aeab8c53bd7cc503")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import random

torch.manual_seed(0)
random.seed(0)

# Create a small 3D feature tensor: (T, P, D)
# T=5 time steps, P=3 patches, D=4 feature dimension
img_feature = torch.randn(5, 3, 4, dtype=torch.float32)

# video_max_frames: maximum number of frames to keep
video_max_frames = 3

# weights: optional weights for each frame (T,)
weights = torch.ones(5, dtype=torch.float32)

ARGS = {
    "img_feature": img_feature,
    "video_max_frames": video_max_frames,
    "weights": weights,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
merge_feature Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
IVGSZ/Flash-VStream/Flash-VStream-Qwen/models/vstream_qwen2vl_realtime.py
code served (permissive licence) · get_code("19b51c02fb81ef10")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create test tensors
# T=5 (time steps), P=2 (patches), D=4 (feature dimension)
T = 5
P = 2
D = 4
video_max_frames = 3

img_feature = torch.randn(T, P, D)
img_similarity = None  # Will be computed inside function if not provided

ARGS = {
    "img_feature": img_feature,
    "video_max_frames": video_max_frames,
    "img_similarity": img_similarity,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
torchpca_weighted_kmeans_ordered_feature Ran
ran; our contract draft was wrong, not the code
IVGSZ/Flash-VStream/Flash-VStream-Qwen/models/vstream_qwen2vl_realtime.py
code served (permissive licence) · get_code("005eab8e2724916d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create small tensors with distinct dimensions
# T=5 (temporal), P=3 (spatial/patch), D=4 (feature dimension)
T = 5
P = 3
D = 4
video_max_frames = 2

img_feature = torch.randn(T, P, D, dtype=torch.float32)
weights = torch.ones(T, dtype=torch.float32)

ARGS = {
    'img_feature': img_feature,
    'video_max_frames': video_max_frames,
    'weights': weights,
    'pca_dim': 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
weighted_kmeans_feature Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
IVGSZ/Flash-VStream/Flash-VStream-Qwen/models/vstream_qwen2vl_realtime.py
code served (permissive licence) · get_code("ae3ae26a8f618992")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import random

torch.manual_seed(0)

# Create test tensors
# img_feature: shape (T, P, D) where T is number of frames, P is spatial dimension, D is feature dimension
# We'll create a case where T > T0 to trigger the kmeans clustering
img_feature = torch.randn(10, 3, 4)  # 10 frames, 3 spatial patches, 4 feature dims

# video_max_frames: target number of frames after clustering
video_max_frames = 5

# weights: optional, should match first dimension of img_feature
weights = torch.ones(10, dtype=img_feature.dtype, device=img_feature.device)

ARGS = {
    'img_feature': img_feature,
    'video_max_frames': video_max_frames,
    'weights': weights,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
weighted_kmeans_ordered_feature Ran
ran; our contract draft was wrong, not the code
IVGSZ/Flash-VStream/Flash-VStream-Qwen/models/vstream_qwen2vl_realtime.py
code served (permissive licence) · get_code("c8be36921dc6305a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Create small test tensors
# T=6 frames, P=2 patches, D=4 feature dimension
img_feature = torch.randn(6, 2, 4, dtype=torch.float32)

# video_max_frames: target number of frames after clustering
video_max_frames = 3

# weights: optional, one weight per frame
weights = torch.ones(6, dtype=torch.float32)

# times: optional, one timestamp per frame
times = torch.arange(6, dtype=torch.float32)

ARGS = {
    "img_feature": img_feature,
    "video_max_frames": video_max_frames,
    "weights": weights,
    "times": times,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
FlashMemory Not yet run
unverified (harvested, no recorded run)
IVGSZ/Flash-VStream/Flash-VStream-Qwen/models/vstream_qwen2vl_realtime.py
code served (permissive licence) · get_code("5f35f922c5cc5480")
How it ran

no invocation recorded.

dbscan_feature Not yet run
unverified (harvested, no recorded run)
IVGSZ/Flash-VStream/Flash-VStream-Qwen/models/vstream_qwen2vl_realtime.py
code served (permissive licence) · get_code("9c19640a32bf3839")
How it ran

no invocation recorded.

gmm_feature Not yet run
unverified (harvested, no recorded run)
IVGSZ/Flash-VStream/Flash-VStream-Qwen/models/vstream_qwen2vl_realtime.py
code served (permissive licence) · get_code("d1517b2bc3b5f27d")
How it ran

no invocation recorded.

pca_weighted_kmeans_ordered_feature Not yet run
unverified (harvested, no recorded run)
IVGSZ/Flash-VStream/Flash-VStream-Qwen/models/vstream_qwen2vl_realtime.py
code served (permissive licence) · get_code("9ce5acc98b5b9e0b")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 11 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

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

Abstract

Benefiting from the advances in large language models and cross-modal alignment, existing multimodal large language models have achieved prominent performance in image and short video understanding. However, the understanding of long videos is still challenging, as their long-context nature results in significant computational and memory overhead. Most existing work treats long videos in the same way as short videos, which is inefficient for real-world applications and hard to generalize to even longer videos. To address these issues, we propose Flash-VStream, an efficient video language model capable of processing extremely long videos and responding to user queries in real time. Particularly, we design a Flash Memory module, containing a low-capacity context memory to aggregate long-context temporal information and model the distribution of information density, and a high-capacity augmentation memory to retrieve detailed spatial information based on this distribution. Compared to existing models, Flash-VStream achieves significant reductions in inference latency. Extensive experiments on long video benchmarks and comprehensive video benchmarks, i.e., EgoSchema, MLVU, LVBench, MVBench and Video-MME, demonstrate the state-of-the-art performance and outstanding efficiency of our method. Code is available at https://github.com/IVGSZ/Flash-VStream.

For agents

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

get_harvested_code_for_paper("2506.23825")
get_code_for_paper("2506.23825")
have("2506.23825")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2506.23825.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2506.23825.svg)](https://syntology.ai/paper/2506.23825)

Connect an agent — have() is free.