SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2408.12928 · 2024

ParGo: Bridging Vision-Language with Partial and Global Views

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; 0 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 7 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/2408.12928.json · badge: /api/ran/2408.12928.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
bytedance/pargo canonical (classifier label)
classifier basis: census
8 ran · 3 no recorded run
FunctionStatusWhere it lives
bertTokenizer Ran
ran; our contract draft was wrong, not the code
bytedance/pargo/pargo/backbone/language/tokenizer.py
code served (permissive licence) · get_code("09380b456c8170e0")
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 BertTokenizer. 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 tempfile
import shutil
from pathlib import Path

# Create a minimal mock BERT model directory structure
mock_bert_dir = tempfile.mkdtemp()

# Create necessary files for a minimal BERT tokenizer
vocab_file = os.path.join(mock_bert_dir, 'vocab.txt')
with open(vocab_file, 'w') as f:
    # Write minimal vocab
    vocab_words = ['[PAD]', '[UNK]', '[CLS]', '[SEP]', '[MASK]', 
                   'the', 'a', 'and', 'or', 'in', 'is', 'are',
                   '你', '好', '世', '界', '中', '文']
    f.write('\n'.join(vocab_words))

# Create a minimal config.json
config_file = os.path.join(mock_bert_dir, 'config.json')
with open(config_file, 'w') as f:
    f.write('{"model_type": "bert", "vocab_size": 21128}')

# Create tokenizer_config.json
tokenizer_config_file = os.path.join(mock_bert_dir, 'tokenizer_config.json')
with open(tokenizer_config_file, 'w') as f:
    f.write('{"do_lower_case": true}')

