SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2408.12245 · 2024

Scalable Autoregressive Image Generation with Mamba

arXiv · PDF · Open in the Atlas

Code that ran

10 of 13 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 9 failures of our instrument; 3 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2408.12245.json · badge: /api/ran/2408.12245.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
hp-l33/aim canonical (classifier label)
classifier basis: census
10 ran · 3 no recorded run
FunctionStatusWhere it lives
Normalize Ran
ran; our contract draft was wrong, not the code
hp-l33/aim/models/stage1/vq_model.py
pointer only (licence: MIT); the stored copy get_code serves, from gogoduan/got-r1, is pointer only (licence: NONE) · get_code("01b5cf639b6bac89")
How it ran

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

collate_fn Ran
ran; our contract draft was wrong, not the code
hp-l33/aim/trainer.py
code served (permissive licence) · get_code("4ef4ba3561e3efa7")
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 example data: list of (input_tensor, label) tuples
# The function expects examples where example[0] is a tensor and example[1] is a label
examples = [
    (torch.randn(4), 0),  # input tensor of size 4, label 0
    (torch.randn(4), 1),  # input tensor of size 4, label 1
]

ARGS = {
    'examples': examples
}
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
compute_entropy_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hp-l33/aim/models/stage1/vq_model.py
pointer only (licence: MIT); the stored copy get_code serves, from gogoduan/got-r1, is pointer only (licence: NONE) · get_code("774c95b77d7621f3")
How it ran

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

get_checkpoint_path Ran
ran; our contract draft was wrong, not the code
hp-l33/aim/util/helper.py
code served (permissive licence) · get_code("9206a5875c1b30e9")
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 os
import tempfile
import shutil

# Create a temporary directory structure to simulate the checkpoint directory
temp_root = tempfile.mkdtemp()
checkpoint_root = os.path.join(temp_root, 'checkpoints', 'mamba-330m_line')
os.makedirs(checkpoint_root, exist_ok=True)

# Create a subdirectory with a dummy pytorch_model.bin file
subdir_name = 'checkpoint_step_1000'
subdir_path = os.path.join(checkpoint_root, subdir_name)
os.makedirs(subdir_path, exist_ok=True)

# Create the pytorch_model.bin file
model_file = os.path.join(subdir_path, 'pytorch_model.bin')
with open(model_file, 'w') as f:
    f.write('dummy model')

ARGS = {
    'root_dir': checkpoint_root
}
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_obj_from_str Ran
ran; our contract draft was wrong, not the code
hp-l33/aim/util/helper.py
code served (permissive licence) · get_code("221b2d116fdf1032")
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 type. 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 importlib
import torch
import torch.nn as nn

torch.manual_seed(0)

# The function get_obj_from_str takes a string like "module.path.ClassName"
# and returns the class/object by:
# 1. Splitting on the last dot to get module path and class name
# 2. Optionally reloading the module if reload=True
# 3. Importing the module and getting the attribute (class/object)

# We need to provide:
# - string: a valid module.class path that exists
# - reload: boolean flag

# Using a built-in class that's guaranteed to exist
string_value = "torch.nn.Linear"
reload_value = False

ARGS = {
    "string": string_value,
    "reload": reload_value,
}
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 type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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
modify_logit_for_repetition_penalty Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hp-l33/aim/models/stage2/generation.py
pointer only (licence: MIT); the stored copy get_code serves, from XsChen524/mode-mamba-ts, is pointer only (licence: NONE) · get_code("da95e9a7906f3d52")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from XsChen524/mode-mamba-ts, 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.

modulate Ran
ran; our contract draft was wrong, not the code
hp-l33/aim/models/stage2/block.py
code served (permissive licence) · get_code("03310bba324ae4fb")
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 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 small tensors for the modulate function
# x: input tensor with shape (batch_size, feature_dim)
x = torch.randn(2, 4)

# shift: tensor that will be unsqueezed to (batch_size, 1)
# so it should have shape (batch_size,)
shift = torch.randn(2)

# scale: tensor that will be unsqueezed to (batch_size, 1)
# so it should have shape (batch_size,)
scale = torch.randn(2)

ARGS = {
    "x": x,
    "shift": shift,
    "scale": scale,
}
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 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
nonlinearity Ran
ran; our contract draft was wrong, not the code
hp-l33/aim/models/stage1/vq_model.py
code served (permissive licence) · get_code("3137073275f8c21a")
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 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)

# The function takes a single parameter 'x' which is used with:
# - multiplication operator (*)
# - torch.sigmoid() function
# This means x should be a tensor

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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 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
pil_loader Ran
ran, honoured the contract we drafted
hp-l33/aim/util/data.py
code served (permissive licence) · get_code("68729b3b14f1970a")
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 tempfile
import os
from PIL import Image
import numpy as np

# Create a temporary directory and a small test image
temp_dir = tempfile.mkdtemp()
test_image_path = os.path.join(temp_dir, "test_image.png")

# Create a small RGB image and save it
img_array = np.random.randint(0, 256, (4, 3, 3), dtype=np.uint8)
img = Image.fromarray(img_array, mode='RGB')
img.save(test_image_path)

