SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2512.06866 · NeurIPS · 2025

Less Is More, but Where? Dynamic Token Compression via LLM-Guided Keyframe Prior

Zhuotao Tian, Bin Kang, Yulin Li, Bin Chen, Junjie Wang, Haokun Gui, Ziyang Fan, G Keyframe

arXiv · PDF · Open in the Atlas

Code that ran

13 of 15 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; 10 failures of our instrument; 2 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/2512.06866.json · badge: /api/ran/2512.06866.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
yu-lin-li/DyToK canonical (classifier label)
classifier basis: census
13 ran · 2 no recorded run
FunctionStatusWhere it lives
SigLipAttention_forward Ran
ran; our contract draft was wrong, not the code
yu-lin-li/DyToK/dytok/visionzip/siglip_encoder.py
code served (permissive licence) · get_code("b2e11b191bfb220f")
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 minimal attention module that has all required attributes and methods
class MinimalSigLipAttention(nn.Module):
    def __init__(self, embed_dim=4, num_heads=2, dropout=0.1):
        super().__init__()
        self.embed_dim = embed_dim
        self.num_heads = num_heads
        self.head_dim = embed_dim // num_heads
        self.scale = self.head_dim ** -0.5
        self.dropout = dropout
        
        # Linear projections
        self.q_proj = nn.Linear(embed_dim, embed_dim)
        self.k_proj = nn.Linear(embed_dim, embed_dim)
        self.v_proj = nn.Linear(embed_dim, embed_dim)
        self.out_proj = nn.Linear(embed_dim, embed_dim)
    
    def forward(self, hidden_states, attention_mask=None, output_attentions=False):
        # This will be replaced by the actual function being tested
        pass

# Instantiate the attention module
attention = MinimalSigLipAttention(embed_dim=4, num_heads=2, dropout=0.1)

# Create input tensors
batch_size = 2
seq_len = 3
embed_dim = 4

hidden_states = torch.randn(batch_size, seq_len, embed_dim)

# Create optional attention mask (batch_size, 1, seq_len, seq_len)
attention_mask = torch.zeros(batch_size, 1, seq_len, seq_len)

# Define ARGS
ARGS = {
    "self": attention,
    "hidden_states": hidden_states,
    "attention_mask": attention_mask,
    "output_attentions": False,
}
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
SigLipVisionTower_forward Ran
ran; our contract draft was wrong, not the code
yu-lin-li/DyToK/dytok/visionzip/siglip_encoder.py
code served (permissive licence) · get_code("105d4beb9639b79b")
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)

# Helper functions that are called in the main function
def dynamic_compression(hidden_states, attn_rec, metric, dominant_num, contextual_num):
    batch_size = hidden_states.shape[0]
    hidden_states_save = hidden_states[:, :dominant_num]
    topk_indices = torch.arange(dominant_num).unsqueeze(0).expand(batch_size, -1)
    return hidden_states_save, topk_indices

def static_compression(hidden_states, attn_rec, metric, dominant_num, contextual_num):
    batch_size = hidden_states.shape[0]
    hidden_states_save = hidden_states[:, :dominant_num]
    topk_indices = torch.arange(dominant_num).unsqueeze(0).expand(batch_size, -1)
    return hidden_states_save, topk_indices

# Mock vision tower with necessary attributes and methods
class MockVisionModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.encoder = nn.Module()
        self.encoder.layers = nn.ModuleList([nn.Module()])
        self.encoder.layers[0].metric = nn.Parameter(torch.randn(2, 729, 4))
    
    def forward(self, x, output_hidden_states=False, output_attentions=False):
        pass

class MockVisionTower(nn.Module):
    def __init__(self, with_info=False):
        super().__init__()
        self.vision_model = MockVisionModel()
        if with_info:
            self._info = {
                'dominant': 100,
                'contextual': 50,
                'pooling': False
            }
        else:
            self._info = None
        self._cached_outputs = None
    
    def forward(self, images, output_hidden_states=False, output_attentions=False):
        # Return mock output
        batch_size = images.shape[0]
        hidden_states = torch.randn(batch_size, 729, 4)
        attentions = torch.randn(batch_size, 2, 729, 729)
        
        class Output:
            pass
        
        output = Output()
        output.hidden_states = [hidden_states]
        output.attentions = [attentions]
        return output

