SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2505.14683 · 2025

Emerging Properties in Unified Multimodal Pretraining

arXiv · PDF · Open in the Atlas

Code that ran

19 of 21 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 4 honoured the contract we drafted, 0 violated it and 9 have no contract verdict; 6 failures of our instrument; 2 no recorded run), measured 2026-11-24; 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/2505.14683.json · badge: /api/ran/2505.14683.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-Seed/Bagel canonical (classifier label)
classifier basis: classifier_2025
4 ran · 0 no recorded run
neverbiasu/ComfyUI-BAGEL community (classifier label)
classifier basis not recorded on the link
15 ran · 2 no recorded run
FunctionStatusWhere it lives
apply_rotary_pos_emb Ran
ran; our contract draft was wrong, not the code
neverbiasu/ComfyUI-BAGEL/modeling/bagel/siglip_navit.py
code served (permissive licence) · get_code("4102c144078044c7")
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 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

torch.manual_seed(0)

# Analyze the function:
# - apply_rotary_pos_emb takes q, k, cos, sin
# - q and k are tensors that get unshaped with rotate_half
# - cos and sin are tensors that get unsqueezed at dim 1
# - rotate_half splits tensors along last dimension and recombines
# - All tensors participate in element-wise operations

# Create small tensors:
# batch_size=2, seq_len=3, hidden_dim=4
batch_size = 2
seq_len = 3
hidden_dim = 4

# q and k: (batch_size, seq_len, hidden_dim)
q = torch.randn(batch_size, seq_len, hidden_dim)
k = torch.randn(batch_size, seq_len, hidden_dim)

# cos and sin: (batch_size, hidden_dim) - will be unsqueezed to (batch_size, 1, hidden_dim)
cos = torch.randn(batch_size, hidden_dim)
sin = torch.randn(batch_size, hidden_dim)

ARGS = {
    "q": q,
    "k": k,
    "cos": cos,
    "sin": sin
}
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, ndim 4, 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_new_token_ids Ran
ran on a synthesized input
neverbiasu/ComfyUI-BAGEL/modeling/bagel/runtime.py
code served (permissive licence) · get_code("94a6a40b906a27a2")
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
from transformers import PreTrainedTokenizer

class MockTokenizer:
    """Mock tokenizer that implements the methods called by build_new_token_ids"""
    
    def __init__(self):
        self.token_to_id = {
            '<|im_start|>': 1001,
            '<|im_end|>': 1002,
            '<|vision_start|>': 1003,
            '<|vision_end|>': 1004,
        }
    
    def convert_tokens_to_ids(self, token):
        """Convert a token string to its ID"""
        if token in self.token_to_id:
            return self.token_to_id[token]
        return 0

tokenizer = MockTokenizer()

ARGS = {
    'tokenizer': tokenizer,
}
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 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
comfy_raw_to_bagel_scaled Ran
ran on a synthesized input
neverbiasu/ComfyUI-BAGEL/modeling/bagel/latent.py
code served (permissive licence) · get_code("d37d55803e67b95d")
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 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)

# Create a small tensor representing ComfyUI FLUX VAE raw latents
# Shape: (batch=2, channels=4) - small enough for testing
latent = torch.randn(2, 4)

ARGS = {
    "latent": latent,
}
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 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
count_parameters Ran
ran, honoured the contract we drafted
ByteDance-Seed/Bagel/train/pretrain_unified_navit.py
code served (permissive licence) · get_code("fae038c6ae265486")
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 int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a simple neural network module
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 8)
        self.linear2 = nn.Linear(8, 3)
        self.conv = nn.Conv1d(4, 16, kernel_size=3)
    
    def forward(self, x):
        return x

# Instantiate the module
module = SimpleModel()

# Define ARGS dictionary with the required parameter
ARGS = {
    "module": module
}
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 int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
detect_peak_tflops Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ByteDance-Seed/Bagel/train/pretrain_unified_navit.py
code served (permissive licence) · get_code("5bd79f64dffa39d7")
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 float, ndim 0, dtype family float; no output shape is stated. 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 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)

