SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.11854 · 2026

Fine-tuning Multi-modal LLMs with ART: Art-based Reinforcement Training

Sergey Alyaev, Michal Chudoba, Petra Galuscakova, Tomasz Wiktorski

arXiv · PDF · Open in the Atlas

Code that ran

11 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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 11 failures of our instrument; 4 no recorded run), measured 2026-11-24; 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.11854.json · badge: /api/ran/2606.11854.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
jinymusim/ART canonical (classifier label)
classifier basis: census
11 ran · 4 no recorded run
FunctionStatusWhere it lives
benchmark_overrides Ran
ran; our contract draft was wrong, not the code
jinymusim/ART/src/reasoning_with_art/config.py
code served (permissive licence) · get_code("3738eecc2c276c96")
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)

# Construct arguments for benchmark_overrides function
# The function takes:
# - settings: dict | None
# - benchmark: str
# And returns a dict by calling (settings or {}).get(benchmark, {})

# We need to provide realistic test cases
settings_with_overrides = {
    "benchmark_1": {"param_a": 10, "param_b": "value1"},
    "benchmark_2": {"learning_rate": 0.001, "epochs": 100},
    "benchmark_3": {}
}

benchmark_name = "benchmark_1"

ARGS = {
    "settings": settings_with_overrides,
    "benchmark": benchmark_name
}
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
benchmark_slug Ran
ran; our contract draft was wrong, not the code
jinymusim/ART/src/reasoning_with_art/config.py
code served (permissive licence) · get_code("ccec131e1096cfc5")
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 torch.nn as nn

# The function takes a string parameter 'b' representing a benchmark slug
# It simply replaces '/' with '_' in the string
# No complex setup needed - just provide a valid string input

ARGS = {
    "b": "openai/gsm8k"
}
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 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
extract_answer_text Ran
ran; our contract draft was wrong, not the code
jinymusim/ART/src/reasoning_with_art/datasets/evaluation/exact_match.py
code served (permissive licence) · get_code("3fff308a9a62cf01")
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

def extract_answer_text(model_output: str, format: str='Answer:') -> str | None:
    """Extract a free-form answer string from model output (DROP, bAbI).

    Returns the text following the last ``format`` marker, up to the end of that
    line (so a trailing rationale on later lines is ignored). Surrounding quotes,
    markdown emphasis and a trailing period are stripped. Returns None when the
    marker is absent.
    """
    pattern = '(?i)' + re.escape(format) + '[ \\t]*(.+)'
    matches = re.findall(pattern, model_output)
    if not matches:
        return None
    answer = matches[-1].strip().strip('"\'`*').strip()
    answer = answer.rstrip('.').strip()
    return answer or None


# Setup code
ARGS = {
    'model_output': 'The model thinks carefully. Answer: 42 is the answer.',
    'format': 'Answer:'
}
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
extract_numeric Ran
ran; our contract draft was wrong, not the code
jinymusim/ART/src/reasoning_with_art/datasets/evaluation/exact_match.py
code served (permissive licence) · get_code("ad5bf662315530bc")
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

def extract_numeric(model_output: str, format: str='Answer:') -> str | None:
    """Extract the final numeric answer from model output.

    Only accepts answers in the explicit format (e.g. "Answer: <number>").
    Returns the last occurrence of the format pattern, or None if not found.
    """
    pattern = '(?i)' + re.escape(format) + '\\s*\\$?\\s*(-?[\\d,\\s]+(?:\\.\\d+)?)\\s*\\$?'
    matches = re.findall(pattern, model_output)
    if matches:
        return re.sub('[,\\s]', '', matches[-1])
    return None


# Setup code to construct valid arguments
ARGS = {
    'model_output': 'The calculation shows that Answer: 42.5 is the result.',
    'format': 'Answer:'
}
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
extract_numeric_loose Ran
ran; our contract draft was wrong, not the code
jinymusim/ART/src/reasoning_with_art/datasets/evaluation/exact_match.py
code served (permissive licence) · get_code("d826b5b1c0e637c6")
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