# Mock wrapper class that acts as self
class MockSelfDetection:
    def __init__(self):
        self.vision_tower = MockVisionTower(with_info=False)
        self.device = 'cpu'
        self.dtype = torch.float32

class MockSelfApplication:
    def __init__(self):
        self.vision_tower = MockVisionTower(with_info=True)
        self.device = 'cpu'
        self.dtype = torch.float32

class MockSelfApplicationPooling:
    def __init__(self):
        vision_tower = MockVisionTower(with_info=True)
        vision_tower._info['pooling'] = True
        self.vision_tower = vision_tower
        self.device = 'cpu'
        self.dtype = torch.float32

class MockSelfApplicationDynamic:
    def __init__(self):
        vision_tower = MockVisionTower(with_info=True)
        vision_tower._info['dominant'] = torch.tensor([100, 80])
        vision_tower._info['contextual'] = 50
        vision_tower._info['pooling'] = False
        self.vision_tower = vision_tower
        self.device = 'cpu'
        self.dtype = torch.float32

# Create test images
images = torch.randn(2, 3, 224, 224)

# Prepare all argument sets
ARGS = {
    'self': MockSelfDetection(),
    'images': images
}
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
SigLip_EncoderLayer_forward Ran
ran; our contract draft was wrong, not the code
yu-lin-li/DyToK/dytok/visionzip/siglip_encoder.py
code served (permissive licence) · get_code("2aa9dea2423043fa")
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
from typing import Optional, Tuple

torch.manual_seed(0)

# Build a minimal self-attention module that returns (hidden_states, attn_weights, metric)
class MinimalSelfAttention(nn.Module):
    def __init__(self, hidden_size):
        super().__init__()
        self.hidden_size = hidden_size
        
    def forward(self, hidden_states, attention_mask=None, output_attentions=False):
        batch_size, seq_len, dim = hidden_states.shape
        # Return modified hidden states, attention weights, and a metric
        attn_weights = torch.ones(batch_size, seq_len, seq_len)
        metric = torch.tensor(0.5)
        return hidden_states, attn_weights, metric

# Build a minimal MLP module
class MinimalMLP(nn.Module):
    def __init__(self, hidden_size):
        super().__init__()
        self.linear = nn.Linear(hidden_size, hidden_size)
        
    def forward(self, hidden_states):
        return self.linear(hidden_states)

# Build the encoder layer
class SigLip_EncoderLayer(nn.Module):
    def __init__(self, hidden_size):
        super().__init__()
        self.layer_norm1 = nn.LayerNorm(hidden_size)
        self.self_attn = MinimalSelfAttention(hidden_size)
        self.layer_norm2 = nn.LayerNorm(hidden_size)
        self.mlp = MinimalMLP(hidden_size)
        self.metric = None
        
    def forward(self, hidden_states: torch.Tensor, attention_mask: torch.Tensor, output_attentions: Optional[bool]=False) -> Tuple[torch.FloatTensor]:
        """
        Patched SigLip encoder layer forward pass with VisionZip metric capture.
        
        Captures attention-derived metrics from the attention module and stores them
        for downstream token selection when VisionZip metadata is available.
        """
        residual = hidden_states
        hidden_states = self.layer_norm1(hidden_states)
        hidden_states, attn_weights, metric = self.self_attn(hidden_states=hidden_states, attention_mask=attention_mask, output_attentions=output_attentions)
        hidden_states = residual + hidden_states
        self.metric = metric
        residual = hidden_states
        hidden_states = self.layer_norm2(hidden_states)
        hidden_states = self.mlp(hidden_states)
        hidden_states = residual + hidden_states
        outputs = (hidden_states,)
        if output_attentions:
            outputs += (attn_weights,)
        return outputs

# Create instances for the function call
hidden_size = 4
batch_size = 2
seq_len = 3

encoder_layer = SigLip_EncoderLayer(hidden_size)
hidden_states = torch.randn(batch_size, seq_len, hidden_size)
attention_mask = torch.ones(batch_size, seq_len, seq_len)

ARGS = {
    "self": encoder_layer,
    "hidden_states": hidden_states,
    "attention_mask": attention_mask,
    "output_attentions": False,
}
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
encode_images_visionzip Ran
ran; our contract draft was wrong, not the code
yu-lin-li/DyToK/dytok/visionzip/llava_arch.py
code served (permissive licence) · get_code("089d3de5fd9f5bee")
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 3, dtype family float, shape (2, 5, 12) 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 as nn