ARGS = {
    'bert_type': mock_bert_dir,
    'use_jieba': False,
    'do_lower_case': True,
    'root': '',
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jieba, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type BertTokenizer — a BertTokenizer output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a BertTokenizer 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_itm Ran
ran; our contract draft was wrong, not the code
bytedance/pargo/pargo/backbone/fusion/blip2.py
code served (permissive licence) · get_code("8d2a5d47063ea17a")
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 1, dtype family float, shape (2,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Build minimal mock model with required attributes and methods
class MockBert(nn.Module):
    def __init__(self):
        super().__init__()
    
    def forward(self, text_ids, query_embeds=None, attention_mask=None, 
                encoder_hidden_states=None, encoder_attention_mask=None, 
                return_dict=False):
        # Return mock output with last_hidden_state
        batch_size = text_ids.shape[0]
        seq_len = query_embeds.shape[1] + text_ids.shape[1]  # query tokens + text tokens
        hidden_dim = 4
        
        class Output:
            def __init__(self, last_hidden_state):
                self.last_hidden_state = last_hidden_state
        
        last_hidden_state = torch.randn(batch_size, seq_len, hidden_dim)
        return Output(last_hidden_state)

class MockITMHead(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 2)
    
    def forward(self, x):
        # x shape: (batch_size, num_tokens, hidden_dim)
        # return shape: (batch_size, num_tokens, 2) for binary classification
        return self.linear(x)

class MockParGo(nn.Module):
    def __init__(self):
        super().__init__()
        self.bert = MockBert()

class MockModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.query_tokens = nn.Parameter(torch.randn(1, 3, 4))  # (1, num_query_tokens, hidden_dim)
        self.ParGo = MockParGo()
        self.itm_head = MockITMHead()

# Construct arguments
model = MockModel()

# image_inputs: (batch_size, num_patches, hidden_dim)
image_inputs = torch.randn(2, 5, 4)

# text_ids: (batch_size, text_seq_len)
text_ids = torch.randint(0, 100, (2, 6))

# text_atts: (batch_size, text_seq_len)
text_atts = torch.ones(2, 6, dtype=torch.long)

ARGS = {
    "model": model,
    "image_inputs": image_inputs,
    "text_ids": text_ids,
    "text_atts": text_atts,
}
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 1, dtype family float, shape (2,) — shape (2,) 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
create_position_ids_from_input_ids Ran
ran; our contract draft was wrong, not the code
bytedance/pargo/pargo/backbone/language/xlm_roberta.py
pointer only (licence: BSD-3-Clause); the stored copy get_code serves, from Kowsher/Propulsion, is pointer only (licence: NONE) · get_code("38f46ef4e03fee1c")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-3-Clause), but get_code serves the stored copy, first harvested from Kowsher/Propulsion, 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.

disabled_train Ran
ran, violated the contract we drafted
bytedance/pargo/pargo/backbone/fusion/minigpt.py
code served (permissive licence) · get_code("4cb732f513d69dfd")
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 SimpleModel. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

model = SimpleModel()

ARGS = {
    "self": model,
    "mode": True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SimpleModel — a SimpleModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleModel 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
encode_img Ran
ran; our contract draft was wrong, not the code
bytedance/pargo/pargo/backbone/fusion/minigpt.py
code served (permissive licence) · get_code("6f022e25aeb2e11a")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal visual encoder that returns all features
class MinimalVisualEncoder(nn.Module):
    def forward(self, image, return_all_features=False):
        # Input: [bs, 3, H, W]
        # Output: [bs, num_patches + 1, hidden_size]
        bs = image.shape[0]
        num_patches = 16  # Simulating a 4x4 patch grid + 1 cls token
        hidden_size = 12
        return torch.randn(bs, num_patches + 1, hidden_size)

# Create a minimal layer norm
class MinimalLayerNorm(nn.Module):
    def forward(self, x):
        # Just return input as-is (or apply basic normalization)
        return x

# Create a minimal LLM projection layer
class MinimalLLMProj(nn.Module):
    def forward(self, x):
        # Input: [bs, pn/window_size, hs*window_size]
        # Output: [bs, pn/window_size, proj_dim]
        return x

# Set up the components
visual_encoder = MinimalVisualEncoder()
ln_vision = MinimalLayerNorm()
llm_proj = MinimalLLMProj()

# Create a sample image tensor
# Shape: [batch_size, channels, height, width]
batch_size = 2
channels = 3
height = 32
width = 32
image = torch.randn(batch_size, channels, height, width)

# Define window_size parameter
window_size = 4

# Construct ARGS dictionary with all parameters
ARGS = {
    "visual_encoder": visual_encoder,
    "ln_vision": ln_vision,
    "llm_proj": llm_proj,
    "image": image,
    "window_size": window_size,
}
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
maybe_autocast Ran
ran; our contract draft was wrong, not the code
bytedance/pargo/pargo/backbone/fusion/minigpt.py
code served (permissive licence) · get_code("014a05d25d682eb3")
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 autocast. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 contextlib

torch.manual_seed(0)

ARGS = {
    "dtype": torch.float16
}
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 autocast — a autocast output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a autocast 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
split_into_patches Ran
ran; our contract draft was wrong, not the code
bytedance/pargo/eval/init_models.py
code served (permissive licence) · get_code("92e88aa752ef7f19")
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 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)

# Create a small batch of images with shape (B, C, H, W)
# B=2 (batch size), C=4 (channels), H=448 (height), W=448 (width)
# This allows for 2x2 patches of size 224x224
tensor = torch.randn(2, 4, 448, 448)

ARGS = {
    "tensor": tensor,
    "patch_size": 224,
}
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 list, ndim 5, 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
t5TokenizerFast Ran
ran; our contract draft was wrong, not the code
bytedance/pargo/pargo/backbone/language/tokenizer.py
code served (permissive licence) · get_code("5790f409b12a5693")
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 MockT5TokenizerFast. 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 unittest.mock import MagicMock, patch

torch.manual_seed(0)

# Create a mock T5TokenizerFast that mimics the real tokenizer
class MockT5TokenizerFast:
    def __init__(self, *args, **kwargs):
        self.vocab_size = 32128
        self.model_max_length = 512
    
    @classmethod
    def from_pretrained(cls, model_name, **kwargs):
        return cls(**kwargs)

# Mock the T5TokenizerFast.from_pretrained to avoid network calls
def mock_from_pretrained(model_name, **kwargs):
    return MockT5TokenizerFast()

# Patch T5TokenizerFast in the transformers module
import sys
from unittest.mock import MagicMock
import transformers.models.t5.tokenization_t5_fast as t5_fast_module

t5_fast_module.T5TokenizerFast.from_pretrained = mock_from_pretrained

# Define the arguments for t5TokenizerFast function
ARGS = {
    "t5_model": "t5-base",
}
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 MockT5TokenizerFast — a MockT5TokenizerFast output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockT5TokenizerFast 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
all_gather_with_grad Not yet run
unverified (harvested, no recorded run)
bytedance/pargo/pargo/utils/disttools.py
code served (permissive licence) · get_code("0ec9fc2025c16f65")
How it ran

no invocation recorded.

autoTokenizerBlip Not yet run
unverified (harvested, no recorded run)
bytedance/pargo/pargo/backbone/language/tokenizer.py
code served (permissive licence) · get_code("b5443bddb79c822e")
How it ran

no invocation recorded.

concat_all_gather Not yet run
unverified (harvested, no recorded run)
bytedance/pargo/pargo/utils/disttools.py
code served (permissive licence) · get_code("73cecca9f3575f09")
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, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 2 the same month, 4 later) and 7 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
disabled_train 173 other papers
131 dated earlier, 3 the same month, 31 later, 8 same year, order not determinable · 5 only as an assembly brick
2012.09841 (2020-12)
Taming Transformers for High-Resolution Image Synthesis
2102.05379 (2021-02)
Argmax Flows and Multinomial Diffusion: Learning Categorical Distributions
2104.07652 (2021-04)
Geometry-Free View Synthesis: Transformers and no 3D Priors
and 170 more not named here
concat_all_gather 138 other papers
116 dated earlier, 19 later, 3 same year, order not determinable · 33 only as an assembly brick
1710.09412 (2017-10)
mixup: BEYOND EMPIRICAL RISK MINIMIZATION
1905.04899 (2019-05)
CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Features
1905.12794 (2019-05)
Fashion IQ: A New Dataset Towards Retrieving Images by Natural Language Feedback
and 135 more not named here
all_gather_with_grad 91 other papers
68 dated earlier, 2 the same month, 17 later, 4 same year, order not determinable · 2 only as an assembly brick
2206.02967 (2022-06)
Masked Unsupervised Self-training for Label-free Image Classification
2210.08773 (2022-10)
Plug-and-Play VQA: Zero-shot VQA by Conjoining Large Pretrained Models with Zero Training
2302.06605 (2023-02)
UniAdapter: Unified Parameter-Efficient Transfer Learning for Cross-modal Modeling
and 88 more not named here
create_position_ids_from_input_ids 28 other papers
22 dated earlier, 3 later, 3 same year, order not determinable
2107.00910 (2021-07)
Learned Token Pruning for Transformers
2107.14035 (2021-07)
ProtoTransformer: A Meta-Learning Approach to Providing Student Feedback
2201.11732 (2022-01)
IGLUE: A Benchmark for Transfer Learning across Modalities, Tasks, and Languages
and 25 more not named here

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

This work presents ParGo, a novel Partial-Global projector designed to connect the vision and language modalities for Multimodal Large Language Models (MLLMs). Unlike previous works that rely on global attention-based projectors, our ParGo bridges the representation gap between the separately pre-trained vision encoders and the LLMs by integrating global and partial views, which alleviates the overemphasis on prominent regions. To facilitate the effective training of ParGo, we collect a large-scale detail-captioned image-text dataset named ParGoCap-1M-PT, consisting of 1 million images paired with high-quality captions. Extensive experiments on several MLLM benchmarks demonstrate the effectiveness of our ParGo, highlighting its superiority in aligning vision and language modalities. Compared to conventional Q-Former projector, our ParGo achieves an improvement of 259.96 in MME benchmark. Furthermore, our experiments reveal that ParGo significantly outperforms other projectors, particularly in tasks that emphasize detail perception ability.

For agents

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

get_harvested_code_for_paper("2408.12928")
get_code_for_paper("2408.12928")
have("2408.12928")

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

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

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

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

Connect an agent — have() is free.