SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.04652 · 2024

Yi: Open Foundation Models by 01.AI

Qiang Liu, Peng Liu, Bei Chen, Tao Yu, Zhiyuan Liu, Yue Wang, Chao Li, Yuxuan Cai, Ge Zhang, Heng Li, Wenhao Huang, Yudong Liu, and 18 more

arXiv · PDF · Open in the Atlas

Code that ran

2 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 2 failures of our instrument; 6 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/2403.04652.json · badge: /api/ran/2403.04652.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
01-ai/yi marked official in Papers with Code
Papers with Code archive
2 ran · 6 no recorded run
FunctionStatusWhere it lives
build_vision_projector Ran
ran; our contract draft was wrong, not the code
01-ai/yi/VL/llava/model/llava_llama.py
code served (permissive licence) · get_code("9fa178e6891384f1")
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 Linear. 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 MockConfig:
    def __init__(self):
        self.mm_hidden_size = 768
        self.hidden_size = 512
        self.mm_projector_type = 'linear'

# Test with linear projector
config_linear = MockConfig()
config_linear.mm_projector_type = 'linear'

# Test with identity projector
config_identity = MockConfig()
config_identity.mm_projector_type = 'identity'

# Test with mlp2x_gelu projector
config_mlp = MockConfig()
config_mlp.mm_projector_type = 'mlp2x_gelu'

# Test with mlp2x_gelu_Norm projector
config_mlp_norm = MockConfig()
config_mlp_norm.mm_projector_type = 'mlp2x_gelu_Norm'

ARGS = {
    'config': config_linear,
    'delay_load': False,
}
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 Linear — a Linear output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Linear 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
build_vision_tower Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
01-ai/yi/VL/llava/model/llava_llama.py
code served (permissive licence) · get_code("e016ec919cd88d1e")
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 CLIPVisionTower. 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 transformers import CLIPImageProcessor, CLIPVisionConfig, CLIPVisionModel

torch.manual_seed(0)

# Create a minimal stand-in config class
class VisionTowerConfig:
    def __init__(self):
        self.mm_vision_tower = "openai/clip-vit-base-patch32"
        self.mm_vision_select_layer = -2
        self.mm_vision_select_feature = 'patch'

# Create mock CLIPVisionModel that returns proper hidden states
class MockCLIPVisionModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.config = CLIPVisionConfig(
            hidden_size=768,
            image_size=224,
            patch_size=32,
            num_hidden_layers=12
        )
        # Create a simple linear layer to act as the vision tower
        self.linear = nn.Linear(3 * 224 * 224, 768)
        self._dtype = torch.float32
        self._device = torch.device('cpu')
    
    def forward(self, images, output_hidden_states=False):
        batch_size = images.shape[0]
        # Flatten images and project
        flat = images.reshape(batch_size, -1)
        hidden = self.linear(flat)
        
        # Create mock hidden states - list of tensors for each layer
        # We need at least enough layers to access select_layer=-2
        hidden_states = [
            torch.randn(batch_size, 50, 768),  # (batch, num_patches+1, hidden_size)
            torch.randn(batch_size, 50, 768),
            torch.randn(batch_size, 50, 768),
        ]
        
        class Output:
            pass
        
        out = Output()
        out.hidden_states = hidden_states
        return out
    
    @property
    def dtype(self):
        return self._dtype
    
    @property
    def device(self):
        return self._device

# Create mock image processor
class MockCLIPImageProcessor:
    def __call__(self, images, return_tensors=None):
        if isinstance(images, list):
            return torch.randn(len(images), 3, 224, 224)
        return torch.randn(1, 3, 224, 224)

# Patch the from_pretrained methods
original_vision_model_from_pretrained = CLIPVisionModel.from_pretrained
original_image_processor_from_pretrained = CLIPImageProcessor.from_pretrained
original_vision_config_from_pretrained = CLIPVisionConfig.from_pretrained

def mock_vision_model_from_pretrained(*args, **kwargs):
    return MockCLIPVisionModel()

def mock_image_processor_from_pretrained(*args, **kwargs):
    return MockCLIPImageProcessor()