torch.manual_seed(0)

# Create a mock vision tower that returns image features
class MockVisionTower(nn.Module):
    def __init__(self):
        super().__init__()
    
    def forward(self, images):
        # Return (image_features, keep_idx, extra_info)
        batch_size = images.shape[0]
        image_features = torch.randn(batch_size, 5, 8)  # (batch=2, seq=5, dim=8)
        keep_idx = torch.arange(batch_size)
        extra_info = {"processed": True}
        return image_features, keep_idx, extra_info

# Create a mock projector
class MockProjector(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(8, 12)
    
    def forward(self, x):
        return self.linear(x)

# Create a mock model with get_vision_tower() and mm_projector
class MockModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.vision_tower = MockVisionTower()
        self.mm_projector = MockProjector()
    
    def get_vision_tower(self):
        return self.vision_tower

# Create a mock self object with get_model() method
class MockSelf:
    def __init__(self):
        self.model = MockModel()
    
    def get_model(self):
        return self.model
    
    def encode_images_visionzip(self, images):
        """
        Not for video inputs.
        """
        image_features, keep_idx, extra_info = self.get_model().get_vision_tower().forward(images)
        image_features = self.get_model().mm_projector(image_features)
        return image_features

# Create test images: (batch=2, channels=3, height=4, width=4)
images = torch.randn(2, 3, 4, 4)

# Create the self object
self_obj = MockSelf()

ARGS = {
    "self": self_obj,
    "images": images
}
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 3, dtype family float, shape (2, 5, 12) — shape (2, 5, 12) 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
encode_images_visionzip_multi Ran
ran; our contract draft was wrong, not the code
yu-lin-li/DyToK/dytok/visionzip/llava_arch.py
code served (permissive licence) · get_code("727a5334cd53d7ae")
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)

class SimpleVisionTower(nn.Module):
    """Mock vision tower that processes images and returns features with optional compression."""
    
    def __init__(self):
        super().__init__()
        self.feature_dim = 5
    
    def forward(self, images):
        """
        Process images and return features, keep_idx, and extra_info.
        Returns either list of tensors (compressed) or single tensor (raw).
        """
        # Simulate compressed output: list of tensors
        batch_size = 2
        num_patches = 4
        
        image_features = [
            torch.randn(num_patches, self.feature_dim),
            torch.randn(num_patches, self.feature_dim)
        ]
        keep_idx = [torch.tensor([0, 1, 2]), torch.tensor([0, 1, 3])]
        extra_info = {"compression_ratio": 0.75}
        
        return image_features, keep_idx, extra_info

class SimpleMMProjector(nn.Module):
    """Mock multi-modal projector."""
    
    def __init__(self, input_dim=5, output_dim=4):
        super().__init__()
        self.linear = nn.Linear(input_dim, output_dim)
    
    def forward(self, x):
        return self.linear(x)

class MockModel(nn.Module):
    """Mock model containing vision tower and mm_projector."""
    
    def __init__(self):
        super().__init__()
        self.vision_tower = SimpleVisionTower()
        self.mm_projector = SimpleMMProjector()
    
    def get_vision_tower(self):
        return self.vision_tower

class EncoderWithMethods:
    """Wrapper class that has get_model method."""
    
    def __init__(self, model):
        self.model = model
    
    def get_model(self):
        return self.model
    
    def encode_images_visionzip_multi(self, images):
        """
        Handle both compressed (list) and raw (tensor) image features from the vision tower,
        then project them to the multi-modal embedding space.
        
        Returns
            - image_features: Projected image features (list or tensor)
            - keep_idx: Token indices retained after compression (None if no compression)
            - extra_info: VisionZip metadata (compression criteria for post-pooling, or empty dict)
        """
        image_features, keep_idx, extra_info = self.get_model().get_vision_tower()(images)
        if isinstance(image_features, list):
            image_features = [self.get_model().mm_projector(x) for x in image_features]
        else:
            image_features = self.get_model().mm_projector(image_features)
        return (image_features, keep_idx, extra_info)

model = MockModel()
encoder = EncoderWithMethods(model)

