SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2505.14454 · EMNLP · 2025

Video Compression Commander: Plug-and-Play Inference Acceleration for Video Large Language Models

Linfeng Zhang, Junpeng Ma, Xuyang Liu, Yiyu Wang

arXiv · PDF · Open in the Atlas

Code that ran

9 of 10 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; 2 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 6 failures of our instrument; 1 no recorded run), measured 2026-11-24; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2505.14454.json · badge: /api/ran/2505.14454.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
xuyang-liu16/VidCom2 community
Papers with Code archive
8 ran · 1 no recorded run
xuyang-liu16/globalcom2 community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
_map_grid_vid Ran
ran, honoured the contract we drafted
xuyang-liu16/VidCom2/token_compressor/vidcom2/vidcom2.py
code served (permissive licence) · get_code("6fbce83e9e876966")
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 Tensor, ndim 1, dtype family int, shape (16,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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

torch.manual_seed(0)

# Analyze the function:
# - indices: List[torch.Tensor] - a list of tensors containing indices
# - h: int - a height parameter used in calculations
# - The function processes each tensor in indices, performs modulo/division operations
# - It uses tensor.device to maintain device consistency
# - It uses torch.arange to create ranges

# Create sample indices tensors
# Each tensor should contain valid indices for the grid
# Let's create 2 small tensors with some sample indices
indices_1 = torch.tensor([0, 1, 2, 3, 4], dtype=torch.long)
indices_2 = torch.tensor([1, 2, 3], dtype=torch.long)
indices = [indices_1, indices_2]

# h should be a positive integer
# From the code: w_new = h + 1, so h affects the mapping calculation
h = 4

ARGS = {
    "indices": indices,
    "h": h
}
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 Tensor, ndim 1, dtype family int, shape (16,) — shape (16,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
_map_linear_offset Ran
ran, honoured the contract we drafted
xuyang-liu16/VidCom2/token_compressor/vidcom2/vidcom2.py
code served (permissive licence) · get_code("69482d937aef94b2")
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 Tensor, ndim 1, dtype family int, shape (9,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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

torch.manual_seed(0)

# Construct arguments for _map_linear_offset
# The function expects:
# - indices: List[torch.Tensor] - list of index tensors
# - tpf: int - tokens per frame (offset multiplier)

# Create a list of small tensors with distinct sizes
indices = [
    torch.tensor([0, 1, 2], dtype=torch.long),
    torch.tensor([5, 6], dtype=torch.long),
    torch.tensor([10, 11, 12, 13], dtype=torch.long),
]

tpf = 8

ARGS = {
    "indices": indices,
    "tpf": tpf,
}
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 Tensor, ndim 1, dtype family int, shape (9,) — shape (9,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
_multi_scale_gaussian Ran
ran, violated the contract we drafted
xuyang-liu16/VidCom2/token_compressor/vidcom2/vidcom2.py
code served (permissive licence) · get_code("c7217c1bd7048e55")
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 Tensor, ndim 1, dtype family float, shape (2,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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

torch.manual_seed(0)

# x: torch.Tensor - input tensor, will be compared to center
# center: torch.Tensor - center point for distance calculation
# alphas: List[float] - list of scales for Gaussian kernels

x = torch.randn(2, 4)  # batch of 2, dimension 4
center = torch.randn(4)  # single point in dimension 4
alphas = [0.5, 1.0, 2.0]  # three different scales

ARGS = {
    "x": x,
    "center": center,
    "alphas": alphas,
}
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 Tensor, ndim 1, dtype family float, shape (2,) — shape (2,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
compute_gaussian_scores Ran
ran; our contract draft was wrong, not the code
xuyang-liu16/VidCom2/token_compressor/vidcom2/vidcom2.py
code served (permissive licence) · get_code("4ff96d51e642f706")
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, ndim 3, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 a small tensor for x
# Shape: (batch_size * frames_per_video, feature_dim)
# Using batch=2, tpf=3, feature_dim=4 means x should be (6, 4)
x = torch.randn(6, 4)

# tpf is the number of frames per video
tpf = 3

ARGS = {
    "x": x,
    "tpf": tpf,
}
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, ndim 3, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
compute_scales Ran
ran; our contract draft was wrong, not the code
xuyang-liu16/VidCom2/token_compressor/vidcom2/vidcom2.py
code served (permissive licence) · get_code("b129fe17c21f6091")
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 Tensor, ndim 1, dtype family float, shape (8,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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)

# scores: torch.Tensor - a 1D tensor of frame importance scores
scores = torch.randn(8)

# base: float - a base scaling factor
base = 0.5

# temp: float - temperature parameter for softmax (has default 0.01)
temp = 0.01

ARGS = {
    "scores": scores,
    "base": base,
    "temp": temp,
}
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 Tensor, ndim 1, dtype family float, shape (8,) — shape (8,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
map_features Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
xuyang-liu16/VidCom2/token_compressor/vidcom2/vidcom2.py
code served (permissive licence) · get_code("9de8a6f22b29d1b1")
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 Tensor, ndim 2, dtype family float, shape (6, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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

torch.manual_seed(0)

# Test case 1: linear mapper
indices_linear = [
    torch.tensor([0, 1, 2], dtype=torch.long),
    torch.tensor([1, 2, 0], dtype=torch.long),
]

flat_linear = torch.randn(6, 4)  # 6 total features, 4 dims

img_linear = None

spec_linear = {
    'mapper': 'linear',
    'tpf': None,  # Will use indices[0].shape[0]
    'grid': None,
}

ARGS = {
    'indices': indices_linear,
    'flat': flat_linear,
    'img': img_linear,
    'spec': spec_linear,
}
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 Tensor, ndim 2, dtype family float, shape (6, 4) — shape (6, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
select_low_var_channels Ran
ran; our contract draft was wrong, not the code
xuyang-liu16/VidCom2/token_compressor/vidcom2/vidcom2.py
code served (permissive licence) · get_code("1930e59fdc14452f")
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 Tensor, ndim 2, dtype family float, shape (2, 2) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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

torch.manual_seed(0)

# Create a small tensor with shape (batch=2, channels=4)
# This will be used as input to select_low_var_channels
x = torch.randn(2, 4)

# The function takes x and an optional ratio parameter
# ratio=0.5 means we select 50% of channels (2 out of 4)
ratio = 0.5

ARGS = {
    "x": x,
    "ratio": ratio,
}
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 Tensor, ndim 2, dtype family float, shape (2, 2) — shape (2, 2) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
select_outlier_indices Ran
ran; our contract draft was wrong, not the code
xuyang-liu16/VidCom2/token_compressor/vidcom2/vidcom2.py
code served (permissive licence) · get_code("d50936a9ea639b95")
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 list. 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

torch.manual_seed(0)

# scores: torch.Tensor - shape (batch_size, num_items)
# The function indexes into scores[i] for each batch element
# and calls torch.topk on it, so we need 2D tensor
scores = torch.rand(2, 8)

# scales: torch.Tensor - shape (batch_size,)
# The function multiplies scales * tpf and converts to list via .tolist()
# So we need 1D tensor with batch_size elements
scales = torch.tensor([0.5, 0.75])

# tpf: int - used in multiplication with scales
# arbitrary positive integer
tpf = 4

ARGS = {
    "scores": scores,
    "scales": scales,
    "tpf": tpf,
}
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 list — a list 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
select_topk_crop_features Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
xuyang-liu16/globalcom2/llava/model/llava_arch.py
code served (permissive licence) · get_code("a2ea4aed8d722f4f")
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) 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 sample data for the function
# unpad_image_feature_list: list of tensors with shape (num_tokens, feature_dim)
unpad_image_feature_list = [
    torch.randn(10, 4),  # 10 tokens, 4 features
    torch.randn(8, 4),   # 8 tokens, 4 features
]

# unpad_cls_attn_scores_list: list of tensors with shape (num_tokens,)
unpad_cls_attn_scores_list = [
    torch.randn(10),  # 10 attention scores
    torch.randn(8),   # 8 attention scores
]

# global_crops_cls_attn_scores: list of tensors with shape (num_tokens,)
global_crops_cls_attn_scores = [
    torch.randn(10),  # 10 global crop scores
    torch.randn(8),   # 8 global crop scores
]

# scales: list of floats representing the fraction of tokens to keep
scales = [0.5, 0.75]

ARGS = {
    "unpad_image_feature_list": unpad_image_feature_list,
    "unpad_cls_attn_scores_list": unpad_cls_attn_scores_list,
    "global_crops_cls_attn_scores": global_crops_cls_attn_scores,
    "scales": scales,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
vidcom2_compression Not yet run
unverified (harvested, no recorded run)
xuyang-liu16/VidCom2/token_compressor/vidcom2/vidcom2.py
code served (permissive licence) · get_code("88da35d026ac1ea3")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 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 10 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

Video large language models (VideoLLM) excel at video understanding, but face efficiency challenges due to the quadratic complexity of abundant visual tokens. Our systematic analysis of token compression methods for Vide-oLLMs reveals two critical issues: (i) overlooking distinctive visual signals across frames, leading to information loss; (ii) suffering from implementation constraints, causing incompatibility with modern architectures or efficient operators. To address these challenges, we distill three design principles for VideoLLM token compression and propose a plug-andplay inference acceleration framework "Video Compression Commander" (VidCom 2 ). By quantifying each frame's uniqueness, VidCom 2 adaptively adjusts compression intensity across frames, effectively preserving essential information while reducing redundancy in video sequences. Extensive experiments across various VideoLLMs and benchmarks demonstrate the superior performance and efficiency of our VidCom 2 . With only 25% visual tokens, VidCom 2 achieves 99.6% of the original performance on LLaVA-OV while reducing 70.8% of the LLM generation latency. Notably, our Frame Compression Adjustment strategy is compatible with other token compression methods to further improve their performance. Our code is available at https: //github.com/xuyang-liu16/VidCom2.

For agents

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

get_harvested_code_for_paper("2505.14454")
get_code_for_paper("2505.14454")
have("2505.14454")

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

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

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

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

Connect an agent — have() is free.