SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2401.10727 · 2024

MLLM-Tool: A Multimodal Large Language Model For Tool Agent Learning

arXiv · PDF · Open in the Atlas

Code that ran

8 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 3 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 3 no recorded run), measured 2026-11-23; 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/2401.10727.json · badge: /api/ran/2401.10727.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
mllm-tool/mllm-tool canonical (classifier label)
classifier basis: census
8 ran · 3 no recorded run
FunctionStatusWhere it lives
apply_rotary_pos_emb Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mllm-tool/mllm-tool/code/model/modeling_llama.py
code served (permissive licence) · get_code("9b4dff79d5e6102c")
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, ndim 5, 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

torch.manual_seed(0)

# Analyze the function to understand tensor shapes:
# q, k: used in element-wise operations with cos, sin
# cos, sin: gathered using position_ids, shape [batch, heads, seq_len, dim]
# position_ids: shape [batch, seq_len], used to gather from cos/sin at dim 2

batch_size = 2
num_heads = 3
seq_len = 4
head_dim = 4

# q and k: [batch, heads, seq_len, head_dim]
q = torch.randn(batch_size, num_heads, seq_len, head_dim)
k = torch.randn(batch_size, num_heads, seq_len, head_dim)

# cos and sin: [1, heads, seq_len, head_dim] (will be repeated to batch_size)
cos = torch.randn(1, num_heads, seq_len, head_dim)
sin = torch.randn(1, num_heads, seq_len, head_dim)

# position_ids: [batch, seq_len] with values in range [0, seq_len)
position_ids = torch.tensor([
    [0, 1, 2, 3],
    [0, 1, 2, 3]
], dtype=torch.long)

ARGS = {
    "q": q,
    "k": k,
    "cos": cos,
    "sin": sin,
    "position_ids": position_ids,
}
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, ndim 5, 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
build_one_instance Ran
ran; our contract draft was wrong, not the code
mllm-tool/mllm-tool/code/model/openllama.py
code served (permissive licence) · get_code("ef0c6cef58b1e328")
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
from transformers import AutoTokenizer

# Create a minimal tokenizer stand-in that mimics the tokenizer interface
class MinimalTokenizer:
    def __call__(self, text, add_special_tokens=False):
        # Return a simple object with input_ids attribute
        # Split text into tokens (simple whitespace split for testing)
        tokens = text.split()
        return type('TokenizerOutput', (), {'input_ids': list(range(len(tokens)))})()

# Create the conversation structure as expected by the function
conversation = [
    {
        'from': 'human',
        'input_modality': 'text',
        'value': 'What is 2+2?'
    },
    {
        'from': 'gpt',
        'value': 'add(2, 2)'
    }
]

# Create tokenizer instance
tokenizer = MinimalTokenizer()