# Create dummy images input (can be any shape, vision tower doesn't strictly use it)
dummy_images = torch.randn(2, 3, 224, 224)

ARGS = {
    "self": encoder,
    "images": dummy_images
}
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
escaped_split Ran
ran; our contract draft was wrong, not the code
yu-lin-li/DyToK/eval/lmms_eval/utils.py
code served (permissive licence) · get_code("57e732507bad40db")
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, ndim 1, 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 re

# The function escaped_split takes text (a string), sep_char (a single character string),
# and maxsplit (an integer). Let's construct valid arguments.

ARGS = {
    "text": "hello\\,world,foo\\,bar,baz",
    "sep_char": ",",
    "maxsplit": -1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list 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
get_sample_size Ran
ran, honoured the contract we drafted
yu-lin-li/DyToK/eval/lmms_eval/evaluator_utils.py
code served (permissive licence) · get_code("00f5e7d9ee6636ba")
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 int, ndim 0, dtype family int, shape () 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 math
from typing import List, Optional, Tuple, Union

class MockTask:
    def __init__(self):
        self.eval_docs = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

task = MockTask()

ARGS = {
    "task": task,
    "limit": 0.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () 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
hash_args Ran
ran; our contract draft was wrong, not the code
yu-lin-li/DyToK/eval/lmms_eval/api/model.py
code served (permissive licence) · get_code("20a7cc804eb22661")
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 str. 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 hashlib
import json

# Construct valid arguments for hash_args function
# The function takes attr (attribute name) and args (tuple/list of arguments)
# and creates a JSON string to hash

attr = "test_attribute"
args = ("value1", 42, [1, 2, 3], {"key": "value"})

ARGS = {
    "attr": attr,
    "args": args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
hash_string Ran
ran; our contract draft was wrong, not the code
yu-lin-li/DyToK/eval/lmms_eval/utils.py
code served (permissive licence) · get_code("1fddd33683ef553c")
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 str. 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 hashlib

def hash_string(string: str) -> str:
    return hashlib.sha256(string.encode('utf-8')).hexdigest()

ARGS = {
    "string": "hello world"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
is_json Ran
ran, violated the contract we drafted
yu-lin-li/DyToK/eval/lmms_eval/utils.py
code served (permissive licence) · get_code("ae00474f91be5441")
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 bool, ndim 0, dtype family float, shape () 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 json

def is_json(string):
    try:
        json.loads(string)
        return True
    except json.JSONDecodeError:
        return False

ARGS = {
    "string": '{"key": "value"}'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () 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
remove_none_pattern Ran
ran; our contract draft was wrong, not the code
yu-lin-li/DyToK/eval/lmms_eval/logging_utils.py
code served (permissive licence) · get_code("74386ef186ff5c64")
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 1, 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 re

def remove_none_pattern(input_string):
    pattern = re.compile(',none$')
    result = re.sub(pattern, '', input_string)
    removed = result != input_string
    return (result, removed)

ARGS = {
    'input_string': 'test,none'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, 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
request_caching_arg_to_dict Ran
ran; our contract draft was wrong, not the code
yu-lin-li/DyToK/eval/lmms_eval/evaluator.py
code served (permissive licence) · get_code("c44830a7722ff5f7")
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 dict. 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

ARGS = {
    'cache_requests': 'true'
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
validate_inputs Ran
ran, honoured the contract we drafted
yu-lin-li/DyToK/dytok/visionzip/utils.py
code served (permissive licence) · get_code("be9ad8c0e6b90e15")
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 float, ndim 0, dtype family float, shape () 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 as nn

torch.manual_seed(0)

class TinyModel(nn.Module):
    """Minimal tiny model for frame importance assessment."""
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 2)
    
    def forward(self, x):
        return self.linear(x)

tiny_model_instance = TinyModel()

ARGS = {
    'dominant': 8,
    'contextual': 4,
    'pooling': True,
    'dytok': True,
    'upper_limit': 16,
    'use_tiny': True,
    'tiny_model': tiny_model_instance,
    'attn_layer': 2.5
}
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 float, ndim 0, dtype family float, shape () — shape () 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
Qwen2Attention_forward Not yet run
unverified (harvested, no recorded run)
yu-lin-li/DyToK/dytok/visionzip/modeling_qwen2.py
code served (permissive licence) · get_code("2d39981ff01054c0")
How it ran

no invocation recorded.

generate_static Not yet run
unverified (harvested, no recorded run)
yu-lin-li/DyToK/dytok/visionzip/utils.py
code served (permissive licence) · get_code("80648f1bef493fe4")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 7 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 7 later) and 8 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
hash_args 44 other papers
34 dated earlier, 7 later, 2 same year, order not determinable, 1 undated
2005.14165 (2020-05)
Language Models are Few-Shot Learners
2110.04374 (2021-10)
A Few More Examples May Be Worth Billions of Parameters
2303.17003 (2023-03)
Evaluating GPT-3.5 and GPT-4 Models on Brazilian University Admission Exams
and 41 more not named here
request_caching_arg_to_dict 17 other papers
9 dated earlier, 7 later, 1 same year, order not determinable
2005.14165 (2020-05)
Language Models are Few-Shot Learners
2405.07938 (2024-05)
EconLogicQA: A Question-Answering Benchmark for Evaluating Large Language Models in Economic Sequential Reasoning
2411.07176 (2024-11)
More Expressive Attention with Negative Weights
and 14 more not named here
get_sample_size 12 other papers
4 dated earlier, 7 later, 1 same year, order not determinable
2005.14165 (2020-05)
Language Models are Few-Shot Learners
2405.07938 (2024-05)
EconLogicQA: A Question-Answering Benchmark for Evaluating Large Language Models in Economic Sequential Reasoning
2412.14171 (2024-12)
Thinking in Space: How Multimodal Large Language Models See, Remember, and Recall Spaces
and 9 more not named here
escaped_split 9 other papers
7 dated earlier, 2 later
2005.14165 (2020-05)
Language Models are Few-Shot Learners
2305.14493 (2023-05)
Do prompt positions really matter?
2307.16039 (2023-07)
Okapi: Instruction-tuned Large Language Models in Multiple Languages with Reinforcement Learning from Human Feedback
and 6 more not named here
remove_none_pattern 7 other papers
3 dated earlier, 4 later
2408.17267 (2024-08)
UrBench: A Comprehensive Benchmark for Evaluating Large Multimodal Models in Multi-View Urban Scenarios
2409.06851 (2024-09)
LIME: Less Is More for MLLM Evaluation
2412.14171 (2024-12)
Thinking in Space: How Multimodal Large Language Models See, Remember, and Recall Spaces
and 4 more not named here
hash_string 2 other papers
2 later
2602.01649 (2026-02)
Contribution-aware Token Compression for Efficient Video Understanding via Reinforcement Learning
2607.21595 (2026-07)
3D-Aware VLMs with Implicit and Explicit Geometries
is_json 2 other papers
2 later
2602.01649 (2026-02)
Contribution-aware Token Compression for Efficient Video Understanding via Reinforcement Learning
2607.21595 (2026-07)
3D-Aware VLMs with Implicit and Explicit Geometries

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

Recent advances in Video Large Language Models (VLLMs) have achieved remarkable video understanding capabilities, yet face critical efficiency bottlenecks due to quadratic computational growth with lengthy visual token sequences of long videos. While existing keyframe sampling methods can improve temporal modeling efficiency, additional computational cost is introduced before feature encoding, and the binary frame selection paradigm is found suboptimal. Therefore, in this work, we propose Dynamic Token compression via LLM-guided Keyframe prior (DyToK), a training-free paradigm that enables dynamic token compression by harnessing VLLMs' inherent attention mechanisms. Our analysis reveals that VLLM attention layers naturally encoding query-conditioned keyframe priors, by which DyToK dynamically adjusts per-frame token retention ratios, prioritizing semantically rich frames while suppressing redundancies. Extensive experiments demonstrate that DyToK achieves state-of-the-art efficiency-accuracy tradeoffs. DyToK shows plug-and-play compatibility with existing compression methods, such as VisionZip and FastV, attaining 4.3× faster inference while preserving accuracy across multiple VLLMs, such as LLaVA-OneVision and Qwen2.5-VL. Code is available at https://github.com/yu-lin-li/DyToK.

For agents

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

get_harvested_code_for_paper("2512.06866")
get_code_for_paper("2512.06866")
have("2512.06866")

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

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

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

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

Connect an agent — have() is free.