SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2601.22674 · 2026

VisionTrim: Unified Vision Token Compression for Training-Free MLLM Acceleration

Wentong Li, Song Wang, Jianke Zhu, Junbo Chen, Nuaa, Udeer Ai, Hanxun Yu, Xuan Qu

arXiv · PDF · Open in the Atlas

Code that ran

2 of 5 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 1 failure of our instrument; 3 no recorded run), measured 2026-11-23; 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/2601.22674.json · badge: /api/ran/2601.22674.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
hanxunyu/VisionTrim community
Papers with Code archive
2 ran · 3 no recorded run
FunctionStatusWhere it lives
MultiScaleAttention Ran
ran on a synthesized input · constructed an object; no result was computed
hanxunyu/VisionTrim/llava/model/multimodal_projector/visual_plugin.py
code served (permissive licence) · get_code("02ebcf5a0a79c043")
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 an instance of its own class, MultiScaleAttention: the run constructed the object and did not call it, so no result was computed. 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
import numpy

torch.manual_seed(0)

ARGS = {
    "dim": 64,
    "dim_out": 64,
    "input_size": (8, 8),
    "num_heads": 4,
    "qkv_bias": False,
    "kernel_q": (3, 3),
    "kernel_kv": (1, 1),
    "stride_q": (2, 2),
    "stride_kv": (1, 1),
    "norm_layer": nn.LayerNorm,
    "has_cls_embed": False,
    "mode": "avg",
    "pool_first": True,
    "rel_pos_spatial": True,
    "rel_pos_zero_init": False,
    "residual_pooling": True,
}
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 MultiScaleAttention — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MultiScaleAttention output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not 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
attention_pool Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hanxunyu/VisionTrim/llava/model/multimodal_projector/visual_plugin.py
code served (permissive licence) · get_code("049db0114a85e508")
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 a small pooling module
class SimplePool(nn.Module):
    def forward(self, x):
        # x shape: (B*N, C, H, W)
        # Apply simple average pooling to reduce spatial dimensions
        return nn.functional.avg_pool2d(x, kernel_size=2, stride=2)

# Create a small normalization module
class SimpleNorm(nn.Module):
    def __init__(self, dim):
        super().__init__()
        self.norm = nn.LayerNorm(dim)
    
    def forward(self, x):
        return self.norm(x)

# Test case 1: 3D tensor with cls_embed
tensor_3d = torch.randn(2, 5, 8)  # (B, L, C) where L includes cls token
pool_module = SimplePool()
norm_module = SimpleNorm(8)
hw_shape_3d = [2, 2]  # H=2, W=2 for spatial dimensions

# Test case 2: 4D tensor with cls_embed
tensor_4d = torch.randn(2, 1, 5, 8)  # (B, N, L, C) where L includes cls token
hw_shape_4d = [2, 2]  # H=2, W=2

ARGS = {
    "tensor": tensor_3d,
    "pool": pool_module,
    "hw_shape": hw_shape_3d,
    "has_cls_embed": True,
    "norm": norm_module
}
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
Abstractor Not yet run
unverified (harvested, no recorded run)
hanxunyu/VisionTrim/llava/model/multimodal_projector/visual_plugin.py
code served (permissive licence) · get_code("fc61197bc642b161")
How it ran

no invocation recorded.

DAbstractor Not yet run
unverified (harvested, no recorded run)
hanxunyu/VisionTrim/llava/model/multimodal_projector/visual_plugin.py
code served (permissive licence) · get_code("8a7926f3566a508f")
How it ran

no invocation recorded.

cal_rel_pos_spatial Not yet run
unverified (harvested, no recorded run)
hanxunyu/VisionTrim/llava/model/multimodal_projector/visual_plugin.py
code served (permissive licence) · get_code("5de56fec3ce10382")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 0 later) and 1 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.

FunctionAlso present inEarliest-datedOthers named
attention_pool
brick of this paper's assembly: helper
3 other papers
3 dated earlier · 1 only as an assembly brick
2302.04869 (2023-02)
Reversible Vision Transformers
2402.11301 (2024-02)
ReViT: Enhancing Vision Transformers Feature Diversity with Attention Residual Connections
2406.20092 (2024-06)
Efficient Large Multi-modal Models via Visual Context Compression
cal_rel_pos_spatial
brick of this paper's assembly: helper
3 other papers
3 dated earlier · 1 only as an assembly brick
2302.04869 (2023-02)
Reversible Vision Transformers
2402.11301 (2024-02)
ReViT: Enhancing Vision Transformers Feature Diversity with Attention Residual Connections
2406.20092 (2024-06)
Efficient Large Multi-modal Models via Visual Context Compression
Abstractor
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2406.20092 (2024-06)
Efficient Large Multi-modal Models via Visual Context Compression
MultiScaleAttention
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2406.20092 (2024-06)
Efficient Large Multi-modal Models via Visual Context Compression

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-23.

Repositories linked to this paper

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

Abstract

Multimodal large language models (MLLMs) suffer from high computational costs due to excessive visual tokens, particularly in high-resolution and videobased scenarios. Existing token reduction methods typically focus on isolated pipeline components and often neglect textual alignment, leading to performance degradation. In this paper, we propose VisionTrim, a unified framework for training-free MLLM acceleration, integrating two effective plug-and-play modules: 1) the Dominant Vision Token Selection (DVTS) module, which preserves essential visual tokens via a global-local view, and 2) the Text-Guided Vision Complement (TGVC) module, which facilitates context-aware token merging guided by textual cues. Extensive experiments across diverse image and video multimodal benchmarks demonstrate the performance superiority of our Vi-sionTrim, advancing practical MLLM deployment in real-world applications. The code is available at: https://github.com/hanxunyu/VisionTrim.

For agents

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

get_harvested_code_for_paper("2601.22674")
get_code_for_paper("2601.22674")
have("2601.22674")

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

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

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

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

Connect an agent — have() is free.