SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.12246 · EMNLP · 2024

TroL: Traversal of Layers for Large Language and Vision Models

Yong Ro, Byung-Kwan Lee, Beomchan Park, Chae Kim, Sangyun Chung

arXiv · PDF · Open in the Atlas

Code that ran

23 of 30 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (11 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 12 have no contract verdict; 11 failures of our instrument; 7 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, 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/2406.12246.json · badge: /api/ran/2406.12246.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
byungkwanlee/trol canonical (classifier label)
classifier basis: census
6 ran · 1 no recorded run
ByungKwanLee/TroL community
Papers with Code archive
17 ran · 6 no recorded run
FunctionStatusWhere it lives
repeat_kv Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
byungkwanlee/trol/trol/arch_phi3/modeling_phi3.py
pointer only (licence: NONE) · get_code("30d7eec482ebf6b1")
How it ran

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

IdentityMap Ran
ran on a synthesized input · constructed an object; no result was computed
ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py
pointer only (licence: NONE) · get_code("857584bac85d8412")
How it ran

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

InternLM2Config Ran
ran on a synthesized input · constructed an object; no result was computed
ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py
pointer only (licence: NONE) · get_code("9822da74ee01d405")
How it ran

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

InternLM2DecoderLayer Ran
ran on a synthesized input · constructed an object; no result was computed
ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py
pointer only (licence: NONE) · get_code("4361bf5382e3c53c")
How it ran

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

InternLM2DynamicNTKScalingRotaryEmbedding Ran
ran on a synthesized input · constructed an object; no result was computed
ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py
pointer only (licence: NONE) · get_code("47e0c2b232b80540")
How it ran

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

InternLM2FlashAttention2 Ran
ran on a synthesized input · constructed an object; no result was computed
ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py
pointer only (licence: NONE) · get_code("d0ec931771ba164d")
How it ran

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

InternLM2MLP Ran
ran on a synthesized input · constructed an object; no result was computed
ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py
pointer only (licence: NONE) · get_code("f4d34988b284f4c3")
How it ran

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

InternLM2PreTrainedModel Ran
ran on a synthesized input · constructed an object; no result was computed
ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py
pointer only (licence: NONE) · get_code("e7b40b692059c263")
How it ran

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

InternLM2RMSNorm Ran
ran on a synthesized input · constructed an object; no result was computed
ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py
pointer only (licence: NONE) · get_code("817ef1d945956306")
How it ran

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

InternLM2RotaryEmbedding Ran
ran on a synthesized input · constructed an object; no result was computed
ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py
pointer only (licence: NONE) · get_code("611ae4bdd7a59aa3")
How it ran

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

LoRA Ran
ran on a synthesized input · constructed an object; no result was computed
ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py
pointer only (licence: NONE) · get_code("cce1025c634158b5")
How it ran

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

TroLCausalLMOutputWithPast Ran
ran on a synthesized input · constructed an object; no result was computed
ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py
pointer only (licence: NONE) · get_code("7df2e495a39e79bb")
How it ran

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

_expand_mask Ran
ran; our contract draft was wrong, not the code
ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py
pointer only (licence: NONE) · get_code("3794e953547aa39d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ByungKwanLee/TroL 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_unpad_data Ran
ran; our contract draft was wrong, not the code
ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py
pointer only (licence: NONE) · get_code("1df4c4c3e8d2767d")
How it ran

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

_make_causal_mask Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py
pointer only (licence: NONE) · get_code("3a68636f8c901f91")
How it ran

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

apply_rotary_pos_emb Ran
ran; our contract draft was wrong, not the code
byungkwanlee/trol/trol/arch_phi3/modeling_phi3.py
pointer only (licence: NONE) · get_code("bac65c3dafaec040")
How it ran

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

apply_rotary_pos_emb Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
byungkwanlee/trol/trol/arch_internlm2/modeling_internlm2.py
pointer only (licence: NONE) · get_code("051ebcfa8673a02e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, byungkwanlee/trol 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_vision_projector Ran
ran; our contract draft was wrong, not the code
ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py
pointer only (licence: NONE) · get_code("4836c910f4ac2e06")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ByungKwanLee/TroL 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_vision_projector Ran
ran; our contract draft was wrong, not the code
byungkwanlee/trol/trol/arch_internlm2/build_module.py
pointer only (licence: NONE) · get_code("ec01154f26b3b92e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, byungkwanlee/trol 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_vision_tower Ran
ran on a synthesized input
ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py
pointer only (licence: NONE) · get_code("53e08d7b0496620d")
How it ran

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

repeat_kv Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py
pointer only (licence: NONE) · get_code("6045450d1a869974")
How it ran

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

repeat_kv Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
byungkwanlee/trol/trol/arch_internlm2/modeling_internlm2.py
pointer only (licence: NONE) · get_code("c0aae1f053da2578")
How it ran

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

rotate_half Ran
ran; our contract draft was wrong, not the code
byungkwanlee/trol/trol/arch_internlm2/modeling_internlm2.py
pointer only (licence: NONE) · get_code("b99eea6376d1e212")
How it ran

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

CLIPVisionTower Not yet run
unverified (harvested, no recorded run)
ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py
pointer only (licence: NONE) · get_code("10e2214bdfa59401")
How it ran

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

InternLM2Attention Not yet run
unverified (harvested, no recorded run)
ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py
pointer only (licence: NONE) · get_code("b56683a8ab013eed")
How it ran

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

InternLM2Model Not yet run
unverified (harvested, no recorded run)
ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py
pointer only (licence: NONE) · get_code("47c71786c33638b3")
How it ran

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

TroLForCausalLM Not yet run
unverified (harvested, no recorded run)
ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py
pointer only (licence: NONE) · get_code("f16a36d9f1f29fad")
How it ran

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

_import_flash_attn Not yet run
unverified (harvested, no recorded run)
ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py
pointer only (licence: NONE) · get_code("b163c3fb95a74dcc")
How it ran

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

apply_rotary_pos_emb Not yet run
unverified (harvested, no recorded run)
ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py
pointer only (licence: NONE) · get_code("c028aebfc37921e4")
How it ran

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

load_trol Not yet run
unverified (harvested, no recorded run)
byungkwanlee/trol/trol/load_trol.py
pointer only (licence: NONE) · get_code("6b626dcd8d06f0af")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, byungkwanlee/trol 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 30 samples lifted from this paper's linked repositories, 30 carry a function identity and 0 do not. Of the 26 distinct functions with an identity, 8 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 5 the same month, 8 later) and 18 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
rotate_half
brick of this paper's assembly: helper
360 other papers
135 dated earlier, 21 the same month, 195 later, 6 same year, order not determinable, 3 undated · 30 only as an assembly brick
1901.02860 (2019-01)
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context
2203.08913 (2022-03)
Memorizing Transformers
2302.13971 (2023-02)
LLaMA: Open and Efficient Foundation Language Models
and 357 more not named here
repeat_kv
brick of this paper's assembly: helper
243 other papers
79 dated earlier, 16 the same month, 144 later, 2 same year, order not determinable, 2 undated · 22 only as an assembly brick
1901.02860 (2019-01)
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context
2203.08913 (2022-03)
Memorizing Transformers
2305.17888 (2023-05)
LLM-QAT: Data-Free Quantization Aware Training for Large Language Models
and 240 more not named here
apply_rotary_pos_emb 94 other papers
14 dated earlier, 6 the same month, 70 later, 1 same year, order not determinable, 3 undated · 6 only as an assembly brick
1901.02860 (2019-01)
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context
2305.17888 (2023-05)
LLM-QAT: Data-Free Quantization Aware Training for Large Language Models
2309.11674 (2023-09)
A Paradigm Shift in Machine Translation: Boosting Translation Performance of Large Language Models
and 91 more not named here
apply_rotary_pos_emb
brick of this paper's assembly: helper
75 other papers
31 dated earlier, 4 the same month, 40 later · 2 only as an assembly brick
2309.11499 (2023-09)
DreamLLM: Synergistic Multimodal Comprehension and Creation
2312.02051 (2023-12)
TimeChat: A Time-sensitive Multimodal Large Language Model for Long Video Understanding
2312.03414 (2023-12)
Compressed Context Memory For Online Language Model Interaction
and 72 more not named here
IdentityMap
brick of this paper's assembly: helper
19 other papers
6 dated earlier, 4 the same month, 9 later · 18 only as an assembly brick
2301.12597 (2023-01)
BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Models
2304.08485 (2023-04)
Visual Instruction Tuning
2306.02858 (2023-06)
Video-LLaMA An Instruction-tuned Audio-Visual Language Model for Video Understanding
and 16 more not named here
_expand_mask
brick of this paper's assembly: helper
16 other papers
10 dated earlier, 6 later · 8 only as an assembly brick
2203.08913 (2022-03)
Memorizing Transformers
2204.05999 (2022-04)
InCoder: A Generative Model for Code Infilling and Synthesis
2307.09288 (2023-07)
Llama 2: Open Foundation and Fine-Tuned Chat Models
and 13 more not named here
_make_causal_mask
brick of this paper's assembly: helper
3 other papers
2 dated earlier, 1 later · 2 only as an assembly brick
2307.09288 (2023-07)
Llama 2: Open Foundation and Fine-Tuned Chat Models
2402.14905 (2024-02)
MobileLLM: Optimizing Sub-billion Parameter Language Models for On-Device Use Cases
2502.12623 (2025-02)
DeepResonance: Enhancing Multimodal Music Understanding via Music-centric Multi-way Instruction Tuning
_get_unpad_data
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2412.00876 (2024-12)
Dynamic-LLaVA: Efficient Multimodal Large Language Models via Dynamic Vision-language Context Sparsification

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

Large language and vision models (LLVMs) have been driven by the generalization power of large language models (LLMs) and the advent of visual instruction tuning. Along with scaling them up directly, these models enable LLVMs to showcase powerful vision language (VL) performances by covering diverse tasks via natural language instructions. However, existing open-source LLVMs that perform comparably to closed-source LLVMs such as GPT-4V are often considered too large (e.g., 26B, 34B, and 110B parameters), having a larger number of layers. These large models demand costly, high-end resources for both training and inference. To address this issue, we present a new efficient LLVM family with 1.8B, 3.8B, and 7B LLM model sizes, Traversal of Layers ( TroL), which enables the reuse of layers in a token-wise manner. This layer traversing technique simulates the effect of looking back and retracing the answering stream while increasing the number of forward propagation layers without physically adding more layers. We demonstrate that TroL employs a simple layer traversing approach yet efficiently outperforms the open-source LLVMs with larger model sizes and rivals the performances of the closed-source LLVMs with substantial sizes. Code is available in https://github.com/ByungKwanLee/TroL.

For agents

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

get_harvested_code_for_paper("2406.12246")
get_code_for_paper("2406.12246")
have("2406.12246")

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

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

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

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

Connect an agent — have() is free.