SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.16158 · 2026

Focus When Necessary: Adaptive Routing and Collaborative Grounding for Training-Free Visual Grounding

Yang Tang, Wenming Yang, Zhiyuan Hu, Yifan Wang, Xiaochen Yang, Shiyu Li, Peiming Li, Zheng Wei

arXiv · PDF

Code that ran

17 of 21 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, 0 violated it and 0 have no contract verdict; 15 failures of our instrument; 4 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, 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/2606.16158.json · badge: /api/ran/2606.16158.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
TencentBAC/LazyMCoT canonical (classifier label)
classifier basis: census
17 ran · 4 no recorded run
FunctionStatusWhere it lives
repeat_kv Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
TencentBAC/LazyMCoT/Qwen2.5/modeling_qwen2_5_vl_re_infer.py
code served (permissive licence) · get_code("3c76e52815c5401d")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 4, dtype family float, shape (2, 6, 5, 4) as a later run recorded it. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-04T23:23:17Z). 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, num_key_value_heads, seqlen, head_dim)
# Using distinct sizes: batch=2, num_key_value_heads=3, seqlen=5, head_dim=4
hidden_states = torch.randn(2, 3, 5, 4)

# n_rep is the repetition factor
n_rep = 2

ARGS = {
    "hidden_states": hidden_states,
    "n_rep": n_rep,
}
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 Tensor, ndim 4, dtype family float, shape (2, 6, 5, 4) — shape (2, 6, 5, 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
add_legend_to_lpd_image Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
TencentBAC/LazyMCoT/Qwen2.5/Get_box.py
code served (permissive licence) · get_code("4e0b167ecec51c2f")
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 torch
import numpy as np
from PIL import Image
import base64
from io import BytesIO

# Create a small test image and encode it as base64
test_img = Image.new('RGB', (200, 150), color=(255, 255, 255))
img_bytes = BytesIO()
test_img.save(img_bytes, format='PNG')
img_bytes.seek(0)
img_b64 = base64.b64encode(img_bytes.read()).decode('utf-8')
lpd_image_b64 = f"data:image/png;base64,{img_b64}"

# Create color-label pairs
color_label_pairs = [
    ((255, 0, 0), "Red Region"),
    ((0, 255, 0), "Green Region"),
    ((0, 0, 255), "Blue Region"),
]

ARGS = {
    'lpd_image_b64': lpd_image_b64,
    'color_label_pairs': color_label_pairs,
    'position': 'bottom',
    'margin': 6,
    'swatch_size': 18,
    'font_size': None,
    'background': (245, 245, 245),
    'text_color': (20, 20, 20),
    'border_color': (100, 100, 100),
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, skimage, torch — 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
assign_entity_colors Ran
ran; our contract draft was wrong, not the code
TencentBAC/LazyMCoT/Qwen2.5/Get_box.py
code served (permissive licence) · get_code("68c10fc085ad39ab")
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

_LEGEND_PALETTE = [(255, 140, 0), (0, 191, 255), (255, 105, 180), (138, 43, 226), (255, 215, 0), (60, 179, 113), (220, 20, 60), (100, 149, 237), (255, 69, 0), (0, 206, 209), (186, 85, 211), (154, 205, 50)]

def assign_entity_colors(entity_labels):
    """
    

    Args:
        entity_labels: list[str] bbox 
    Returns:
        label2color: dict[str, tuple(R,G,B)]
        bbox_colors: list[tuple] entity_labels bbox 
    """
    label2color = {}
    bbox_colors = []
    for lb in entity_labels:
        key = (lb or '').strip()
        if key not in label2color:
            label2color[key] = _LEGEND_PALETTE[len(label2color) % len(_LEGEND_PALETTE)]
        bbox_colors.append(label2color[key])
    return (label2color, bbox_colors)


ARGS = {
    "entity_labels": ["person", "car", "dog", "person", "bicycle"]
}
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
bbox_is_contained Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
TencentBAC/LazyMCoT/Qwen2.5/Get_box.py
code served (permissive licence) · get_code("4ff5e2363f779bc5")
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 torch
import numpy as np

torch.manual_seed(0)

# The function expects:
# - inner_box: a sequence of 4 numbers [x0, y0, x1, y1]
# - outer_box: a sequence of 4 numbers [x0, y0, x1, y1]
# - tolerance: a float (optional, defaults to 0.03)

# Create valid bounding boxes as lists
inner_box = [0.1, 0.2, 0.5, 0.6]
outer_box = [0.0, 0.0, 1.0, 1.0]
tolerance = 0.03

ARGS = {
    "inner_box": inner_box,
    "outer_box": outer_box,
    "tolerance": tolerance
}
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 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
build_answer_instr_v2 Ran
ran; our contract draft was wrong, not the code
TencentBAC/LazyMCoT/Qwen2.5/inference.py
code served (permissive licence) · get_code("e73c38d042a613e4")
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 re

_OPT_PAT_V2 = re.compile('(?:^|\\n|\\s)\\(?([A-Z])[\\)\\.\\:]', re.MULTILINE)

def _parse_options_v2(question: str):
    """ A ABCD"""
    if not question:
        return ['A', 'B', 'C', 'D']
    found = set()
    for m in _OPT_PAT_V2.finditer(question):
        found.add(m.group(1))
    letters = []
    for c in range(ord('A'), ord('Z') + 1):
        ch = chr(c)
        if ch in found:
            letters.append(ch)
        else:
            break
    return letters if len(letters) >= 2 else ['A', 'B', 'C', 'D']

def build_answer_instr_v2(question: str) -> str:
    """
    v2 "" direct-answer GRACE 

    
      1. "Answer:" token = features_train_v2.jsonl
          router 
      2. <FINAL_OUTPUT> tag
          token == 
      3. ori GRACE prompt GRACE 
         prompt ""regret
    """
    letters = _parse_options_v2(question)
    letters_str = ', '.join(letters[:-1]) + f', or {letters[-1]}' if len(letters) > 1 else letters[0]
    return f'\nAnswer the multiple-choice question with ONLY the single letter of the correct option ({letters_str}). Do not output any word, punctuation, tag, explanation or whitespace. Your entire response must be exactly one character — the option letter.\nAnswer:'


# Test with various question formats
ARGS = {
    "question": "What is the capital of France?\nA) Paris\nB) Lyon\nC) Marseille\nD) Nice"
}
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
build_transform Ran
ran; our contract draft was wrong, not the code
TencentBAC/LazyMCoT/Internvl/utiles_internvl.py
code served (permissive licence) · get_code("57e95166ade5f25c")
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 Compose. 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 torchvision.transforms as T
from torchvision.transforms.functional import InterpolationMode
from PIL import Image
import numpy as np

torch.manual_seed(0)

# Create a small test image to verify the transform works
test_image_array = np.random.randint(0, 256, (64, 64, 3), dtype=np.uint8)
test_image = Image.fromarray(test_image_array, mode='RGB')

ARGS = {
    'input_size': 224
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose 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
call_grounding_expert Ran
ran; our contract draft was wrong, not the code
TencentBAC/LazyMCoT/Qwen2.5/utiles.py
code served (permissive licence) · get_code("fc36fa0d03b1f887")
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 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 os
import base64
from PIL import Image
import io
import tempfile
import numpy as np

# Create a small test image and save it temporarily
def create_test_image():
    """Create a small PIL image and return its file path"""
    img = Image.new('RGB', (100, 100), color='red')
    temp_file = tempfile.NamedTemporaryFile(delete=False, suffix='.png')
    img.save(temp_file.name)
    temp_file.close()
    return temp_file.name

# Create test image
test_image_path = create_test_image()

# Define ARGS with all parameters for call_grounding_expert
ARGS = {
    'image_path_or_base64': test_image_path,
    'entity_list': ['dog', 'cat', 'bicycle'],
    'expert_url': 'http://localhost:8001/predict',
    'box_threshold': 0.3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, requests — 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
call_grounding_expert_local Ran
ran; our contract draft was wrong, not the code
TencentBAC/LazyMCoT/Qwen2.5/utiles.py
code served (permissive licence) · get_code("db8e58c7121842e5")
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 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
import torch.nn as nn

torch.manual_seed(0)

# The function takes:
# 1. image_path_or_base64: a string (path or base64 encoded image)
# 2. entity_list: a list of entity strings
# 3. gdino_model: optional model (used but checked for None in the function)

# Since the function body just prints a warning and returns a dict,
# we need minimal valid arguments

ARGS = {
    'image_path_or_base64': '/path/to/image.jpg',
    'entity_list': ['cat', 'dog', 'bird'],
    'gdino_model': None
}
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 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
compute_router_v2_features Ran
ran; our contract draft was wrong, not the code
TencentBAC/LazyMCoT/Qwen2.5/inference.py
code served (permissive licence) · get_code("4f3612bd2bd5cd21")
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 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 numpy as np
import math

# Create sample logits for the first token (vocabulary size)
# Using a reasonable vocabulary size like 50257 (GPT-2 size)
vocab_size = 50257
first_logits = np.random.randn(vocab_size).astype(np.float64)

# Create a question with multiple-choice options
question = "What is the capital of France?\n(A) Paris\n(B) London\n(C) Berlin\n(D) Madrid"

# Create a mapping from option letters to token IDs
# We need to map A, B, C, D to actual token IDs in the vocabulary
option_token_ids_all = {
    'A': 317,    # Token ID for 'A'
    'B': 347,    # Token ID for 'B'
    'C': 315,    # Token ID for 'C'
    'D': 360,    # Token ID for 'D'
}

ARGS = {
    'first_logits': first_logits,
    'question': question,
    'option_token_ids_all': option_token_ids_all,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
dynamic_preprocess Ran
ran; our contract draft was wrong, not the code
TencentBAC/LazyMCoT/Internvl/utiles_internvl.py
code served (permissive licence) · get_code("3ff7a3c1eec6ef6c")
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.

from PIL import Image
import torch
import numpy as np

# Create a simple test image using PIL
# The function expects image.size (width, height) and image.resize() method
# Create a small 640x480 RGB image
test_image = Image.new('RGB', (640, 480), color=(255, 0, 0))

ARGS = {
    'image': test_image,
    'min_num': 1,
    'max_num': 12,
    'image_size': 448,
    'use_thumbnail': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, 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
find_closest_aspect_ratio Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
TencentBAC/LazyMCoT/Internvl/utiles_internvl.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from OpenGVLab/MM-NIAH, is pointer only (licence: NONE) · get_code("bd77f5f8067f18e9")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from OpenGVLab/MM-NIAH, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

find_entity_token_indices Ran
ran; our contract draft was wrong, not the code
TencentBAC/LazyMCoT/Qwen2.5/utiles.py
code served (permissive licence) · get_code("0ec3c2d60f8cdba2")
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)

# Build the arguments for find_entity_token_indices

# entity_text: a string with comma-separated entity names
entity_text = "dog, motorcycle with red color, cat"

# dicts: a mapping from token_id to token_text
# The function uses dicts[token_id] to look up token text
dicts = {
    101: "dog",
    102: "motorcycle",
    103: "with",
    104: "red",
    105: "color",
    106: "cat",
    107: "the",
    108: "a",
}

# inputs: model inputs dict with 'input_ids' key
# input_ids should be a 2D tensor where inputs['input_ids'][0] is the token sequence
# The function accesses inputs['input_ids'][0][k].cpu().item()
input_ids = torch.tensor([
    [50, 51, 101, 102, 103, 104, 105, 106, 107, 108, 109]  # batch 1
], dtype=torch.long)

inputs = {
    'input_ids': input_ids
}

# img_end: a list of token indices marking the end of image tokens
# The function uses img_end[-1] + 1 as the start index
img_end = [2]

# min_token_ratio: float threshold for minimum token ratio
min_token_ratio = 0.3

ARGS = {
    'entity_text': entity_text,
    'dicts': dicts,
    'inputs': inputs,
    'img_end': img_end,
    'min_token_ratio': min_token_ratio,
}
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
get_available_gpus Ran
ran, honoured the contract we drafted
TencentBAC/LazyMCoT/Internvl/cycle_inference_internvl.py
code served (permissive licence) · get_code("3cbd0221e03b6e19")
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 subprocess

# This function queries GPU memory using nvidia-smi
# It takes two parameters: max_memory_mb and max_gpus
# Both are simple numeric parameters that control filtering behavior

ARGS = {
    'max_memory_mb': 1000,
    'max_gpus': 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 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_available_gpus Ran
ran, honoured the contract we drafted
TencentBAC/LazyMCoT/Qwen2.5/cycle_infer.py
code served (permissive licence) · get_code("0a4e5b7b6a531990")
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 subprocess

# The function get_available_gpus() takes two parameters:
# - max_memory_mb: an integer representing the maximum memory threshold in MB
# - max_gpus: an optional integer representing the maximum number of GPUs to return

# The function queries nvidia-smi to get GPU memory usage and filters GPUs
# based on the memory threshold. The parameters are simple integers.

ARGS = {
    'max_memory_mb': 1000,
    'max_gpus': 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 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
load_dataset Ran
ran; our contract draft was wrong, not the code
TencentBAC/LazyMCoT/Qwen2.5/Vstar_Metric.py
code served (permissive licence) · get_code("8e2521476d8d70a8")
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 json
import tempfile
import os

# Create a temporary JSON file with a valid list structure
temp_dir = tempfile.mkdtemp()
json_path = os.path.join(temp_dir, "test_data.json")

test_data = [
    {"id": 1, "text": "sample text 1"},
    {"id": 2, "text": "sample text 2"},
    {"id": 3, "text": "sample text 3"}
]

with open(json_path, 'w', encoding='utf-8') as f:
    json.dump(test_data, f)

ARGS = {
    "json_path": json_path
}
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
rotate_half Ran
ran; our contract draft was wrong, not the code
TencentBAC/LazyMCoT/Qwen2.5/modeling_qwen2_5_vl_re_infer.py
code served (permissive licence) · get_code("e03d53ba9d4f9ae5")
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 Tensor, ndim 2, dtype family float, shape (2, 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)

# The function takes a single parameter 'x' which is a tensor
# It accesses x[..., :x.shape[-1] // 2] and x[..., x.shape[-1] // 2:]
# So x needs to be a tensor with a last dimension that can be split in half
# Let's create a small tensor with batch size 2 and feature dimension 4

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 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
unpack_att_result Ran
ran; our contract draft was wrong, not the code
TencentBAC/LazyMCoT/Qwen2.5/inference.py
code served (permissive licence) · get_code("be98428cc9e7a491")
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)

# Based on the function, result_item is a tuple/list with 5-6 elements:
# - img_merged_boxes
# - crop_list
# - words_lines
# - highlight_imgs
# - bounding_boxes
# - hide_highlight_imgs (optional, 6th element)

# The function unpacks these and returns them, so they can be any objects
# Let's create realistic but minimal stand-ins

# Create small tensors for image data
img_merged_boxes = torch.randn(2, 3, 4, 4)  # batch, channels, height, width
crop_list = [torch.randn(1, 3, 8, 8) for _ in range(2)]  # list of cropped images
words_lines = [["word1", "word2"], ["word3"]]  # list of word lists per image
highlight_imgs = [torch.randn(1, 3, 4, 4) for _ in range(2)]  # highlighted regions
bounding_boxes = [[{"x": 10, "y": 20, "w": 30, "h": 40}], [{"x": 5, "y": 15}]]  # bounding box data
hide_highlight_imgs = [torch.randn(1, 3, 4, 4) for _ in range(2)]  # hidden highlights

# Test with 6 elements (full result_item)
result_item_full = (img_merged_boxes, crop_list, words_lines, highlight_imgs, bounding_boxes, hide_highlight_imgs)

# Test with 5 elements (without hide_highlight_imgs)
result_item_short = (img_merged_boxes, crop_list, words_lines, highlight_imgs, bounding_boxes)

ARGS = {
    "result_item": result_item_full
}
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
apply_rotary_pos_emb_vision Not yet run
unverified (harvested, no recorded run)
TencentBAC/LazyMCoT/Qwen2.5/modeling_qwen2_5_vl_re_infer.py
code served (permissive licence) · get_code("049747a79920f0f7")
How it ran

no invocation recorded.

get_conv_template Not yet run
unverified (harvested, no recorded run)
TencentBAC/LazyMCoT/Internvl/conversation.py
code served (permissive licence) · get_code("4b4a1446c2b464c6")
How it ran

no invocation recorded.

merge_json_files Not yet run
unverified (harvested, no recorded run)
TencentBAC/LazyMCoT/Qwen2.5/Vstar_Metric.py
code served (permissive licence) · get_code("2beb8dd1f96cde4d")
How it ran

no invocation recorded.

read_multi_line_json_objects Not yet run
unverified (harvested, no recorded run)
TencentBAC/LazyMCoT/Qwen2.5/Vstar_Metric.py
code served (permissive licence) · get_code("18d3d1616e0f719c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 21 samples lifted from this paper's linked repositories, 21 carry a function identity and 0 do not. Of the 20 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 6 the same month, 3 later) and 14 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
rotate_half 360 other papers
346 dated earlier, 6 the same month, 5 later, 3 undated · 30 only as an assembly brick
1901.02860 (2019-01)
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context
2203.08913 (2022-03)
Memorizing Transformers
2302.13971 (2023-02)
LLaMA: Open and Efficient Foundation Language Models
and 357 more not named here
repeat_kv 243 other papers
233 dated earlier, 6 the same month, 2 later, 2 undated · 22 only as an assembly brick
1901.02860 (2019-01)
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context
2203.08913 (2022-03)
Memorizing Transformers
2305.17888 (2023-05)
LLM-QAT: Data-Free Quantization Aware Training for Large Language Models
and 240 more not named here
get_conv_template 69 other papers
65 dated earlier, 1 the same month, 2 later, 1 undated
1911.03705 (2019-11)
CommonGen: A Constrained Text Generation Challenge for Generative Commonsense Reasoning
2112.05682 (2021-12)
Self-attention Does Not Need $O(n^2)$ Memory
2204.07705 (2022-04)
SUPER-NATURALINSTRUCTIONS: Generalization via Declarative Instructions on 1600+ NLP Tasks
and 66 more not named here
find_closest_aspect_ratio 43 other papers
42 dated earlier, 1 the same month
1910.01108 (2019-10)
DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter
2312.13271 (2023-12)
Repaint123: Fast and High-quality One Image to 3D Generation with Progressive Controllable 2D Repainting
2403.15952 (2024-03)
IllusionVQA: A Challenging Optical Illusion Dataset for Vision Language Models
and 40 more not named here
build_transform 31 other papers
30 dated earlier, 1 the same month
1910.01108 (2019-10)
DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter
2312.13271 (2023-12)
Repaint123: Fast and High-quality One Image to 3D Generation with Progressive Controllable 2D Repainting
2403.15952 (2024-03)
IllusionVQA: A Challenging Optical Illusion Dataset for Vision Language Models
and 28 more not named here
apply_rotary_pos_emb_vision 3 other papers
2 dated earlier, 1 the same month
2502.11494 (2025-02)
Stop Looking for "Important Tokens" in Multimodal Language Models: Duplication Matters More
2506.15220 (2025-06)
video-SALMONN 2: Caption-Enhanced Audio-Visual Large Language Models
2606.15880 (2026-06)
Deep Residual Injection for Full-Spectrum Forensic Signal Perception in Multimodal Large Language Models

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

While Multimodal Large Language Models (MLLMs) excel in cross-modal reasoning, they often struggle to perceive fine-grained details in complex high-resolution images. Recent training-free methods address this through image scaling and localized cropping. However, applying these manipulations indiscriminately introduces computational redundancy for simple queries and can degrade accuracy by truncating essential global context or introducing irrelevant background noise. To this end, we propose LazyMCoT, a dynamic and training-free framework that adaptively allocates visual grounding efforts based on sample difficulty. The framework features an Adaptive Routing mechanism that evaluates predictive uncertainty using first-token statistics from a single forward pass. This efficiently bypasses confident cases while ensuring the recall of difficult samples via conformal calibration. For these challenging cases, a Collaborative Grounding module integrates the inherent cross-modal attention of the model with an external visual expert through a two-stage refinement process. This refinement process generates a precise localized display to recover small or occluded targets. Extensive experiments across diverse benchmarks demonstrate that LazyMCoT rivals training-based approaches by simultaneously improving reasoning accuracy and reducing average inference latency. Our code is availble at https://github.com/TencentBAC/LazyMCoT.

For agents

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

get_harvested_code_for_paper("2606.16158")
get_code_for_paper("2606.16158")
have("2606.16158")

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

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

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

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

Connect an agent — have() is free.