def extract_numeric_loose(model_output: str) -> str | None:
    """Extract the last number appearing anywhere in the output (no prefix required).

    Looser companion to ``extract_numeric``: used only by training-reward shaping
    to grant a tiny credit when the model produced *some* number but not in the
    required ``Answer: <number>`` format. Returns the cleaned numeric string
    (commas/spaces removed) or None if no number is present.
    """
    matches = re.findall('-?\\d[\\d,\\s]*(?:\\.\\d+)?', model_output)
    if matches:
        return re.sub('[,\\s]', '', matches[-1])
    return None


ARGS = {
    "model_output": "The result is 42,500 units and then 3.14 is also mentioned"
}
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
load_image Ran
ran; our contract draft was wrong, not the code
jinymusim/ART/src/reasoning_with_art/modalities/image.py
code served (permissive licence) · get_code("d20c26a8c4fd692e")
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 bytes. 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 tempfile
from pathlib import Path

# Create a temporary image file with some bytes
with tempfile.NamedTemporaryFile(mode='wb', delete=False, suffix='.png') as f:
    # Write some minimal PNG-like bytes (just raw bytes, doesn't need to be valid)
    f.write(b'\x89PNG\r\n\x1a\n' + b'\x00' * 100)
    temp_image_path = f.name

ARGS = {
    "path": temp_image_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 bytes — a bytes output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a bytes 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
load_image_text_model Ran
ran; our contract draft was wrong, not the code
jinymusim/ART/src/reasoning_with_art/models/model_loading.py
code served (permissive licence) · get_code("5852771cf291fe6d")
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 MockVLMModel. 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 logging

logger = logging.getLogger(__name__)

# Mock the transformers module to avoid network calls
class MockAutoModelForImageTextToText:
    @staticmethod
    def from_pretrained(model_id, **kwargs):
        raise Exception("MockAutoModelForImageTextToText not available")

class MockAutoModelForVision2Seq:
    @staticmethod
    def from_pretrained(model_id, **kwargs):
        class MockVLMModel(torch.nn.Module):
            def __init__(self):
                super().__init__()
                self.linear = torch.nn.Linear(4, 8)
            
            def forward(self, x):
                return self.linear(x)
        
        return MockVLMModel()

# Create a mock transformers module
class MockTransformers:
    AutoModelForImageTextToText = MockAutoModelForImageTextToText
    AutoModelForVision2Seq = MockAutoModelForVision2Seq

import sys
sys.modules['transformers'] = MockTransformers()

ARGS = {
    'model_id': 'gpt2-vision',
    'from_pretrained_kwargs': {
        'torch_dtype': torch.float32,
        'low_cpu_mem_usage': False
    }
}
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 MockVLMModel — a MockVLMModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockVLMModel 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
model_slug Ran
ran; our contract draft was wrong, not the code
jinymusim/ART/src/reasoning_with_art/config.py
code served (permissive licence) · get_code("e2ea59d8ffd7feee")
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
from dataclasses import dataclass, field

@dataclass
class ModelConfig:
    name: str = ''
    backend: str = 'local'
    model_id: str | None = None
    device: str = 'auto'
    dtype: str = 'auto'
    batch_size: int = 8
    max_tokens: int = 32768
    enable_thinking: bool = False
    sampling_params: dict = field(default_factory=dict)
    max_model_len: int | None = None
    vllm_kwargs: dict = field(default_factory=dict)

def model_slug(m: ModelConfig) -> str:
    """e.g. ModelConfig(model_id='Qwen/Qwen3.5-0.8B') -> 'qwen3.5-0.8b'."""
    base = m.model_id
    return base.split('/')[-1].lower()

torch.manual_seed(0)

config = ModelConfig(
    name='test_model',
    backend='local',
    model_id='Qwen/Qwen3.5-0.8B',
    device='cpu',
    dtype='float32',
    batch_size=8,
    max_tokens=32768,
    enable_thinking=False,
    sampling_params={'temperature': 0.7},
    max_model_len=4096,
    vllm_kwargs={'gpu_memory_utilization': 0.9}
)

ARGS = {
    'm': config
}
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 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
register_dataset Ran
ran; our contract draft was wrong, not the code
jinymusim/ART/src/reasoning_with_art/datasets/base.py
code served (permissive licence) · get_code("2f1112429b512a86")
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 function. 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

# Initialize global registry that the decorator uses
DATASET_REGISTRY = {}

# The function takes a single parameter: name (str)
# The decorator it returns registers a class in DATASET_REGISTRY
# To test this, we need to provide a valid string name

ARGS = {
    "name": "mnist"
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
register_model Ran
ran; our contract draft was wrong, not the code
jinymusim/ART/src/reasoning_with_art/models/base.py
code served (permissive licence) · get_code("86d8604bdec33355")
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 function. 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

# Initialize the model registry
MODEL_REGISTRY = {}

# Define a small test model class
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Setup for register_model function
ARGS = {
    "name": "test_model"
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
strip_thinking Ran
ran; our contract draft was wrong, not the code
jinymusim/ART/src/reasoning_with_art/models/local_client.py
code served (permissive licence) · get_code("f55e465a133b6b13")
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

_THINK_RE = re.compile('<think>.*?</think>\\s*', re.DOTALL)

def strip_thinking(text: str) -> str:
    """Remove <think>...</think> blocks from model output (e.g. Qwen3.5 reasoning)."""
    return _THINK_RE.sub('', text).strip()

# Construct test arguments
ARGS = {
    'text': '<think>This is reasoning</think>\n\nThis is the output.'
}
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
apply_chat_template Not yet run
unverified (harvested, no recorded run)
jinymusim/ART/src/reasoning_with_art/models/chat_template.py
code served (permissive licence) · get_code("8c6d5abeff384032")
How it ran

no invocation recorded.

load_processor Not yet run
unverified (harvested, no recorded run)
jinymusim/ART/src/reasoning_with_art/models/model_loading.py
code served (permissive licence) · get_code("9f394ef2b0e29eb6")
How it ran

no invocation recorded.

numeric_reward Not yet run
unverified (harvested, no recorded run)
jinymusim/ART/src/reasoning_with_art/datasets/evaluation/reward_shaping.py
code served (permissive licence) · get_code("a7ea8eef39586799")
How it ran

no invocation recorded.

template_supports_thinking Not yet run
unverified (harvested, no recorded run)
jinymusim/ART/src/reasoning_with_art/models/chat_template.py
code served (permissive licence) · get_code("6c56b9126d1ce712")
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, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 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
register_dataset 1 other paper
1 dated earlier
2604.20357 (2026-04)
SignDATA: Data Pipeline for Sign Language Translation

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

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

Abstract

There are two main Parameter-Efficient Fine-Tuning (PEFT) techniques for Large Language Models (LLMs). While Low-Rank Adaptation (LoRA) introduces additional weights between the LLM layers, Soft Prompting introduces additional fine-tuning-specific raw tokens to an LLM input. However, both require modification to the computational graphs of precompiled, preoptimized LLMs. As a result, neither is fully supported in high-throughput engines like vLLM. We propose fine-tuning with ART (Art-based Reinforcement Training). The method injects information into a frozen Multimodal Large Language Model (MLLM) by optimizing only its raw visual input, thus enabling the softtoken approach on pre-compiled computational graphs. It relies on backpropagation of gradients back into a plain pixel array and thus supports any fine-tuning objective. Moreover, the optimized visual input can be stylized as task-relevant computational artworks. The approach's effectiveness is confirmed for different sizes of a popular open Qwen architecture and for several textual benchmarks. Specifically, ART reaches accuracy competitive with LoRA across mathematics and structuredtool-use benchmarks. Code will be available at https://github.com/jinymusim/ART upon acceptance.

For agents

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

get_harvested_code_for_paper("2606.11854")
get_code_for_paper("2606.11854")
have("2606.11854")

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

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

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

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

Connect an agent — have() is free.