ARGS = {
    'tokenizer': tokenizer,
    'conversation': conversation
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — 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_clip_timepoints Ran
ran, honoured the contract we drafted
mllm-tool/mllm-tool/code/model/ImageBind/data.py
code served (permissive licence) · get_code("432c312da80537d6")
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 2, 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 numpy as np

# Stand-in clip sampler class that mimics the behavior of a clip sampler
class MockClipSampler:
    def __init__(self, num_clips=3):
        self.num_clips = num_clips
        self.call_count = 0
    
    def __call__(self, end, duration, annotation=None):
        # Returns (start, end, _, _, is_last_clip)
        # The function calls this repeatedly until is_last_clip is True
        clip_duration = duration / self.num_clips
        start = self.call_count * clip_duration
        end = start + clip_duration
        is_last_clip = (self.call_count == self.num_clips - 1)
        
        self.call_count += 1
        
        # Return 5 values: start, end, and three underscores (unused)
        return start, end, None, None, is_last_clip

# Create the clip sampler
clip_sampler = MockClipSampler(num_clips=3)

# Duration in seconds
duration = 10.0

ARGS = {
    "clip_sampler": clip_sampler,
    "duration": duration
}
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 list, ndim 2, 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_obj_from_str Ran
ran; our contract draft was wrong, not the code
mllm-tool/mllm-tool/code/dataset/utils.py
code served (permissive licence) · get_code("221b2d116fdf1032")
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 type. 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 importlib
import torch
import torch.nn as nn

torch.manual_seed(0)

# The function get_obj_from_str takes a string like "module.path.ClassName"
# and returns the class/object by:
# 1. Splitting on the last dot to get module path and class name
# 2. Optionally reloading the module if reload=True
# 3. Importing the module and getting the attribute (class/object)

# We need to provide:
# - string: a valid module.class path that exists
# - reload: boolean flag

# Using a built-in class that's guaranteed to exist
string_value = "torch.nn.Linear"
reload_value = False

ARGS = {
    "string": string_value,
    "reload": reload_value,
}
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 type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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
get_questions Ran
ran; our contract draft was wrong, not the code
mllm-tool/mllm-tool/code/inference.py
code served (permissive licence) · get_code("899cb7d14116e83d")
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 tempfile
import os

# Create a temporary file with sample question data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write('{"question": "What is 2+2?", "id": 1}\n')
temp_file.write('{"question": "What is the capital of France?", "id": 2}\n')
temp_file.write('{"question": "What is machine learning?", "id": 3}\n')
temp_file.close()

question_file_path = temp_file.name

ARGS = {
    'question_file': question_file_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
load_and_transform_vision_data Ran
ran, honoured the contract we drafted
mllm-tool/mllm-tool/code/model/ImageBind/data.py
code served (permissive licence) · get_code("e1e69d9ba9ffcb24")
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 4, 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
from PIL import Image
import io

# Create a small dummy image in memory
def create_dummy_image():
    img = Image.new('RGB', (224, 224), color=(73, 109, 137))
    img_bytes = io.BytesIO()
    img.save(img_bytes, format='PNG')
    img_bytes.seek(0)
    return img_bytes.getvalue()

# Create temporary image files (in-memory approach)
import tempfile
import os

# Create a temporary directory and files
temp_dir = tempfile.mkdtemp()
image_paths = []

for i in range(2):
    img_path = os.path.join(temp_dir, f"test_image_{i}.png")
    img = Image.new('RGB', (256, 256), color=(73 + i*10, 109 + i*10, 137 + i*10))
    img.save(img_path)
    image_paths.append(img_path)

device = 'cpu'

ARGS = {
    'image_paths': image_paths,
    'device': device
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch, torchvision — 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 — no output shape is stated: observe_signature.py could not observe it (call:ValueError)
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
process_batch_instance Ran
ran, honoured the contract we drafted
mllm-tool/mllm-tool/code/model/openllama.py
code served (permissive licence) · get_code("cfb25e6ab8ddf8db")
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 int; 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
from transformers import AutoTokenizer

torch.manual_seed(0)

# Create a minimal tokenizer stand-in
class MinimalTokenizer:
    def __init__(self):
        self.pad_token_id = 0
    
    def __call__(self, text, add_special_tokens=False):
        # Simple mock tokenizer: return a fixed-size token sequence
        # In reality, this would tokenize text
        class TokenizerOutput:
            def __init__(self, input_ids):
                self.input_ids = input_ids
        
        # Return a consistent but variable-length sequence based on text length
        num_tokens = max(2, len(text.split()) + 1)
        return TokenizerOutput(list(range(1, num_tokens + 1)))

tokenizer = MinimalTokenizer()

# Create sample conversations
conversation_1 = [
    {
        'from': 'human',
        'input_modality': 'text',
        'value': 'What is the weather?'
    },
    {
        'from': 'gpt',
        'value': 'sunny'
    }
]

conversation_2 = [
    {
        'from': 'human',
        'input_modality': 'image',
        'value': 'Describe this image'
    },
    {
        'from': 'gpt',
        'value': 'cat'
    }
]

batch_of_conversations = [conversation_1, conversation_2]
max_tgt_len = 32

ARGS = {
    'tokenizer': tokenizer,
    'batch_of_conversations': batch_of_conversations,
    'max_tgt_len': max_tgt_len
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — 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 int — 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
rotate_half Ran
ran; our contract draft was wrong, not the code
mllm-tool/mllm-tool/code/model/modeling_llama.py
code served (permissive licence) · get_code("b99eea6376d1e212")
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 rotate_half takes a single parameter 'x' which is a tensor
# It accesses x.shape[-1] to get the last dimension
# It uses indexing with [..., :] slicing notation
# It calls torch.cat() to concatenate tensors

# Create a small tensor with shape (2, 4) - batch size 2, hidden dim 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
instantiate_from_config Not yet run
unverified (harvested, no recorded run)
mllm-tool/mllm-tool/code/dataset/utils.py
code served (permissive licence) · get_code("ef52d142b2c30ac2")
How it ran

no invocation recorded.

predict Not yet run
unverified (harvested, no recorded run)
mllm-tool/mllm-tool/code/inference.py
code served (permissive licence) · get_code("a5ae1f5220848590")
How it ran

no invocation recorded.

run_eval Not yet run
unverified (harvested, no recorded run)
mllm-tool/mllm-tool/code/inference.py
code served (permissive licence) · get_code("22a14acf7a13a6b0")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 8 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 3 the same month, 7 later) and 3 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
58 dated earlier, 9 the same month, 284 later, 6 same year, order not determinable, 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
get_obj_from_str 54 other papers
21 dated earlier, 2 the same month, 30 later, 1 same year, order not determinable · 12 only as an assembly brick
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2102.05379 (2021-02)
Argmax Flows and Multinomial Diffusion: Learning Categorical Distributions
2112.00384 (2021-12)
Exploration into Translation-Equivariant Image Quantization
and 51 more not named here
apply_rotary_pos_emb 47 other papers
25 dated earlier, 19 later, 3 same year, order not determinable
2305.14167 (2023-05)
DetGPT: Detect What You Need via Reasoning
2305.16103 (2023-05)
ChatBridge: Bridging Modalities with Large Language Model as a Language Catalyst
2305.16355 (2023-05)
PandaGPT: One Model To Instruction-Follow Them All
and 44 more not named here
instantiate_from_config 24 other papers
9 dated earlier, 1 the same month, 14 later · 7 only as an assembly brick
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2102.05379 (2021-02)
Argmax Flows and Multinomial Diffusion: Learning Categorical Distributions
2206.02262 (2022-06)
Diffusion-GAN: Training GANs with Diffusion
and 21 more not named here
get_clip_timepoints 6 other papers
3 dated earlier, 3 later
2305.16355 (2023-05)
PandaGPT: One Model To Instruction-Follow Them All
2309.00615 (2023-09)
Point-Bind & Point-LLM: Aligning Point Cloud with Multi-modality for 3D Understanding, Generation, and Instruction Following
2310.01852 (2023-10)
LanguageBind: Extending Video-Language Pretraining to N-modality by Language-based Semantic Alignment
and 3 more not named here
load_and_transform_vision_data 5 other papers
2 dated earlier, 3 later
2305.16355 (2023-05)
PandaGPT: One Model To Instruction-Follow Them All
2309.00615 (2023-09)
Point-Bind & Point-LLM: Aligning Point Cloud with Multi-modality for 3D Understanding, Generation, and Instruction Following
2403.02969 (2024-03)
Multi-modal Instruction Tuned LLMs with Fine-grained Visual Perception
and 2 more not named here
get_questions 2 other papers
2 later
2404.06921 (2024-04)
GoEX: Perspectives and Designs Towards a Runtime for Autonomous LLM Applications
2605.20075 (2026-05)
CopT: Contrastive On-Policy Thinking with Continuous Spaces for General and Agentic Reasoning
process_batch_instance 2 other papers
2 dated earlier
2305.16355 (2023-05)
PandaGPT: One Model To Instruction-Follow Them All
2308.15366 (2023-08)
AnomalyGPT: Detecting Industrial Anomalies Using Large Vision-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

Recently, the astonishing performance of large language models (LLMs) in natural language comprehension and generation tasks triggered lots of exploration of using them as central controllers to build agent systems. Multiple studies focus on bridging the LLMs to external tools to extend the application scenarios. However, the current LLMs' ability to perceive tool use is limited to a single text query, which may result in ambiguity in understanding the users' real intentions. LLMs are expected to eliminate that by perceiving the information in the visual- or auditory-grounded instructions. Therefore, in this paper, we propose MLLM-Tool, a system incorporating open-source LLMs and multi-modal encoders so that the learned LLMs can be conscious of multi-modal input instruction and then select the function-matched tool correctly. To facilitate the evaluation of the model's capability, we collect a dataset featuring multi-modal input tools from HuggingFace. Another essential feature of our dataset is that it also contains multiple potential choices for the same instruction due to the existence of identical functions and synonymous functions, which provides more potential solutions for the same query. The experiments reveal that our MLLM-Tool is capable of recommending appropriate tools for multi-modal instructions. Codes and data are available at https://github.com/MLLM-Tool/MLLM-Tool.

For agents

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

get_harvested_code_for_paper("2401.10727")
get_code_for_paper("2401.10727")
have("2401.10727")

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

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

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

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

Connect an agent — have() is free.