SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2408.16500 · 2024

CogVLM2: Visual Language Models for Image and Video Understanding

arXiv · PDF · Open in the Atlas

Code that ran

12 of 17 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 10 failures of our instrument; 5 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.16500.json · badge: /api/ran/2408.16500.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
thudm/glm-4 canonical (classifier label)
classifier basis: census
7 ran · 3 no recorded run
thudm/cogvlm2 canonical (classifier label)
classifier basis: census
5 ran · 2 no recorded run
FunctionStatusWhere it lives
b2mb Ran
ran, honoured the contract we drafted
thudm/cogvlm2/finetune_demo/peft_lora.py
code served (permissive licence) · get_code("32380a050ca033d4")
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 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.

ARGS = {
    'x': 2097152  # 2 * 2^20 = 2 MB in bytes, will return 2 when converted
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
encode_image Ran
ran; our contract draft was wrong, not the code
thudm/cogvlm2/basic_demo/openai_api_request.py
code served (permissive licence) · get_code("c0b1c7a482944767")
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 base64
import tempfile
import os

# Create a temporary image file for testing
# We'll create a simple valid image file (a minimal PNG)
temp_dir = tempfile.mkdtemp()

# Create a minimal valid PNG file (1x1 transparent pixel)
png_data = base64.b64decode(
    'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=='
)

image_path = os.path.join(temp_dir, 'test_image.png')
with open(image_path, 'wb') as f:
    f.write(png_data)

ARGS = {
    'image_path': image_path
}
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
get_image Ran
ran, honoured the contract we drafted
thudm/glm-4/inference/trans_web_vision_demo.py
code served (permissive licence) · get_code("3ff3af9bca0ae239")
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 Image. 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 PIL import Image
import io

# Create a small valid RGB image in memory
def create_test_image():
    img_array = np.random.randint(0, 256, (10, 10, 3), dtype=np.uint8)
    return Image.fromarray(img_array, mode='RGB')

# Create a temporary image file in memory
test_image = create_test_image()
image_bytes = io.BytesIO()
test_image.save(image_bytes, format='PNG')
image_bytes.seek(0)
image_path_value = image_bytes

ARGS = {
    'image_path': image_bytes,
    'image_url': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, requests, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
load_video_data Ran
ran; our contract draft was wrong, not the code
thudm/cogvlm2/video_demo/gradio_demo.py
code served (permissive licence) · get_code("421ced503e309080")
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 bytes. 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 tempfile
import os

# Create a temporary video file for testing
temp_dir = tempfile.mkdtemp()
video_path = os.path.join(temp_dir, "test_video.mp4")

# Write some dummy video data to the file
with open(video_path, 'wb') as f:
    f.write(b'\x00\x01\x02\x03' * 100)

ARGS = {
    'video_path': video_path
}
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 bytes — a bytes output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a bytes 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
preprocess_messages Ran
ran; our contract draft was wrong, not the code
thudm/glm-4/inference/trans_web_demo.py
code served (permissive licence) · get_code("86830d055a7a9c5d")
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 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

torch.manual_seed(0)

# Construct arguments for preprocess_messages
history = [
    ("What is AI?", "AI is artificial intelligence."),
    ("Tell me more.", "AI involves machine learning and deep learning."),
    ("Can you help me?", "")  # Last entry with empty model_msg
]

system_prompt = "You are a helpful assistant."

ARGS = {
    "history": history,
    "system_prompt": system_prompt
}
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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
process_batch Ran
ran; our contract draft was wrong, not the code
thudm/glm-4/finetune/finetune.py
code served (permissive licence) · get_code("6c594f1eecbcd9c8")
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. 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
from collections.abc import Mapping, Sequence

torch.manual_seed(0)

class MockTokenizer:
    """Minimal tokenizer that implements apply_chat_template."""
    def apply_chat_template(self, messages, tokenize=True, return_dict=False):
        # Return a list of token IDs
        # Include special tokens: 151331, 151333 (start), 151337 (assistant marker), 151336 (end)
        if tokenize:
            tokens = [151331, 151333, 151337, 100, 101, 151336]
            if not return_dict:
                return tokens
            return {"input_ids": tokens}
        return "[CHAT]"

batch = {
    'messages': [
        [
            {'role': 'system', 'content': 'You are helpful.'},
            {'role': 'user', 'content': 'Hello'},
            {'role': 'assistant', 'content': 'Hi there'}
        ],
        [
            {'role': 'system', 'content': 'Be concise.'},
            {'role': 'user', 'content': 'What is 2+2?'},
            {'role': 'assistant', 'content': '4'}
        ]
    ]
}

tokenizer = MockTokenizer()
max_input_length = 50
max_output_length = 30
combine = False

ARGS = {
    'batch': batch,
    'tokenizer': tokenizer,
    'max_input_length': max_input_length,
    'max_output_length': max_output_length,
    'combine': combine
}
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
process_batch Ran
ran; our contract draft was wrong, not the code
thudm/glm-4/finetune/finetune_vision.py
code served (permissive licence) · get_code("57df729a586c895a")
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. 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
from collections.abc import Mapping, Sequence
from PIL import Image

torch.manual_seed(0)

class MockTokenizer:
    """Mock PreTrainedTokenizer for testing"""
    def apply_chat_template(self, messages, tokenize=True, return_dict=True, padding=True):
        # Returns a dict with input_ids, attention_mask, and images
        # Simulating the tokenizer output
        batch_size = len(messages)
        seq_len = 5
        return {
            'input_ids': torch.randint(0, 1000, (batch_size, seq_len)).tolist(),
            'attention_mask': torch.ones(batch_size, seq_len).tolist(),
            'images': [torch.randn(1, 3, 224, 224)]  # Mock image tensor
        }

# Create a minimal batch
batch = {
    'messages': [
        [
            {
                'role': 'user',
                'content': 'Hello',
                'image': None
            },
            {
                'role': 'assistant',
                'content': 'Hi there',
                'image': None
            }
        ],
        [
            {
                'role': 'system',
                'content': 'You are helpful',
                'image': None
            },
            {
                'role': 'user',
                'content': 'What is this?',
                'image': None
            }
        ]
    ]
}

tokenizer = MockTokenizer()

ARGS = {
    'batch': batch,
    'tokenizer': tokenizer,
    'max_input_length': 128,
    'max_output_length': 64,
    'combine': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, 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
process_batch_eval Ran
ran; our contract draft was wrong, not the code
thudm/glm-4/finetune/finetune.py
code served (permissive licence) · get_code("2cc2c269bdedbd33")
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. 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
from collections.abc import Mapping, Sequence

torch.manual_seed(0)

class MockTokenizer:
    def apply_chat_template(self, messages, tokenize=True, return_dict=False):
        # Return a list of token IDs that includes the special tokens used in the function
        # The function looks for token 151337 (assistant end marker)
        # and uses 151331, 151333 (special markers) and 151336 (end token)
        if tokenize:
            # Create a reasonable token sequence with the required special tokens
            base_sequence = [151331, 151333, 151337, 151336]
            # Make it long enough to test slicing
            result = base_sequence + [100 + i for i in range(10)]
            return result
        return {"input_ids": [151331, 151333, 151337, 151336]}

batch = {
    'messages': [
        [
            {'role': 'system', 'content': 'You are a helpful assistant.'},
            {'role': 'user', 'content': 'Hello'},
            {'role': 'assistant', 'content': 'Hi there!'}
        ],
        [
            {'role': 'system', 'content': 'You are helpful.'},
            {'role': 'user', 'content': 'How are you?'},
            {'role': 'assistant', 'content': 'I am fine.'}
        ]
    ]
}

tokenizer = MockTokenizer()

ARGS = {
    'batch': batch,
    'tokenizer': tokenizer,
    'max_input_length': 100,
    'max_output_length': 50,
    'combine': False
}
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
process_history_and_images Ran
ran; our contract draft was wrong, not the code
thudm/cogvlm2/basic_demo/openai_api_demo.py
code served (permissive licence) · get_code("593ba9ffcbbd977e")
How it ran

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

import base64
from typing import List, Literal, Union, Tuple, Optional
from pydantic import BaseModel
from PIL import Image
from io import BytesIO
import numpy as np

class ImageUrl(BaseModel):
    url: str

class TextContent(BaseModel):
    type: Literal['text']
    text: str

class ImageUrlContent(BaseModel):
    type: Literal['image_url']
    image_url: ImageUrl

ContentItem = Union[TextContent, ImageUrlContent]

class ChatMessageInput(BaseModel):
    role: Literal['user', 'assistant', 'system']
    content: Union[str, List[ContentItem]]
    name: Optional[str] = None

# Create a small PIL image and encode it as base64
def create_base64_image():
    img = Image.new('RGB', (4, 4), color=(73, 109, 137))
    buffer = BytesIO()
    img.save(buffer, format='JPEG')
    img_base64 = base64.b64encode(buffer.getvalue()).decode('utf-8')
    return f'data:image/jpeg;base64,{img_base64}'

base64_image_url = create_base64_image()

# Construct messages list with various content types
messages = [
    ChatMessageInput(
        role='user',
        content='What is this?'
    ),
    ChatMessageInput(
        role='assistant',
        content='This is a question.'
    ),
    ChatMessageInput(
        role='user',
        content=[
            TextContent(type='text', text='Can you describe the image?'),
            ImageUrlContent(
                type='image_url',
                image_url=ImageUrl(url=base64_image_url)
            )
        ]
    ),
    ChatMessageInput(
        role='assistant',
        content='The image shows a colored square.'
    ),
    ChatMessageInput(
        role='user',
        content='What color is it?'
    )
]

ARGS = {
    'messages': messages
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, pydantic, requests — 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
process_message Ran
ran; our contract draft was wrong, not the code
thudm/glm-4/finetune/finetune.py
code served (permissive licence) · get_code("7e93b9f509accf1c")
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

# Test case 1: message with 'tools' and 'role' == 'system'
message_1 = {
    'role': 'system',
    'tools': [
        {
            'function': {
                'parameters': {
                    'properties': {
                        'param1': {'type': 'string'},
                        'param2': None,
                        'param3': {'type': 'number'}
                    }
                }
            }
        }
    ]
}

# Test case 2: message with 'tools' but 'role' != 'system'
message_2 = {
    'role': 'user',
    'tools': [
        {
            'function': {
                'parameters': {
                    'properties': {
                        'param1': {'type': 'string'}
                    }
                }
            }
        }
    ],
    'content': 'hello'
}

# Test case 3: message without 'tools'
message_3 = {
    'role': 'assistant',
    'content': 'response'
}

ARGS = {
    'message': message_1
}
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
process_response Ran
ran; our contract draft was wrong, not the code
thudm/glm-4/demo/composite_demo/src/client.py
code served (permissive licence) · get_code("51ffd8516205ff45")
How it ran

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

import json
from copy import deepcopy

# Minimal setup for process_response
output = "user message<|assistant|>metadata_key\nresponse content here"

history = [
    {'role': 'user', 'content': 'hello'},
    {'role': 'system', 'content': 'system prompt', 'tools': []}
]

ARGS = {
    'output': output,
    'history': history
}
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 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
recur_move_to Ran
ran; our contract draft was wrong, not the code
thudm/cogvlm2/basic_demo/cli_demo_batch_inference.py
code served (permissive licence) · get_code("80585f881584d654")
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)

# The function recursively moves items to a target device if they match a criterion.
# It calls item.to(tgt) on matching items, so we need objects with a .to() method.
# It also recurses through lists, tuples, and dicts.

# Create a criterion function that identifies torch tensors
def is_tensor(obj):
    return isinstance(obj, torch.Tensor)

# Create a nested structure with tensors and non-tensors
nested_item = {
    "tensor_a": torch.randn(2, 4),
    "tensor_b": torch.randn(3, 5),
    "list_of_tensors": [
        torch.randn(2, 3),
        torch.randn(4, 2)
    ],
    "tuple_of_tensors": (
        torch.randn(1, 4),
        torch.randn(2, 2)
    ),
    "scalar": 42,
    "string": "hello",
    "nested_dict": {
        "inner_tensor": torch.randn(3, 4),
        "inner_value": 3.14
    }
}

# Target device (CPU)
target_device = "cpu"

# Criterion function
criterion = is_tensor

ARGS = {
    "item": nested_item,
    "tgt": target_device,
    "criterion_func": criterion
}
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
create_chat_completion Not yet run
unverified (harvested, no recorded run)
thudm/cogvlm2/basic_demo/openai_api_request.py
code served (permissive licence) · get_code("3a5a5045be85ded3")
How it ran

no invocation recorded.

generate_cogvlm Not yet run
unverified (harvested, no recorded run)
thudm/cogvlm2/basic_demo/openai_api_demo.py
code served (permissive licence) · get_code("1481999518910902")
How it ran

no invocation recorded.

generate_glm4v Not yet run
unverified (harvested, no recorded run)
thudm/glm-4/inference/glm4v_server.py
code served (permissive licence) · get_code("66a222f9124359df")
How it ran

no invocation recorded.

load_tokenizer_and_model Not yet run
unverified (harvested, no recorded run)
thudm/glm-4/finetune/finetune_vision.py
code served (permissive licence) · get_code("a000febbe236a229")
How it ran

no invocation recorded.

process_batch_eval Not yet run
unverified (harvested, no recorded run)
thudm/glm-4/finetune/finetune_vision.py
code served (permissive licence) · get_code("e816697d6260afdd")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 13 are also present in other papers whose code we hold (13 with at least one paper dated earlier, 2 the same month, 2 later) and 4 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
encode_image 76 other papers
26 dated earlier, 2 the same month, 47 later, 1 same year, order not determinable
2309.05950 (2023-09)
Language Models as Black-Box Optimizers for Vision-Language Models
2311.15732 (2023-11)
GPT4Vis: What Can GPT-4 Do for Zero-shot Visual Recognition?
2312.14867 (2023-12)
VIEScore: Towards Explainable Metrics for Conditional Image Synthesis Evaluation
and 73 more not named here
b2mb 11 other papers
6 dated earlier, 1 the same month, 4 later
2303.18223 (2023-03)
A Survey of Large Language Models
2401.16405 (2024-01)
Scaling Sparse Fine-Tuning to Large Language Models
2402.02834 (2024-02)
Shortened LLaMA: Depth Pruning for Large Language Models with Comparison of Retraining Methods
and 8 more not named here
load_tokenizer_and_model 2 other papers
2 dated earlier
2312.08914 (2023-12)
CogAgent: A Visual Language Model for GUI Agents
2406.12793 (2024-06)
ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Tools
generate_glm4v 1 other paper
1 dated earlier
2406.12793 (2024-06)
ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Tools
get_image 1 other paper
1 dated earlier
2406.12793 (2024-06)
ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Tools
preprocess_messages 1 other paper
1 dated earlier
2406.12793 (2024-06)
ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Tools
process_batch 1 other paper
1 dated earlier
2406.12793 (2024-06)
ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Tools
process_batch 1 other paper
1 dated earlier
2406.12793 (2024-06)
ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Tools
process_batch_eval 1 other paper
1 dated earlier
2406.12793 (2024-06)
ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Tools
process_batch_eval 1 other paper
1 dated earlier
2406.12793 (2024-06)
ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Tools
process_message 1 other paper
1 dated earlier
2406.12793 (2024-06)
ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Tools
process_response 1 other paper
1 dated earlier
2406.12793 (2024-06)
ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Tools
recur_move_to 1 other paper
1 dated earlier
2311.09580 (2023-11)
MMoE: Enhancing Multimodal Models with Mixtures of Multimodal Interaction Experts

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

Beginning with VisualGLM and CogVLM, we are continuously exploring VLMs in pursuit of enhanced vision-language fusion, efficient higher-resolution architecture, and broader modalities and applications. Here we propose the CogVLM2 family, a new generation of visual language models for image and video understanding including CogVLM2, CogVLM2-Video and GLM-4V. As an image understanding model, CogVLM2 inherits the visual expert architecture with improved training recipes in both pre-training and post-training stages, supporting input resolution up to $1344 \times 1344$ pixels. As a video understanding model, CogVLM2-Video integrates multi-frame input with timestamps and proposes automated temporal grounding data construction. Notably, CogVLM2 family has achieved state-of-the-art results on benchmarks like MMBench, MM-Vet, TextVQA, MVBench and VCGBench. All models are open-sourced in https://github.com/THUDM/CogVLM2 and https://github.com/THUDM/GLM-4, contributing to the advancement of the field.

For agents

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

get_harvested_code_for_paper("2408.16500")
get_code_for_paper("2408.16500")
have("2408.16500")

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

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

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

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

Connect an agent — have() is free.