def mock_vision_config_from_pretrained(*args, **kwargs):
    return CLIPVisionConfig(
        hidden_size=768,
        image_size=224,
        patch_size=32,
        num_hidden_layers=12
    )

CLIPVisionModel.from_pretrained = mock_vision_model_from_pretrained
CLIPImageProcessor.from_pretrained = mock_image_processor_from_pretrained
CLIPVisionConfig.from_pretrained = mock_vision_config_from_pretrained

# Create vision tower config
vision_tower_cfg = VisionTowerConfig()

# Create ARGS dict for build_vision_tower
ARGS = {
    'vision_tower_cfg': vision_tower_cfg,
    'delay_load': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CLIPVisionTower — a CLIPVisionTower output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CLIPVisionTower 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
CLIPVisionTower Not yet run
unverified (harvested, no recorded run)
01-ai/yi/VL/llava/model/llava_llama.py
code served (permissive licence) · get_code("f324cbfd797797c5")
How it ran

no invocation recorded.

LlavaConfig Not yet run
unverified (harvested, no recorded run)
01-ai/yi/VL/llava/model/llava_llama.py
code served (permissive licence) · get_code("3c8ff5cd40f90abd")
How it ran

no invocation recorded.

LlavaLlamaForCausalLM Not yet run
unverified (harvested, no recorded run)
01-ai/yi/VL/llava/model/llava_llama.py
code served (permissive licence) · get_code("3ce5244608be8933")
How it ran

no invocation recorded.

LlavaLlamaModel Not yet run
unverified (harvested, no recorded run)
01-ai/yi/VL/llava/model/llava_llama.py
code served (permissive licence) · get_code("1b3df989b0062240")
How it ran

no invocation recorded.

LlavaMetaForCausalLM Not yet run
unverified (harvested, no recorded run)
01-ai/yi/VL/llava/model/llava_llama.py
code served (permissive licence) · get_code("cb4478f3b5e0497f")
How it ran

no invocation recorded.

LlavaMetaModel Not yet run
unverified (harvested, no recorded run)
01-ai/yi/VL/llava/model/llava_llama.py
code served (permissive licence) · get_code("f55142d84e5ac3d0")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 2 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 2 later) and 6 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
LlavaConfig
brick of this paper's assembly: helper
12 other papers
3 dated earlier, 9 later · 9 only as an assembly brick
2304.08485 (2023-04)
Visual Instruction Tuning
2309.17102 (2023-09)
Guiding Instruction-based Image Editing via Multimodal Large Language Models
2402.18695 (2024-02)
Grounding Language Models for Visual Entity Recognition
and 9 more not named here
build_vision_tower
brick of this paper's assembly: helper
1 other paper
1 later
2406.11823 (2024-06)
On Efficient Language and Vision Assistants for Visually-Situated Natural Language Understanding: What Matters in Reading and Reasoning

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 the Yi model family, a series of language and multimodal models that demonstrate strong multi-dimensional capabilities. The Yi model family is based on 6B and 34B pretrained language models, then we extend them to chat models, 200K long context models, depth-upscaled models, and vision-language models. Our base models achieve strong performance on a wide range of benchmarks like MMLU, and our finetuned chat models deliver strong human preference rate on major evaluation platforms like AlpacaEval and Chatbot Arena. Building upon our scalable super-computing infrastructure and the classical transformer architecture, we attribute the performance of Yi models primarily to its data quality resulting from our data-engineering efforts. For pretraining, we construct 3.1 trillion tokens of English and Chinese corpora using a cascaded data deduplication and quality filtering pipeline. For finetuning, we polish a small scale (less than 10K) instruction dataset over multiple iterations such that every single instance has been verified directly by our machine learning engineers. For vision-language, we combine the chat language model with a vision transformer encoder and train the model to align visual representations to the semantic space of the language model. We further extend the context length to 200K through lightweight continual pretraining and demonstrate strong needle-in-a-haystack retrieval performance. We show that extending the depth of the pretrained checkpoint through continual pretraining further improves performance. We believe that given our current results, continuing to scale up model parameters using thoroughly optimized data will lead to even stronger frontier models.

For agents

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

get_harvested_code_for_paper("2403.04652")
get_code_for_paper("2403.04652")
have("2403.04652")

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

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

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

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

Connect an agent — have() is free.