ARGS = {
    'path': test_image_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — 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
sample Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hp-l33/aim/models/stage2/generation.py
code served (permissive licence) · get_code("d856f17cd1fdf61e")
How it ran

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

import torch

torch.manual_seed(0)

# Create a small batch of logits
# Shape: (batch_size=2, vocab_size=4)
logits = torch.randn(2, 4)

ARGS = {
    "logits": logits,
    "top_k": 2,
    "top_p": 0.9,
    "min_p": 0.0,
    "temperature": 1.0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family int, shape (2,) — shape (2,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
create_training_arguments Not yet run
unverified (harvested, no recorded run)
hp-l33/aim/train_stage2.py
code served (permissive licence) · get_code("bd88744ce2657bd9")
How it ran

no invocation recorded.

decode Not yet run
unverified (harvested, no recorded run)
hp-l33/aim/models/stage2/generation.py
code served (permissive licence) · get_code("09c473eb11e68418")
How it ran

no invocation recorded.

instantiate_from_config Not yet run
unverified (harvested, no recorded run)
hp-l33/aim/util/helper.py
pointer only (licence: MIT); the stored copy get_code serves, from ZhengyaoFang/RS-STE, is pointer only (licence: NONE) · get_code("f0ac78b4e05be194")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from ZhengyaoFang/RS-STE, 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. No invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 7 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 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
nonlinearity 156 other papers
95 dated earlier, 6 the same month, 51 later, 4 same year, order not determinable · 25 only as an assembly brick
2104.07652 (2021-04)
Geometry-Free View Synthesis: Transformers and no 3D Priors
2106.00132 (2021-06)
On Fast Sampling of Diffusion Probabilistic Models
2106.06819 (2021-06)
D2C: Diffusion-Denoising Models for Few-shot Conditional Generation
and 153 more not named here
modulate 101 other papers
40 dated earlier, 2 the same month, 58 later, 1 undated · 29 only as an assembly brick
2202.04200 (2022-02)
MaskGIT: Masked Generative Image Transformer
2203.10897 (2022-03)
Unified Multivariate Gaussian Mixture for Efficient Neural Image Compression
2212.09748 (2022-12)
Scalable Diffusion Models with Transformers
and 98 more not named here
get_obj_from_str 54 other papers
35 dated earlier, 18 later, 1 same year, order not determinable · 12 only as an assembly brick
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2102.05379 (2021-02)
Argmax Flows and Multinomial Diffusion: Learning Categorical Distributions
2112.00384 (2021-12)
Exploration into Translation-Equivariant Image Quantization
and 51 more not named here
instantiate_from_config 13 other papers
7 dated earlier, 6 later · 1 only as an assembly brick
2112.00384 (2021-12)
Exploration into Translation-Equivariant Image Quantization
2301.13670 (2023-01)
What Makes Good Examples for Visual In-Context Learning?
2306.14795 (2023-06)
MotionGPT: Human Motion as a Foreign Language
and 10 more not named here
compute_entropy_loss 10 other papers
10 later · 2 only as an assembly brick
2411.15867 (2024-11)
PanoLlama: Generating Endless and Coherent Panoramas with Next-Token-Prediction LLMs
2502.20313 (2025-02)
FlexVAR: Flexible Visual Autoregressive Modeling without Residual Prediction
2503.08686 (2025-03)
OmniMamba: Efficient and Unified Multimodal Understanding and Generation via State Space Models
and 7 more not named here
Normalize 9 other papers
9 later · 3 only as an assembly brick
2411.15867 (2024-11)
PanoLlama: Generating Endless and Coherent Panoramas with Next-Token-Prediction LLMs
2502.20313 (2025-02)
FlexVAR: Flexible Visual Autoregressive Modeling without Residual Prediction
2503.08686 (2025-03)
OmniMamba: Efficient and Unified Multimodal Understanding and Generation via State Space Models
and 6 more not named here
modify_logit_for_repetition_penalty 6 other papers
4 dated earlier, 1 the same month, 1 later
2403.16899 (2024-03)
State Space Models as Foundation Models: A Control Theoretic Overview
2406.03344 (2024-06)
Audio Mamba: Bidirectional State Space Model for Audio Representation Learning
2406.10700 (2024-06)
Voxel Mamba: Group-Free State Space Models for Point Cloud based 3D Object Detection
and 3 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

We introduce AiM, an autoregressive (AR) image generative model based on Mamba architecture. AiM employs Mamba, a novel state-space model characterized by its exceptional performance for long-sequence modeling with linear time complexity, to supplant the commonly utilized Transformers in AR image generation models, aiming to achieve both superior generation quality and enhanced inference speed. Unlike existing methods that adapt Mamba to handle two-dimensional signals via multi-directional scan, AiM directly utilizes the next-token prediction paradigm for autoregressive image generation. This approach circumvents the need for extensive modifications to enable Mamba to learn 2D spatial representations. By implementing straightforward yet strategically targeted modifications for visual generative tasks, we preserve Mamba's core structure, fully exploiting its efficient long-sequence modeling capabilities and scalability. We provide AiM models in various scales, with parameter counts ranging from 148M to 1.3B. On the ImageNet1K 256*256 benchmark, our best AiM model achieves a FID of 2.21, surpassing all existing AR models of comparable parameter counts and demonstrating significant competitiveness against diffusion models, with 2 to 10 times faster inference speed. Code is available at https://github.com/hp-l33/AiM

For agents

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

get_harvested_code_for_paper("2408.12245")
get_code_for_paper("2408.12245")
have("2408.12245")

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

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

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

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

Connect an agent — have() is free.