SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2404.02905 · 2024

Visual Autoregressive Modeling: Scalable Image Generation via Next-Scale Prediction

arXiv · PDF · Open in the Atlas

Code that ran

7 of 11 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 1 has no contract verdict; 6 failures of our instrument; 4 no recorded run), measured 2026-11-24; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2404.02905.json · badge: /api/ran/2404.02905.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
EkaterinaXie/LiteVAR community (classifier label)
classifier basis not recorded on the link
4 ran · 4 no recorded run
FoundationVision/Infinity extension (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
FunctionStatusWhere it lives
Normalize Ran
ran; our contract draft was wrong, not the code
EkaterinaXie/LiteVAR/models/basic_vae.py
code served (permissive licence) · get_code("9fcdaa6e423e8aa7")
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 GroupNorm. 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)

# The Normalize function takes in_channels and num_groups (with default 32)
# It returns a GroupNorm layer

# in_channels: number of channels for the GroupNorm layer
# num_groups: number of groups to separate the channels into (default 32)

# We need to provide valid arguments where num_groups divides in_channels evenly
# Let's use in_channels=64 so it's divisible by the default num_groups=32

ARGS = {
    'in_channels': 64,
    'num_groups': 32
}
Setup block drafted by
a language model, Claude Sonnet 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 GroupNorm — a GroupNorm output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a GroupNorm 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
allgather Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
EkaterinaXie/LiteVAR/dist.py
code served (permissive licence) · get_code("e847ee15f089dee6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. 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, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.distributed as tdist

torch.manual_seed(0)

# Create a small tensor for testing
# The function checks t.is_cuda and uses it in all_gather and torch.cat
# Shape: (2, 4) - small batch with 4 dimensions
tensor_arg = torch.randn(2, 4)

# Define ARGS dict with all parameters
ARGS = {
    "t": tensor_arg,
    "cat": True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_params_num Ran
ran; our contract draft was wrong, not the code
FoundationVision/Infinity/infinity/models/infinity.py
code served (permissive licence) · get_code("6a19741de3a68058")
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 str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - d: appears to be an integer (used in multiplication: d * (w ** 2 * 8 + w * m * 2))
# - w: appears to be an integer (used in arithmetic operations)
# - mlp: appears to be an integer or float (used in: round(mlp * w / 256) * 256)
# All parameters are numeric values used in mathematical calculations

ARGS = {
    "d": 12,
    "w": 768,
    "mlp": 3072
}
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 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
nonlinearity Ran
ran; our contract draft was wrong, not the code
EkaterinaXie/LiteVAR/models/basic_vae.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
sample_with_top_k_top_p_also_inplace_modifying_logits_ Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
FoundationVision/Infinity/infinity/models/infinity.py
code served (permissive licence) · get_code("9526ce09c7148703")
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 3, dtype family int, shape (2, 3, 1) 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)

# Construct logits tensor with shape (B, l, V)
# B=2 (batch), l=3 (sequence length), V=4 (vocabulary size)
logits_BlV = torch.randn(2, 3, 4)

# top_k parameter: number of top tokens to keep
top_k = 2

# top_p parameter: nucleus sampling threshold
top_p = 0.9

# rng parameter: random number generator
rng = torch.Generator()
rng.manual_seed(42)

# num_samples parameter: number of samples to draw
num_samples = 1

ARGS = {
    "logits_BlV": logits_BlV,
    "top_k": top_k,
    "top_p": top_p,
    "rng": rng,
    "num_samples": num_samples,
}
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 3, dtype family int, shape (2, 3, 1) — shape (2, 3, 1) 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
sampling_with_top_k_top_p_also_inplace_modifying_probs_ Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
FoundationVision/Infinity/infinity/models/infinity.py
code served (permissive licence) · get_code("5451c3f14c7e520c")
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 3, dtype family int, shape (2, 3, 1) 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)

# Construct a small probability tensor with shape (B, l, V)
# B=2 (batch), l=3 (sequence length), V=4 (vocabulary size)
probs_BlV = torch.rand(2, 3, 4)
probs_BlV = probs_BlV / probs_BlV.sum(dim=-1, keepdim=True)  # normalize to valid probabilities

# Create a random number generator
rng = torch.Generator()
rng.manual_seed(42)

ARGS = {
    "probs_BlV": probs_BlV,
    "top_k": 2,
    "top_p": 0.9,
    "rng": rng,
    "num_samples": 1
}
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 3, dtype family int, shape (2, 3, 1) — shape (2, 3, 1) 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
should_replace Ran
ran on a synthesized input
EkaterinaXie/LiteVAR/demo_sample_batch_quant.py
code served (permissive licence) · get_code("3c57a99a764d06f2")
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 bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function takes a single parameter 'name' which is a string
# It checks if the name is in a skip_list and returns whether it should be replaced
# We need to provide a name string that will be tested

name = "blocks.0.ffn.fc1"

ARGS = {
    "name": name
}
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 bool, ndim 0, dtype family float, 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
allreduce Not yet run
unverified (harvested, no recorded run)
EkaterinaXie/LiteVAR/dist.py
code served (permissive licence) · get_code("ff4c548fd07140d0")
How it ran

no invocation recorded.

make_attn Not yet run
unverified (harvested, no recorded run)
EkaterinaXie/LiteVAR/models/basic_vae.py
code served (permissive licence) · get_code("793c7e2489dd8dfc")
How it ran

