SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2404.13013 · ECCV · 2024

Groma: Localized Visual Tokenization for Grounding Multimodal Large Language Models

Xiaojuan Qi, Yi Jiang, Zehuan Yuan, Chuofan Ma, Jiannan Wu

arXiv · PDF · Open in the Atlas

Code that ran

6 of 9 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, 2 violated it and 0 have no contract verdict; 2 failures of our instrument; 3 no recorded run), measured 2026-11-22; 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/2404.13013.json · badge: /api/ran/2404.13013.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
FoundationVision/Groma canonical (classifier label)
classifier basis: census
6 ran · 3 no recorded run
FunctionStatusWhere it lives
align_tensor Ran
ran, honoured the contract we drafted
FoundationVision/Groma/groma/model/roi_align.py
code served (permissive licence) · get_code("af6df62850536230")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (3, 7, 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)

# Create a list of tensors with different lengths to test align_tensor
# Each tensor has shape (length, feature_dim) where feature_dim=4
inputs = [
    torch.randn(5, 4),      # First tensor: 5 timesteps, 4 features
    torch.randn(3, 4),      # Second tensor: 3 timesteps, 4 features
    torch.randn(7, 4),      # Third tensor: 7 timesteps, 4 features
]

ARGS = {
    "inputs": inputs,
    "max_len": None,  # Will be computed as max of lengths (7 in this case)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (3, 7, 4) — shape (3, 7, 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
coordinate_to_encoding Ran
ran; our contract draft was wrong, not the code
FoundationVision/Groma/groma/model/roi_align.py
code served (permissive licence) · get_code("77950a821bd7955f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (2, 3, 256) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import math
import torch

torch.manual_seed(0)

# Test case 1: 2D coordinates (batch_size=2, num_coords=3, coord_dim=2)
coord_tensor_2d = torch.randn(2, 3, 2)

# Test case 2: 4D coordinates (batch_size=2, num_coords=3, coord_dim=4)
coord_tensor_4d = torch.randn(2, 3, 4)

ARGS = {
    "coord_tensor": coord_tensor_2d,
    "num_feats": 128,
    "temperature": 10000,
    "scale": 2 * math.pi,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 3, 256) — shape (2, 3, 256) 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
custom_collate_fn Ran
ran; our contract draft was wrong, not the code
FoundationVision/Groma/groma/eval/model_refcocog.py
code served (permissive licence) · get_code("2a8d2d5ef535755e")
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

torch.manual_seed(0)

# Construct a batch with a single item (since the function asserts len(batch) == 1)
batch = [
    {
        'input_ids': torch.tensor([101, 2054, 2003, 102]),  # Small token sequence
        'image': torch.randn(3, 4, 5),  # 3D tensor (channels, height, width)
        'image_id': 42,
        'bboxes': torch.tensor([[10, 20, 30, 40], [50, 60, 70, 80]], dtype=torch.float32)  # 2 bboxes with 4 coords
    }
]

ARGS = {
    'batch': batch
}
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
parse_score Ran
ran, violated the contract we drafted
FoundationVision/Groma/groma/eval/eval_gpt_review_visual.py
code served (permissive licence) · get_code("763f6fe20bd52fbb")
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 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.

# Setup code for parse_score function

ARGS = {
    'review': "4.5 3.2\nThis is a great product with excellent quality."
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
str2spi Ran
ran, honoured the contract we drafted
FoundationVision/Groma/groma/model/roi_align.py
code served (permissive licence) · get_code("79307b0c7bfc9b57")
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 re

def str2spi(input_str):
    bbox_regex = '<bbox>\\s*(\\d+)\\s*(\\d+)\\s*(\\d+)\\s*(\\d+)\\s*</bbox>'
    results = []
    matches = re.findall(bbox_regex, input_str)
    for match in matches:
        results.append([float(match[0]), float(match[1]), float(match[2]), float(match[3])])
    return results


# Construct valid arguments for str2spi
input_str = """
Some text here with bounding boxes.
<bbox> 10 20 30 40 </bbox>
More text.
<bbox>100 200 300 400</bbox>
And another one:
<bbox>   5   15   25   35   </bbox>
"""

ARGS = {
    "input_str": input_str
}
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 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
violates_moderation Ran
ran, violated the contract we drafted
FoundationVision/Groma/groma/utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from Mi3-Lab/doScenes-VLM-Planning, is pointer only (licence: AGPL-3.0) · get_code("f9939a84b9a65279")
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 Mi3-Lab/doScenes-VLM-Planning, and AGPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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.

get_eval Not yet run
unverified (harvested, no recorded run)
FoundationVision/Groma/groma/eval/eval_gpt_review_visual.py
code served (permissive licence) · get_code("55b3991e52737846")
How it ran

no invocation recorded.

load_model Not yet run
unverified (harvested, no recorded run)
FoundationVision/Groma/groma/serve/model_worker.py
code served (permissive licence) · get_code("f78ec6fd3d821f61")
How it ran

no invocation recorded.

pretty_print_semaphore Not yet run
unverified (harvested, no recorded run)
FoundationVision/Groma/groma/utils.py
code served (permissive licence) · get_code("37899f22fb191b37")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 3 the same month, 5 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
violates_moderation 56 other papers
21 dated earlier, 2 the same month, 32 later, 1 same year, order not determinable
2106.06909 (2021-06)
GigaSpeech: An Evolving, Multi-domain ASR Corpus with 10,000 Hours of Transcribed Audio
2308.03279 (2023-08)
UniversalNER: TARGETED DISTILLATION FROM LARGE LANGUAGE MODELS FOR OPEN NAMED ENTITY RECOGNITION
2308.13437 (2023-08)
Position-Enhanced Visual Instruction Tuning for Multimodal Large Language Models
and 53 more not named here
pretty_print_semaphore 54 other papers
19 dated earlier, 2 the same month, 32 later, 1 same year, order not determinable
2106.06909 (2021-06)
GigaSpeech: An Evolving, Multi-domain ASR Corpus with 10,000 Hours of Transcribed Audio
2308.13437 (2023-08)
Position-Enhanced Visual Instruction Tuning for Multimodal Large Language Models
2309.07120 (2023-09)
Sight Beyond Text: Multi-Modal Training Enhances LLMs in Truthfulness and Ethics
and 51 more not named here
parse_score 27 other papers
11 dated earlier, 1 the same month, 15 later
2309.09958 (2023-09)
An Empirical Study of Scaling Instruct-Tuned Large Multimodal Models
2310.03744 (2023-10)
Improved Baselines with Visual Instruction Tuning
2312.03818 (2023-12)
Alpha-CLIP: A CLIP Model Focusing on Wherever You Want
and 24 more not named here
align_tensor 2 other papers
1 dated earlier, 1 later
2307.03601 (2023-07)
GPT4RoI: Instruction Tuning Large Language Model on Region-of-Interest
2605.13178 (2026-05)
CLIP Tricks You: Training-free Token Pruning for Efficient Pixel Grounding in Large Vision-Language Models
coordinate_to_encoding 2 other papers
1 dated earlier, 1 later
2307.03601 (2023-07)
GPT4RoI: Instruction Tuning Large Language Model on Region-of-Interest
2605.13178 (2026-05)
CLIP Tricks You: Training-free Token Pruning for Efficient Pixel Grounding in Large Vision-Language Models
str2spi 1 other paper
1 dated earlier
2307.03601 (2023-07)
GPT4RoI: Instruction Tuning Large Language Model on Region-of-Interest

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

Repositories linked to this paper

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

Abstract

We introduce Groma, a Multimodal Large Language Model (MLLM) with grounded and fine-grained visual perception ability. Beyond holistic image understanding, Groma is adept at region-level tasks such as region captioning and visual grounding. Such capabilities are built upon a localized visual tokenization mechanism, where an image input is decomposed into regions of interest and subsequently encoded into region tokens. By integrating region tokens into user instructions and model responses, we seamlessly enable Groma to understand userspecified region inputs and ground its textual output to images. Besides, to enhance the grounded chat ability of Groma, we curate a visually grounded instruction dataset by leveraging the powerful GPT-4V and visual prompting techniques. Compared with MLLMs that rely on the language model or external module for localization, Groma consistently demonstrates superior performances in standard referring and grounding benchmarks, highlighting the advantages of embedding localization into image tokenization. Project page: https://groma-mllm.github.io/.

For agents

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

get_harvested_code_for_paper("2404.13013")
get_code_for_paper("2404.13013")
have("2404.13013")

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

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

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

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

Connect an agent — have() is free.