ARGS = {
    "default_tflops": 100.0,
}
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 float, ndim 0, dtype family float — no output shape is stated: observe_signature.py could not observe it (call:AssertionError)
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
discover_converted_bagel Ran
ran on a synthesized input
neverbiasu/ComfyUI-BAGEL/modeling/bagel/discovery.py
code served (permissive licence) · get_code("446c7a69810151e0")
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 numpy as np
from typing import Callable, Dict, Iterable, Optional


def mock_get_filename_list(folder_name: str) -> list[str]:
    """Mock function that returns a list of filenames for a given folder."""
    if folder_name == 'bagel':
        return [
            'model1.safetensors',
            'model2.safetensors',
            'subdir/model3.safetensors',
        ]
    elif folder_name == 'diffusion_models':
        return [
            'old_model.safetensors',
            'other_file.txt',
        ]
    else:
        return []


def mock_get_full_path(folder_name: str, relative_name: str) -> Optional[str]:
    """Mock function that resolves a relative name to a full path."""
    if folder_name == 'bagel' and relative_name.endswith('.safetensors'):
        return f'/models/{folder_name}/{relative_name}'
    elif folder_name == 'diffusion_models' and relative_name.endswith('.safetensors'):
        return f'/models/{folder_name}/{relative_name}'
    return None


ARGS = {
    'get_filename_list': mock_get_filename_list,
    'get_full_path': mock_get_full_path,
    'folder_names': 'bagel',
}
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 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
from_comfy_latent Ran
ran on a synthesized input
neverbiasu/ComfyUI-BAGEL/modeling/bagel/latent.py
code served (permissive licence) · get_code("f9f0a4254ea96f69")
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, shape (2, 4, 3, 5) 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 ComfyUI latent dict with a 'samples' key containing a [B, C, H, W] tensor
latent_tensor = torch.randn(2, 4, 3, 5)  # [B=2, C=4, H=3, W=5]

