SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2404.06773 · 2024

Adapting LLaMA Decoder to Vision Transformer

arXiv · PDF · Open in the Atlas

Code that ran

12 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; 5 honoured the contract we drafted, 2 violated it and 0 have no contract verdict; 5 failures of our instrument; 1 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/2404.06773.json · badge: /api/ran/2404.06773.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
techmonsterwang/illama canonical (classifier label)
classifier basis: census
12 ran · 1 no recorded run
FunctionStatusWhere it lives
apply_rotary_emb Ran
ran; our contract draft was wrong, not the code
techmonsterwang/illama/models/illama.py
pointer only (licence: NONE) · get_code("5412a244b5b49ca7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, techmonsterwang/illama 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.

build_transform Ran
ran; our contract draft was wrong, not the code
techmonsterwang/illama/datasets.py
pointer only (licence: NONE) · get_code("6a0317bfd6be9557")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, techmonsterwang/illama 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.

cosine_scheduler Ran
ran, honoured the contract we drafted
techmonsterwang/illama/utils.py
pointer only (licence: NONE); the stored copy get_code serves, from boyazeng/understand_bias, is pointer only (licence: NONE) · get_code("b700fb0a3496b255")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, techmonsterwang/illama 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.

drop_scheduler Ran
ran, honoured the contract we drafted
techmonsterwang/illama/drop_scheduler.py
pointer only (licence: NONE); the stored copy get_code serves, from facebookresearch/dropout, is pointer only (licence: NOASSERTION) · get_code("5e1695210460b9d6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, techmonsterwang/illama 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_num_layer_for_convnext Ran
ran, honoured the contract we drafted
techmonsterwang/illama/optim_factory.py
pointer only (licence: NONE); the stored copy get_code serves, from boyazeng/understand_bias, is pointer only (licence: NONE) · get_code("199223de2f9704cf")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, techmonsterwang/illama 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_parameter_groups Ran
ran; our contract draft was wrong, not the code
techmonsterwang/illama/optim_factory.py
pointer only (licence: NONE); the stored copy get_code serves, from boyazeng/understand_bias, is pointer only (licence: NONE) · get_code("0ef0019514eaaa09")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, techmonsterwang/illama 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.

mask_scheduler Ran
ran, honoured the contract we drafted
techmonsterwang/illama/mask_scheduler.py
pointer only (licence: NONE) · get_code("d26194ed53c706da")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, techmonsterwang/illama 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.

precompute_freqs_cis Ran
ran, violated the contract we drafted
techmonsterwang/illama/models/illama.py
pointer only (licence: NONE); the stored copy get_code serves, from meituan-automl/visionllama, is pointer only (licence: NONE) · get_code("14a84c2cbfebc413")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, techmonsterwang/illama 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.

reg_scheduler Ran
ran, honoured the contract we drafted
techmonsterwang/illama/utils.py
pointer only (licence: NONE) · get_code("1d7e5aed37e593e4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, techmonsterwang/illama 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.

reshape_for_broadcast Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
techmonsterwang/illama/models/illama.py
pointer only (licence: NONE); the stored copy get_code serves, from alpha-vllm/llama2-accessory, is pointer only (licence: NOASSERTION) · get_code("70bf6ebaafd266c4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, techmonsterwang/illama 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.

str2bool Ran
ran, violated the contract we drafted
techmonsterwang/illama/main_soft.py
pointer only (licence: NONE); the stored copy get_code serves, from njuvision/mpa, is pointer only (licence: NOASSERTION) · get_code("ecf287c12bb06741")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, techmonsterwang/illama 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.

uniform_element_selection Ran
ran; our contract draft was wrong, not the code
techmonsterwang/illama/llama2/weight_selection.py
pointer only (licence: NONE) · get_code("7d05bb3d813045ba")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, techmonsterwang/illama 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.

build_dataset Not yet run
unverified (harvested, no recorded run)
techmonsterwang/illama/datasets.py
pointer only (licence: NONE) · get_code("9f7ea37592e1e7c7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, techmonsterwang/illama 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, 10 are also present in other papers whose code we hold (10 with at least one paper dated earlier, 4 the same month, 9 later) and 3 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
str2bool 175 other papers
118 dated earlier, 1 the same month, 55 later, 1 same year, order not determinable · 2 only as an assembly brick
1406.6247 (2014-06)
Recurrent Models of Visual Attention
1603.09382 (2016-03)
Deep Networks with Stochastic Depth
1710.10196 (2017-10)
Progressive Growing of GANs for Improved Quality, Stability, and Variation
and 172 more not named here
reshape_for_broadcast 58 other papers
26 dated earlier, 2 the same month, 30 later · 2 only as an assembly brick
2023.emnlp-main.534 (2023 (year only))
Disentangling Transformer Language Models as Superposed Topic Models
2303.09736 (2023-03)
Dynamic Structure Pruning for Compressing CNNs
2307.09288 (2023-07)
Llama 2: Open Foundation and Fine-Tuned Chat Models
and 55 more not named here
apply_rotary_emb 55 other papers
22 dated earlier, 2 the same month, 31 later · 1 only as an assembly brick
2023.emnlp-main.534 (2023 (year only))
Disentangling Transformer Language Models as Superposed Topic Models
2303.09736 (2023-03)
Dynamic Structure Pruning for Compressing CNNs
2307.09288 (2023-07)
Llama 2: Open Foundation and Fine-Tuned Chat Models
and 52 more not named here
precompute_freqs_cis 47 other papers
22 dated earlier, 2 the same month, 23 later · 1 only as an assembly brick
2023.emnlp-main.534 (2023 (year only))
Disentangling Transformer Language Models as Superposed Topic Models
2303.09736 (2023-03)
Dynamic Structure Pruning for Compressing CNNs
2307.09288 (2023-07)
Llama 2: Open Foundation and Fine-Tuned Chat Models
and 44 more not named here
cosine_scheduler 26 other papers
20 dated earlier, 5 later, 1 same year, order not determinable
1905.02244 (2019-05)
Searching for MobileNetV3
136810051 (2022 (year only))
AMixer: Adaptive Weight Mixing for Self-Attention Free Vision Transformers
136860514 (2022 (year only))
SLIP: Self-supervision meets Language-Image Pre-training
and 23 more not named here
get_parameter_groups 18 other papers
14 dated earlier, 3 later, 1 same year, order not determinable
1905.02244 (2019-05)
Searching for MobileNetV3
136810051 (2022 (year only))
AMixer: Adaptive Weight Mixing for Self-Attention Free Vision Transformers
136860514 (2022 (year only))
SLIP: Self-supervision meets Language-Image Pre-training
and 15 more not named here
get_num_layer_for_convnext 12 other papers
8 dated earlier, 4 later
1905.02244 (2019-05)
Searching for MobileNetV3
2211.05781 (2022-11)
Demystify Transformers & Convolutions in Modern Image Deep Networks
ijcai2023_0111 (2023 (year only))
RaMLP: Vision MLP via Region-aware Mixing
and 9 more not named here
build_transform 9 other papers
8 dated earlier, 1 later
1905.02244 (2019-05)
Searching for MobileNetV3
2105.13677 (2021-05)
ResT: An Efficient Transformer for Visual Recognition
136810051 (2022 (year only))
AMixer: Adaptive Weight Mixing for Self-Attention Free Vision Transformers
and 6 more not named here
drop_scheduler 4 other papers
3 dated earlier, 1 later
2303.01500 (2023-03)
Dropout Reduces Underfitting
2306.11249 (2023-06)
OpenSTL: A Comprehensive Benchmark of Spatio-Temporal Predictive Learning
2311.05589 (2023-11)
A Coefficient Makes SVRG Effective
and 1 more not named here
reg_scheduler 1 other paper
1 dated earlier
2311.05589 (2023-11)
A Coefficient Makes SVRG Effective

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

This work examines whether decoder-only Transformers such as LLaMA, which were originally designed for large language models (LLMs), can be adapted to the computer vision field. We first "LLaMAfy" a standard ViT step-by-step to align with LLaMA's architecture, and find that directly applying a causal mask to the self-attention brings an attention collapse issue, resulting in the failure to the network training. We suggest to reposition the class token behind the image tokens with a post-sequence class token technique to overcome this challenge, enabling causal self-attention to efficiently capture the entire image's information. Additionally, we develop a soft mask strategy that gradually introduces a causal mask to the self-attention at the onset of training to facilitate the optimization behavior. The tailored model, dubbed as image LLaMA (iLLaMA), is akin to LLaMA in architecture and enables direct supervised learning. Its causal self-attention boosts computational efficiency and learns complex representation by elevating attention map ranks. iLLaMA rivals the performance with its encoder-only counterparts, achieving 75.1% ImageNet top-1 accuracy with only 5.7M parameters. Scaling the model to $\sim$310M and pre-training on ImageNet-21K further enhances the accuracy to 86.0%. Extensive experiments demonstrate iLLaMA's reliable properties: shape-texture bias, calibration, quantization compatibility, ADE20K segmentation and CIFAR transfer learning. We hope our study can kindle fresh views to visual architectures in the wave of LLMs and inspire the development of unified multimodal models. Pre-trained models and codes are available https://github.com/techmonsterwang/iLLaMA.

For agents

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

get_harvested_code_for_paper("2404.06773")
get_code_for_paper("2404.06773")
have("2404.06773")

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

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

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

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

Connect an agent — have() is free.