no invocation recorded.

new_group Not yet run
unverified (harvested, no recorded run)
EkaterinaXie/LiteVAR/dist.py
code served (permissive licence) · get_code("826ea3fc406a6a09")
How it ran

no invocation recorded.

slow_attn_ban_mini_token_2 Not yet run
unverified (harvested, no recorded run)
EkaterinaXie/LiteVAR/models/ban_all_1.py
code served (permissive licence) · get_code("577a75b98b013aed")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 9 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 2 the same month, 9 later) and 2 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
73 dated earlier, 3 the same month, 76 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
Normalize 54 other papers
19 dated earlier, 3 the same month, 31 later, 1 same year, order not determinable · 3 only as an assembly brick
2204.06125 (2022-04)
Hierarchical Text-Conditional Image Generation with CLIP Latents
2208.13753 (2022-08)
Frido: Feature Pyramid Diffusion for Complex Scene Image Synthesis
2211.13221 (2022-11)
Latent Video Diffusion Models for High-Fidelity Long Video Generation
and 51 more not named here
allgather 8 other papers
8 later
2406.09750 (2024-06)
ControlVAR: Exploring Controllable Visual Autoregressive Modeling
2408.01181 (2024-08)
VAR-CLIP: Text-to-Image Generator with Visual Auto-Regressive Modeling
2411.10433 (2024-11)
M-VAR: Decoupled Scale-wise Autoregressive Modeling for High-Quality Image Generation
and 5 more not named here
allreduce 8 other papers
8 later
2406.09750 (2024-06)
ControlVAR: Exploring Controllable Visual Autoregressive Modeling
2408.01181 (2024-08)
VAR-CLIP: Text-to-Image Generator with Visual Auto-Regressive Modeling
2411.10433 (2024-11)
M-VAR: Decoupled Scale-wise Autoregressive Modeling for High-Quality Image Generation
and 5 more not named here
make_attn 8 other papers
8 later
2408.01181 (2024-08)
VAR-CLIP: Text-to-Image Generator with Visual Auto-Regressive Modeling
2410.10812 (2024-10)
HART: Efficient Visual Generation with Hybrid Autoregressive Transformer
2411.10433 (2024-11)
M-VAR: Decoupled Scale-wise Autoregressive Modeling for High-Quality Image Generation
and 5 more not named here
new_group 8 other papers
8 later
2406.09750 (2024-06)
ControlVAR: Exploring Controllable Visual Autoregressive Modeling
2408.01181 (2024-08)
VAR-CLIP: Text-to-Image Generator with Visual Auto-Regressive Modeling
2411.10433 (2024-11)
M-VAR: Decoupled Scale-wise Autoregressive Modeling for High-Quality Image Generation
and 5 more not named here
sample_with_top_k_top_p_also_inplace_modifying_logits_ 5 other papers
5 later
2412.04431 (2024-12)
Infinity: Scaling Bitwise AutoRegressive Modeling for High-Resolution Image Synthesis
2507.18537 (2025-07)
TTS-VAR: A Test-Time Scaling Framework for Visual Auto-Regressive Generation
and 2 more not named here
get_params_num 4 other papers
4 later
2412.04431 (2024-12)
Infinity: Scaling Bitwise AutoRegressive Modeling for High-Resolution Image Synthesis
2508.15772 (2025-08)
Visual Autoregressive Modeling for Instruction-Guided Image Editing
and 1 more not named here
sampling_with_top_k_top_p_also_inplace_modifying_probs_ 4 other papers
4 later
2412.04431 (2024-12)
Infinity: Scaling Bitwise AutoRegressive Modeling for High-Resolution Image Synthesis
2508.15772 (2025-08)
Visual Autoregressive Modeling for Instruction-Guided Image Editing
and 1 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-24.

Repositories linked to this paper

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

Abstract

We present Visual AutoRegressive modeling (VAR), a new generation paradigm that redefines the autoregressive learning on images as coarse-to-fine "next-scale prediction" or "next-resolution prediction", diverging from the standard raster-scan "next-token prediction". This simple, intuitive methodology allows autoregressive (AR) transformers to learn visual distributions fast and generalize well: VAR, for the first time, makes GPT-like AR models surpass diffusion transformers in image generation. On ImageNet 256x256 benchmark, VAR significantly improve AR baseline by improving Frechet inception distance (FID) from 18.65 to 1.73, inception score (IS) from 80.4 to 350.2, with around 20x faster inference speed. It is also empirically verified that VAR outperforms the Diffusion Transformer (DiT) in multiple dimensions including image quality, inference speed, data efficiency, and scalability. Scaling up VAR models exhibits clear power-law scaling laws similar to those observed in LLMs, with linear correlation coefficients near -0.998 as solid evidence. VAR further showcases zero-shot generalization ability in downstream tasks including image in-painting, out-painting, and editing. These results suggest VAR has initially emulated the two important properties of LLMs: Scaling Laws and zero-shot task generalization. We have released all models and codes to promote the exploration of AR/VAR models for visual generation and unified learning.

For agents

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

get_harvested_code_for_paper("2404.02905")
get_code_for_paper("2404.02905")
have("2404.02905")

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

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

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

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

Connect an agent — have() is free.