ARGS = {
    'latent': {
        'samples': latent_tensor
    }
}
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 4, dtype family float, shape (2, 4, 3, 5) — shape (2, 4, 3, 5) 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
get_1d_sincos_pos_embed_from_grid Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
neverbiasu/ComfyUI-BAGEL/modeling/bagel/modeling_utils.py
code served (permissive licence) · get_code("e5947aba1d10885f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned ndarray, ndim 2, dtype family float, shape (5, 8) 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 numpy as np

# Create a simple 1D position array
# embed_dim must be even (checked by assert in function)
# pos should be a 1D array of positions

embed_dim = 8  # Small even number for embedding dimension
pos = np.array([0.0, 1.0, 2.0, 3.0, 4.0])  # 5 positions

ARGS = {
    'embed_dim': embed_dim,
    'pos': pos
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (5, 8) — shape (5, 8) 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
get_2d_sincos_pos_embed Ran
ran, honoured the contract we drafted
neverbiasu/ComfyUI-BAGEL/modeling/bagel/modeling_utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from jqtangust/Robust-U1, is pointer only (licence: NONE) · get_code("58f584dfd7b8fc3f")
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 jqtangust/Robust-U1, 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.

normalize_key Ran
ran on a synthesized input
neverbiasu/ComfyUI-BAGEL/modeling/bagel/converted_format.py
code served (permissive licence) · get_code("1db1e937be531f0d")
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

torch.manual_seed(0)

ARGS = {
    "raw_key": "module.layer.weight"
}
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
normalize_state_dict Ran
ran on a synthesized input
neverbiasu/ComfyUI-BAGEL/modeling/bagel/converted_format.py
code served (permissive licence) · get_code("26c4c48bbb6ab404")
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 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 torch
import torch.nn as nn

torch.manual_seed(0)

# The function normalize_state_dict expects:
# - state_dict: Dict[str, object] - a dictionary mapping string keys to tensor objects
# 
# The function:
# 1. Iterates over items in state_dict
# 2. Normalizes each key using normalize_key()
# 3. Checks for collisions in normalized keys
# 4. Extracts module roots by splitting keys on '.' and taking first part
# 5. Verifies all CRITICAL_PREFIXES are present in the roots
#
# So we need a state_dict with:
# - Keys that start with each of the canonical module roots
# - Values that are tensor objects

state_dict = {
    'language_model.layer1.weight': torch.randn(4, 3),
    'language_model.layer1.bias': torch.randn(4),
    'vit_model.embeddings.weight': torch.randn(5, 4),
    'vit_model.embeddings.bias': torch.randn(5),
    'connector.dense.weight': torch.randn(3, 4),
    'connector.dense.bias': torch.randn(3),
    'vae2llm.linear.weight': torch.randn(2, 4),
    'vae2llm.linear.bias': torch.randn(2),
    'llm2vae.linear.weight': torch.randn(4, 2),
    'llm2vae.linear.bias': torch.randn(4),
    'latent_pos_embed.embed': torch.randn(6, 4),
    'vit_pos_embed.embed': torch.randn(7, 4),
    'time_embedder.weight': torch.randn(8, 4),
}

ARGS = {
    'state_dict': state_dict,
}
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, ndim 1, 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
pad_sequence Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
neverbiasu/ComfyUI-BAGEL/modeling/bagel/qwen2_navit.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from jqtangust/Robust-U1, is pointer only (licence: NONE) · get_code("26da3ed73c66b411")
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 jqtangust/Robust-U1, 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.

qwen2_flop_coefficients Ran
ran, honoured the contract we drafted
ByteDance-Seed/Bagel/train/pretrain_unified_navit.py
code served (permissive licence) · get_code("eeb5aa9c76e8e1ae")
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 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 torch
import numpy as np

class Qwen2Config:
    def __init__(self):
        self.hidden_size = 128
        self.vocab_size = 256
        self.num_hidden_layers = 4
        self.num_key_value_heads = 2
        self.num_attention_heads = 4
        self.intermediate_size = 512
        self.head_dim = 32

config = Qwen2Config()

ARGS = {
    "config": config
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, 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
reload_bagel_patcher Ran
ran on a synthesized input
neverbiasu/ComfyUI-BAGEL/modeling/bagel/model_patcher.py
code served (permissive licence) · get_code("1a10ae6dd1f23878")
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)

class MockReloadFactory:
    def __call__(self, load_device, offload_device):
        return {"reloaded": True, "load_device": load_device, "offload_device": offload_device}

class MockPatcher(nn.Module):
    def __init__(self):
        super().__init__()
        self.reload_factory = MockReloadFactory()

patcher = MockPatcher()
load_device = "cpu"
offload_device = None

ARGS = {
    "patcher": patcher,
    "load_device": load_device,
    "offload_device": offload_device,
}
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
rotate_half Ran
ran, honoured the contract we drafted
neverbiasu/ComfyUI-BAGEL/modeling/bagel/siglip_navit.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from mustafaaljadery/gemma-2b-10m, is pointer only (licence: NONE) · get_code("cec833a99feb528c")
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 mustafaaljadery/gemma-2b-10m, 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.

sha256_bytes Ran
ran; our contract draft was wrong, not the code
neverbiasu/ComfyUI-BAGEL/modeling/bagel/converted_format.py
code served (permissive licence) · get_code("7f5ffed1f98ca2b1")
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 hashlib

# The function sha256_bytes takes a bytes object and returns its SHA256 hash as a hex string
# We need to provide a bytes argument

test_data = b"Hello, World!"

ARGS = {
    "data": test_data
}
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
timed Ran
ran; our contract draft was wrong, not the code
ByteDance-Seed/Bagel/eval/gen/geneval/evaluation/evaluate_images.py
code served (permissive licence) · get_code("844a4aecea80d106")
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 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
import time
import sys

def timed(fn):
    def wrapper(*args, **kwargs):
        startt = time.time()
        result = fn(*args, **kwargs)
        endt = time.time()
        print(f'Function {fn.__name__!r} executed in {endt - startt:.3f}s', file=sys.stderr)
        return result
    return wrapper

# Create a simple test function to decorate
def sample_function(x, y):
    return x + y

# The timed decorator takes a function as its only argument
ARGS = {
    'fn': sample_function
}
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 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
to_comfy_latent Ran
ran on a synthesized input
neverbiasu/ComfyUI-BAGEL/modeling/bagel/latent.py
code served (permissive licence) · get_code("312ebc115176cd64")
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

torch.manual_seed(0)

# Create a small 4D tensor [B, C, H, W]
# B=2 (batch), C=4 (channels), H=3 (height), W=5 (width)
tensor_4d = torch.randn(2, 4, 3, 5)

ARGS = {
    'tensor': tensor_4d
}
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
update_context_text Ran
ran on a synthesized input
neverbiasu/ComfyUI-BAGEL/modeling/bagel/runtime.py
code served (permissive licence) · get_code("0b23c6505f5db1d0")
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
from typing import Dict, List, Optional, Tuple

torch.manual_seed(0)

# Create a minimal mock model that implements the required methods
class MockModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)  # Ensure model has parameters for _model_device
    
    def prepare_prompts(self, curr_kvlens, curr_rope, prompts, tokenizer, new_token_ids):
        # Returns: (generation_input, kv_lens, ropes)
        generation_input = {
            'input_ids': torch.tensor([[1, 2, 3]], dtype=torch.long),
            'attention_mask': torch.tensor([[1, 1, 1]], dtype=torch.long)
        }
        kv_lens = [3]
        ropes = [torch.tensor([[1.0, 2.0, 3.0, 4.0]])]
        return generation_input, kv_lens, ropes
    
    def forward_cache_update_text(self, past_key_values, **kwargs):
        # Returns updated past_key_values
        return {
            'layer_0': (
                torch.randn(2, 8, 4, 3),
                torch.randn(2, 8, 4, 3)
            )
        }

# Create a minimal mock tokenizer
class MockTokenizer:
    def __init__(self):
        pass

# Build the handle dict
model = MockModel()
tokenizer = MockTokenizer()
new_token_ids = {'<pad>': 0, '<eos>': 1}

handle = {
    'model': model,
    'tokenizer': tokenizer,
    'new_token_ids': new_token_ids
}

# Build the gen_context dict
gen_context = {
    'kv_lens': [0],
    'ropes': [torch.tensor([[1.0, 2.0, 3.0, 4.0]])],
    'past_key_values': {
        'layer_0': (
            torch.randn(2, 8, 4, 3),
            torch.randn(2, 8, 4, 3)
        )
    }
}

text = "Hello world"

ARGS = {
    'handle': handle,
    'text': text,
    'gen_context': gen_context
}
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
flash_attn_varlen_func Not yet run
unverified (harvested, no recorded run)
neverbiasu/ComfyUI-BAGEL/modeling/bagel/flash_attention.py
code served (permissive licence) · get_code("908a8209ec674ee6")
How it ran

no invocation recorded.

get_2d_sincos_pos_embed_from_grid Not yet run
unverified (harvested, no recorded run)
neverbiasu/ComfyUI-BAGEL/modeling/bagel/modeling_utils.py
code served (permissive licence) · get_code("665d8a4e8f673a4c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 21 samples lifted from this paper's linked repositories, 21 carry a function identity and 0 do not. Of the 21 distinct functions with an identity, 8 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 4 the same month, 8 later) and 13 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
270 dated earlier, 11 the same month, 71 later, 5 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_2d_sincos_pos_embed_from_grid 190 other papers
157 dated earlier, 3 the same month, 27 later, 3 same year, order not determinable · 65 only as an assembly brick
1807.10221 (2018-07)
Unified Perceptual Parsing for Scene Understanding
2105.12723 (2021-05)
Nested Hierarchical Transformer: Towards Accurate, Data-Efficient and Interpretable Visual Understanding
2111.06377 (2021-11)
Masked Autoencoders Are Scalable Vision Learners
and 187 more not named here
get_2d_sincos_pos_embed 69 other papers
52 dated earlier, 1 the same month, 16 later · 12 only as an assembly brick
2203.10897 (2022-03)
Unified Multivariate Gaussian Mixture for Efficient Neural Image Compression
2212.09748 (2022-12)
Scalable Diffusion Models with Transformers
2303.14389 (2023-03)
Masked Diffusion Transformer is a Strong Image Synthesizer
and 66 more not named here
get_1d_sincos_pos_embed_from_grid 42 other papers
28 dated earlier, 14 later · 22 only as an assembly brick
2212.09748 (2022-12)
Scalable Diffusion Models with Transformers
2303.14389 (2023-03)
Masked Diffusion Transformer is a Strong Image Synthesizer
2305.13311 (2023-05)
VDT: General-purpose Video Diffusion Transformers via Mask Modeling
and 39 more not named here
pad_sequence 4 other papers
4 later
2508.05606 (2025-08)
Uni-cot: Towards Unified Chain-of-Thought Reasoning Across Text and Vision
2601.11522 (2026-01)
UniX: Unifying Autoregression and Diffusion for Chest X-Ray Understanding and Generation
2605.08724 (2026-05)
SynerMedGen: Synergizing Medical Multimodal Understanding with Generation via Task Alignment
and 1 more not named here
timed 4 other papers
2 dated earlier, 1 the same month, 1 later
2310.11513 (2023-10)
GenEval: An Object-Focused Framework for Evaluating Text-to-Image Alignment
2412.04431 (2024-12)
Infinity: Scaling Bitwise AutoRegressive Modeling for High-Resolution Image Synthesis
2505.23380 (2025-05)
UniRL: Self-Improving Unified Multimodal Models via Supervised and Reinforcement Learning
and 1 more not named here
apply_rotary_pos_emb 3 other papers
3 later
2508.05606 (2025-08)
Uni-cot: Towards Unified Chain-of-Thought Reasoning Across Text and Vision
2601.11522 (2026-01)
UniX: Unifying Autoregression and Diffusion for Chest X-Ray Understanding and Generation
2605.08724 (2026-05)
SynerMedGen: Synergizing Medical Multimodal Understanding with Generation via Task Alignment
sha256_bytes 1 other paper
1 later
2603.05764 (2026-03)
TML-bench: Benchmark for Data Science Agents on Tabular ML Tasks

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

Unifying multimodal understanding and generation has shown impressive capabilities in cutting-edge proprietary systems. In this work, we introduce BAGEL, an open-source foundational model that natively supports multimodal understanding and generation. BAGEL is a unified, decoder-only model pretrained on trillions of tokens curated from large-scale interleaved text, image, video, and web data. When scaled with such diverse multimodal interleaved data, BAGEL exhibits emerging capabilities in complex multimodal reasoning. As a result, it significantly outperforms open-source unified models in both multimodal generation and understanding across standard benchmarks, while exhibiting advanced multimodal reasoning abilities such as free-form image manipulation, future frame prediction, 3D manipulation, and world navigation. In the hope of facilitating further opportunities for multimodal research, we share the key findings, pretraining details, data creation protocal, and release our code and checkpoints to the community. The project page is at https://bagel-ai.org/

For agents

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

get_harvested_code_for_paper("2505.14683")
get_code_for_paper("2505.14683")
have("2505.14683")

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

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

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

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

Connect an agent — have() is free.