SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2411.03313 · NeurIPS · 2024

Classification Done Right for Vision-Language Pre-Training

Jiashi Feng, Bingyi Kang, Zilong Huang, Haoqi Fan, Qinghao Ye

arXiv · PDF · Open in the Atlas

Code that ran

10 of 18 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 5 have no contract verdict; 5 failures of our instrument; 8 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/2411.03313.json · badge: /api/ran/2411.03313.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
x-cls/superclass canonical (classifier label)
classifier basis: classifier_2025
10 ran · 8 no recorded run
FunctionStatusWhere it lives
AttentionPool2d Ran
ran on a synthesized input
x-cls/superclass/opencls/open_clip/cls_model.py
code served (permissive licence) · get_code("785f7419f700fb21")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, dtype family float, shape (2, 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
from torch import nn
from torch.nn import functional as F

class AttentionPool2d(nn.Module):

    def __init__(self, spacial_dim: int, embed_dim: int, num_heads: int, output_dim: int=None):
        super().__init__()
        self.positional_embedding = nn.Parameter(torch.randn(spacial_dim ** 2 + 1, embed_dim) / embed_dim ** 0.5)
        self.k_proj = nn.Linear(embed_dim, embed_dim)
        self.q_proj = nn.Linear(embed_dim, embed_dim)
        self.v_proj = nn.Linear(embed_dim, embed_dim)
        self.c_proj = nn.Linear(embed_dim, output_dim or embed_dim)
        self.num_heads = num_heads

    def forward(self, x):
        x = x.reshape(x.shape[0], x.shape[1], x.shape[2] * x.shape[3]).permute(2, 0, 1)
        x = torch.cat([x.mean(dim=0, keepdim=True), x], dim=0)
        x = x + self.positional_embedding[:, None, :].to(x.dtype)
        x, _ = F.multi_head_attention_forward(query=x, key=x, value=x, embed_dim_to_check=x.shape[-1], num_heads=self.num_heads, q_proj_weight=self.q_proj.weight, k_proj_weight=self.k_proj.weight, v_proj_weight=self.v_proj.weight, in_proj_weight=None, in_proj_bias=torch.cat([self.q_proj.bias, self.k_proj.bias, self.v_proj.bias]), bias_k=None, bias_v=None, add_zero_attn=False, dropout_p=0.0, out_proj_weight=self.c_proj.weight, out_proj_bias=self.c_proj.bias, use_separate_proj_weight=True, training=self.training, need_weights=False)
        return x[0]


INIT_ARGS = {
    'spacial_dim': 3,
    'embed_dim': 4,
    'num_heads': 2,
    'output_dim': 5,
}

ARGS = {
    'x': torch.randn(2, 4, 3, 3),
}

if __name__ == '__main__':
    model = AttentionPool2d(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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, 5) — shape (2, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
AttentionalPooler Ran
ran on a synthesized input
x-cls/superclass/opencls/open_clip/cls_model.py
code served (permissive licence) · get_code("6795bcd62138695d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, dtype family float, shape (2, 8, 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
from torch import nn
from torch.nn import functional as F
from typing import Callable, Optional, Sequence, Tuple

class LayerNorm(nn.LayerNorm):
    """Subclass torch's LayerNorm (with cast back to input dtype)."""

    def forward(self, x: torch.Tensor):
        orig_type = x.dtype
        x = F.layer_norm(x, self.normalized_shape, self.weight, self.bias, self.eps)
        return x.to(orig_type)

class AttentionalPooler(nn.Module):

    def __init__(self, d_model: int, context_dim: int, n_head: int=8, n_queries: int=256, norm_layer: Callable=LayerNorm):
        super().__init__()
        self.query = nn.Parameter(torch.randn(n_queries, d_model))
        self.attn = nn.MultiheadAttention(d_model, n_head, kdim=context_dim, vdim=context_dim)
        self.ln_q = norm_layer(d_model)
        self.ln_k = norm_layer(context_dim)

    def forward(self, x: torch.Tensor):
        x = self.ln_k(x).permute(1, 0, 2)
        N = x.shape[1]
        q = self.ln_q(self.query)
        out = self.attn(q.unsqueeze(1).expand(-1, N, -1), x, x, need_weights=False)[0]
        return out.permute(1, 0, 2)


INIT_ARGS = {
    'd_model': 4,
    'context_dim': 3,
    'n_head': 2,
    'n_queries': 8,
    'norm_layer': LayerNorm,
}

ARGS = {
    'x': torch.randn(2, 5, 3),
}

if __name__ == '__main__':
    pooler = AttentionalPooler(**INIT_ARGS)
    output = pooler(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output dtype: {output.dtype}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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, 8, 4) — shape (2, 8, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
MixClsHead Ran
ran on a synthesized input
x-cls/superclass/opencls/open_clip/cls_model.py
code served (permissive licence) · get_code("4a1aa6db92310642")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, dtype family float, shape (2, 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 torch
from torch import nn
from torch.nn import functional as F
from collections import OrderedDict
from typing import Callable, Optional, Sequence, Tuple

class LayerNorm(nn.LayerNorm):
    """Subclass torch's LayerNorm (with cast back to input dtype)."""

    def forward(self, x: torch.Tensor):
        orig_type = x.dtype
        x = F.layer_norm(x, self.normalized_shape, self.weight, self.bias, self.eps)
        return x.to(orig_type)

class MixClsHead(nn.Module):

    def __init__(self, width: int, layers: int, mlp_ratio: float=4.0, act_layer: Callable=nn.GELU, norm_layer: Callable=LayerNorm, output_dim: int=512):
        super().__init__()
        self.width = width
        mlp_width = int(width * mlp_ratio)
        self.mlps = nn.ModuleList([nn.Sequential(OrderedDict([('c_norm', norm_layer(width)), ('c_fc', nn.Linear(width, mlp_width)), ('gelu', act_layer()), ('c_proj', nn.Linear(mlp_width, width))])) for _ in range(layers)])
        self.ln_mlp = norm_layer(width)
        self.text_projection = nn.Linear(width, output_dim)
        self.init_parameters()

    def init_parameters(self):
        proj_std = self.width ** (-0.5) * 2 ** (-0.5)
        fc_std = (2 * self.width) ** (-0.5)
        for block in self.mlps:
            nn.init.normal_(block.c_fc.weight, std=fc_std)
            nn.init.normal_(block.c_proj.weight, std=proj_std)
        if self.text_projection is not None:
            nn.init.normal_(self.text_projection.weight, std=self.width ** (-0.5))
            self.text_projection.bias.data.fill_(0.0)

    def forward(self, x):
        for mlp in self.mlps:
            x = x + mlp(x)
        x = self.ln_mlp(x)
        x = self.text_projection(x)
        return x

INIT_ARGS = {
    'width': 4,
    'layers': 2,
    'mlp_ratio': 4.0,
    'act_layer': nn.GELU,
    'norm_layer': LayerNorm,
    'output_dim': 8,
}

ARGS = {
    'x': torch.randn(2, 4),
}

if __name__ == '__main__':
    model = MixClsHead(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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, 8) — shape (2, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
ResidualAttentionBlock Ran
ran on a synthesized input
x-cls/superclass/opencls/open_clip/cls_model.py
code served (permissive licence) · get_code("7000ad070b2b4c5c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, dtype family float, shape (3, 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
from torch import nn
from torch.nn import functional as F
from collections import OrderedDict
from typing import Callable, Optional, Sequence, Tuple

class LayerNorm(nn.LayerNorm):
    """Subclass torch's LayerNorm (with cast back to input dtype)."""

    def forward(self, x: torch.Tensor):
        orig_type = x.dtype
        x = F.layer_norm(x, self.normalized_shape, self.weight, self.bias, self.eps)
        return x.to(orig_type)

class LayerScale(nn.Module):

    def __init__(self, dim, init_values=1e-05, inplace=False):
        super().__init__()
        self.inplace = inplace
        self.gamma = nn.Parameter(init_values * torch.ones(dim))

    def forward(self, x):
        return x.mul_(self.gamma) if self.inplace else x * self.gamma

class ResidualAttentionBlock(nn.Module):

    def __init__(self, d_model: int, n_head: int, mlp_ratio: float=4.0, ls_init_value: float=None, act_layer: Callable=nn.GELU, norm_layer: Callable=LayerNorm, is_cross_attention: bool=False):
        super().__init__()
        self.ln_1 = norm_layer(d_model)
        self.attn = nn.MultiheadAttention(d_model, n_head)
        self.ls_1 = LayerScale(d_model, ls_init_value) if ls_init_value is not None else nn.Identity()
        if is_cross_attention:
            self.ln_1_kv = norm_layer(d_model)
        self.ln_2 = norm_layer(d_model)
        mlp_width = int(d_model * mlp_ratio)
        self.mlp = nn.Sequential(OrderedDict([('c_fc', nn.Linear(d_model, mlp_width)), ('gelu', act_layer()), ('c_proj', nn.Linear(mlp_width, d_model))]))
        self.ls_2 = LayerScale(d_model, ls_init_value) if ls_init_value is not None else nn.Identity()

    def attention(self, q_x: torch.Tensor, k_x: Optional[torch.Tensor]=None, v_x: Optional[torch.Tensor]=None, attn_mask: Optional[torch.Tensor]=None):
        k_x = k_x if k_x is not None else q_x
        v_x = v_x if v_x is not None else q_x
        attn_mask = attn_mask.to(q_x.dtype) if attn_mask is not None else None
        return self.attn(q_x, k_x, v_x, need_weights=False, attn_mask=attn_mask)[0]

    def forward(self, q_x: torch.Tensor, k_x: Optional[torch.Tensor]=None, v_x: Optional[torch.Tensor]=None, attn_mask: Optional[torch.Tensor]=None):
        k_x = self.ln_1_kv(k_x) if hasattr(self, 'ln_1_kv') and k_x is not None else None
        v_x = self.ln_1_kv(v_x) if hasattr(self, 'ln_1_kv') and v_x is not None else None
        x = q_x + self.ls_1(self.attention(q_x=self.ln_1(q_x), k_x=k_x, v_x=v_x, attn_mask=attn_mask))
        x = x + self.ls_2(self.mlp(self.ln_2(x)))
        return x

INIT_ARGS = {
    'd_model': 4,
    'n_head': 2,
    'mlp_ratio': 4.0,
    'ls_init_value': 1e-5,
    'act_layer': nn.GELU,
    'norm_layer': LayerNorm,
    'is_cross_attention': False,
}

ARGS = {
    'q_x': torch.randn(3, 2, 4),
    'k_x': None,
    'v_x': None,
    'attn_mask': None,
}

if __name__ == '__main__':
    block = ResidualAttentionBlock(**INIT_ARGS)
    output = block(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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, 2, 4) — shape (3, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Transformer Ran
ran on a synthesized input
x-cls/superclass/opencls/open_clip/cls_model.py
code served (permissive licence) · get_code("47769d892eb10b08")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, 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
from torch.nn import functional as F
from collections import OrderedDict
from torch.utils.checkpoint import checkpoint
from typing import Callable, Optional, Sequence, Tuple

class LayerNorm(nn.LayerNorm):
    """Subclass torch's LayerNorm (with cast back to input dtype)."""

    def forward(self, x: torch.Tensor):
        orig_type = x.dtype
        x = F.layer_norm(x, self.normalized_shape, self.weight, self.bias, self.eps)
        return x.to(orig_type)

class LayerScale(nn.Module):

    def __init__(self, dim, init_values=1e-05, inplace=False):
        super().__init__()
        self.inplace = inplace
        self.gamma = nn.Parameter(init_values * torch.ones(dim))

    def forward(self, x):
        return x.mul_(self.gamma) if self.inplace else x * self.gamma

class ResidualAttentionBlock(nn.Module):

    def __init__(self, d_model: int, n_head: int, mlp_ratio: float=4.0, ls_init_value: float=None, act_layer: Callable=nn.GELU, norm_layer: Callable=LayerNorm, is_cross_attention: bool=False):
        super().__init__()
        self.ln_1 = norm_layer(d_model)
        self.attn = nn.MultiheadAttention(d_model, n_head)
        self.ls_1 = LayerScale(d_model, ls_init_value) if ls_init_value is not None else nn.Identity()
        if is_cross_attention:
            self.ln_1_kv = norm_layer(d_model)
        self.ln_2 = norm_layer(d_model)
        mlp_width = int(d_model * mlp_ratio)
        self.mlp = nn.Sequential(OrderedDict([('c_fc', nn.Linear(d_model, mlp_width)), ('gelu', act_layer()), ('c_proj', nn.Linear(mlp_width, d_model))]))
        self.ls_2 = LayerScale(d_model, ls_init_value) if ls_init_value is not None else nn.Identity()

    def attention(self, q_x: torch.Tensor, k_x: Optional[torch.Tensor]=None, v_x: Optional[torch.Tensor]=None, attn_mask: Optional[torch.Tensor]=None):
        k_x = k_x if k_x is not None else q_x
        v_x = v_x if v_x is not None else q_x
        attn_mask = attn_mask.to(q_x.dtype) if attn_mask is not None else None
        return self.attn(q_x, k_x, v_x, need_weights=False, attn_mask=attn_mask)[0]

    def forward(self, q_x: torch.Tensor, k_x: Optional[torch.Tensor]=None, v_x: Optional[torch.Tensor]=None, attn_mask: Optional[torch.Tensor]=None):
        k_x = self.ln_1_kv(k_x) if hasattr(self, 'ln_1_kv') and k_x is not None else None
        v_x = self.ln_1_kv(v_x) if hasattr(self, 'ln_1_kv') and v_x is not None else None
        x = q_x + self.ls_1(self.attention(q_x=self.ln_1(q_x), k_x=k_x, v_x=v_x, attn_mask=attn_mask))
        x = x + self.ls_2(self.mlp(self.ln_2(x)))
        return x

class Transformer(nn.Module):

    def __init__(self, width: int, layers: int, heads: int, mlp_ratio: float=4.0, ls_init_value: float=None, act_layer: Callable=nn.GELU, norm_layer: Callable=LayerNorm):
        super().__init__()
        self.width = width
        self.layers = layers
        self.grad_checkpointing = False
        self.resblocks = nn.ModuleList([ResidualAttentionBlock(width, heads, mlp_ratio, ls_init_value=ls_init_value, act_layer=act_layer, norm_layer=norm_layer) for _ in range(layers)])

    def get_cast_dtype(self) -> torch.dtype:
        if hasattr(self.resblocks[0].mlp.c_fc, 'int8_original_dtype'):
            return self.resblocks[0].mlp.c_fc.int8_original_dtype
        return self.resblocks[0].mlp.c_fc.weight.dtype

    def forward(self, x: torch.Tensor, attn_mask: Optional[torch.Tensor]=None):
        for r in self.resblocks:
            if self.grad_checkpointing and (not torch.jit.is_scripting()):
                x = checkpoint(r, x, None, None, attn_mask)
            else:
                x = r(x, attn_mask=attn_mask)
        return x

INIT_ARGS = {
    'width': 4,
    'layers': 2,
    'heads': 2,
    'mlp_ratio': 4.0,
    'ls_init_value': 1e-5,
    'act_layer': nn.GELU,
    'norm_layer': LayerNorm,
}

ARGS = {
    'x': torch.randn(2, 3, 4),
    'attn_mask': None,
}

if __name__ == '__main__':
    model = Transformer(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output dtype: {output.dtype}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
_build_cls_head Ran
ran; our contract draft was wrong, not the code
x-cls/superclass/opencls/open_clip/cls_model.py
code served (permissive licence) · get_code("ef5de3709b9ce92f")
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 MixClsHead. 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 torch import nn
from dataclasses import dataclass

torch.manual_seed(0)

@dataclass
class ClassHeadCfg:
    mlp_ratio: int = 4
    layers: int = 1
    vocab_size: int = 1000

ARGS = {
    'width': 512,
    'clshead_cfg': ClassHeadCfg(mlp_ratio=4, layers=2, vocab_size=1000),
    'quick_gelu': False,
    'cast_dtype': None,
}
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 MixClsHead — a MixClsHead output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MixClsHead 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
_expand_token Ran
ran; our contract draft was wrong, not the code
x-cls/superclass/opencls/open_clip/cls_model.py
code served (permissive licence) · get_code("476766d1bc74cdeb")
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, 1, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function takes a token tensor and expands it across a batch dimension
# token: a tensor that will be viewed and expanded
# batch_size: an integer specifying the batch dimension

token = torch.randn(1, 1, 4)  # Shape (1, 1, 4) - will be expanded
batch_size = 2

ARGS = {
    "token": token,
    "batch_size": batch_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 Tensor, ndim 3, dtype family float, shape (2, 1, 4) — shape (2, 1, 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
convert_to_custom_text_state_dict Ran
ran; our contract draft was wrong, not the code
x-cls/superclass/opencls/open_clip/model.py
code served (permissive licence) · get_code("63d746eddf749201")
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 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 copy

torch.manual_seed(0)

# Create a sample state dict with text projection and related keys
state_dict = {
    'text_projection': torch.randn(4, 3),
    'positional_embedding': torch.randn(5, 4),
    'token_embedding': torch.randn(6, 4),
    'transformer.layer1.weight': torch.randn(4, 4),
    'ln_final.weight': torch.randn(4),
    'ln_final.bias': torch.randn(4),
    'other_key': torch.randn(2, 3),
}

ARGS = {
    'state_dict': state_dict,
}
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 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
get_cast_dtype Ran
ran; our contract draft was wrong, not the code
x-cls/superclass/opencls/open_clip/model.py
code served (permissive licence) · get_code("1f22cc0143fbf7d1")
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 dtype. 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)

ARGS = {
    "precision": "bf16"
}
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 dtype — a dtype output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dtype output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_input_dtype Ran
ran; our contract draft was wrong, not the code
x-cls/superclass/opencls/open_clip/model.py
code served (permissive licence) · get_code("005ae1827a1eb3f0")
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 dtype. 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 = {
    "precision": "bf16"
}
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 dtype — a dtype output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dtype 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
CLIPTextCfg Not yet run
unverified (harvested, no recorded run)
x-cls/superclass/opencls/open_clip/cls_model.py
code served (permissive licence) · get_code("8037b3f2668053ef")
How it ran

no invocation recorded.

CLIPVisionCfg Not yet run
unverified (harvested, no recorded run)
x-cls/superclass/opencls/open_clip/cls_model.py
code served (permissive licence) · get_code("f9612255629b2c84")
How it ran

no invocation recorded.

ClassHeadCfg Not yet run
unverified (harvested, no recorded run)
x-cls/superclass/opencls/open_clip/cls_model.py
code served (permissive licence) · get_code("91bb6a8d9bbe9931")
How it ran

no invocation recorded.

Classifier Not yet run
unverified (harvested, no recorded run)
x-cls/superclass/opencls/open_clip/cls_model.py
code served (permissive licence) · get_code("b4684d62e958c830")
How it ran

no invocation recorded.

ModifiedResNet Not yet run
unverified (harvested, no recorded run)
x-cls/superclass/opencls/open_clip/cls_model.py
code served (permissive licence) · get_code("368e98cc03933cb5")
How it ran

no invocation recorded.

TimmModel Not yet run
unverified (harvested, no recorded run)
x-cls/superclass/opencls/open_clip/cls_model.py
code served (permissive licence) · get_code("b4828d6fa7fb63f1")
How it ran

no invocation recorded.

VisionTransformer Not yet run
unverified (harvested, no recorded run)
x-cls/superclass/opencls/open_clip/cls_model.py
code served (permissive licence) · get_code("554c03cc48b8d760")
How it ran

no invocation recorded.

_build_vision_tower Not yet run
unverified (harvested, no recorded run)
x-cls/superclass/opencls/open_clip/cls_model.py
code served (permissive licence) · get_code("4e3056128eed4cca")
How it ran

no invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 8 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 3 the same month, 7 later) and 10 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
get_cast_dtype 66 other papers
49 dated earlier, 5 the same month, 11 later, 1 same year, order not determinable
2103.00020 (2021-03)
Learning Transferable Visual Models From Natural Language Supervision
2210.08402 (2022-10)
LAION-5B: An open large-scale dataset for training next generation image-text models
2212.07143 (2022-12)
Reproducible scaling laws for contrastive language-image learning
and 63 more not named here
convert_to_custom_text_state_dict 49 other papers
39 dated earlier, 3 the same month, 6 later, 1 same year, order not determinable
2103.00020 (2021-03)
Learning Transferable Visual Models From Natural Language Supervision
2210.08402 (2022-10)
LAION-5B: An open large-scale dataset for training next generation image-text models
2212.07143 (2022-12)
Reproducible scaling laws for contrastive language-image learning
and 46 more not named here
get_input_dtype 29 other papers
21 dated earlier, 2 the same month, 6 later
2103.00020 (2021-03)
Learning Transferable Visual Models From Natural Language Supervision
2210.08402 (2022-10)
LAION-5B: An open large-scale dataset for training next generation image-text models
2212.07143 (2022-12)
Reproducible scaling laws for contrastive language-image learning
and 26 more not named here
AttentionPool2d
brick of this paper's assembly: helper
3 other papers
2 dated earlier, 1 later
2306.09200 (2023-06)
ChessGPT: Bridging Policy Learning and Language Modeling
2403.07636 (2024-03)
Decomposing Disease Descriptions for Enhanced Pathology Detection: A Multi-Aspect Vision-Language Pre-training Framework
2608.00147 (2026-08)
RadPRISM: Schema-stratified radiology-report supervision for concept-disentangled image representations and visual grounding
ModifiedResNet
brick of this paper's assembly: helper
2 other papers
2 dated earlier
2306.09200 (2023-06)
ChessGPT: Bridging Policy Learning and Language Modeling
2308.08428 (2023-08)
ALIP: Adaptive Language-Image Pre-training with Synthetic Caption
ResidualAttentionBlock
brick of this paper's assembly: helper
1 other paper
1 later
2503.08048 (2025-03)
LongProLIP: A Probabilistic Vision-Language Model with Long Context Text
Transformer
brick of this paper's assembly: helper
1 other paper
1 later
2503.08048 (2025-03)
LongProLIP: A Probabilistic Vision-Language Model with Long Context Text
_expand_token
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2503.08048 (2025-03)
LongProLIP: A Probabilistic Vision-Language Model with Long Context Text

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 SuperClass, a super simple classification method for vision-language pre-training on image-text data. Unlike its contrastive counterpart CLIP [57] who contrast with a text encoder, SuperClass directly utilizes tokenized raw text as supervised classification labels, without the need for additional text filtering or selection. Due to the absence of the text encoding as contrastive target, SuperClass does not require a text encoder and does not need to maintain a large batch size as CLIP [57] does. SuperClass demonstrated superior performance on various downstream tasks, including classic computer vision benchmarks and vision language downstream tasks. We further explored the scaling behavior of SuperClass on model size, training length, or data size, and reported encouraging results and comparisons to CLIP .

For agents

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

get_harvested_code_for_paper("2411.03313")
get_code_for_paper("2411.03313")
have("2411.03313")

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

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

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

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

Connect an agent — have() is free.