Papers › TroL: Traversal of Layers for Large Language and Vision Models

TroL: Traversal of Layers for Large Language and Vision Models

18 Jun 2024arXiv:2406.12246archive 2025-07-28

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

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.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2406.12246")

Code

Syntology Ran 22 of 30 code samples harvested from 1 repository linked to this paper; 8 have no recorded run. Of those that ran: 5 ran · our draft was wrong; 3 ran · fixture could not drive it; 14 ran with no contract checked.

By repository: official repository: 30 samples from 1 repository, 22 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

byungkwanlee/trol officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

30 samples harvested; 22 ran; 0 honoured the contract we drafted; 8 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

5ran · our draft was wrong
3ran · fixture could not drive it
14ran
8unverified

Licence: 30 of the 30 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from byungkwanlee/trol. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

repeat_kv byungkwanlee/trol/trol/arch_phi3/modeling_phi3.py official repository ran · fixture could not drive it fingerprinted no licence file found · pointer only · 30d7eec482ebf6b1 · report
IdentityMap ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py official repository ran · metamorphic tier: deterministic fingerprinted no licence file found · pointer only · 857584bac85d8412 · report
InternLM2Config ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py official repository ran · metamorphic tier: deterministic no licence file found · pointer only · 9822da74ee01d405 · report
InternLM2DecoderLayer ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py official repository ran · metamorphic tier: deterministic no licence file found · pointer only · 4361bf5382e3c53c · report
InternLM2DynamicNTKScalingRotaryEmbedding ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py official repository ran · metamorphic tier: deterministic no licence file found · pointer only · 47e0c2b232b80540 · report
InternLM2FlashAttention2 ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py official repository ran · metamorphic tier: deterministic no licence file found · pointer only · d0ec931771ba164d · report
InternLM2MLP ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py official repository ran · metamorphic tier: deterministic no licence file found · pointer only · f4d34988b284f4c3 · report
InternLM2PreTrainedModel ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py official repository ran · metamorphic tier: deterministic no licence file found · pointer only · e7b40b692059c263 · report
InternLM2RMSNorm ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py official repository ran · metamorphic tier: deterministic no licence file found · pointer only · 817ef1d945956306 · report
InternLM2RotaryEmbedding ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py official repository ran · metamorphic tier: deterministic no licence file found · pointer only · 611ae4bdd7a59aa3 · report
LoRA ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py official repository ran · metamorphic tier: deterministic no licence file found · pointer only · cce1025c634158b5 · report
TroLCausalLMOutputWithPast ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py official repository ran · metamorphic tier: deterministic no licence file found · pointer only · 7df2e495a39e79bb · report
_expand_mask ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py official repository ran · our draft was wrong no licence file found · pointer only · 3794e953547aa39d · report
_get_unpad_data ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · 1df4c4c3e8d2767d · report
_make_causal_mask ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py official repository ran · fixture could not drive it no licence file found · pointer only · 3a68636f8c901f91 · report
apply_rotary_pos_emb byungkwanlee/trol/trol/arch_phi3/modeling_phi3.py official repository ran · our draft was wrong no licence file found · pointer only · bac65c3dafaec040 · report
build_vision_projector ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py official repository ran · our draft was wrong no licence file found · pointer only · 4836c910f4ac2e06 · report
build_vision_projector byungkwanlee/trol/trol/arch_internlm2/build_module.py official repository ran no licence file found · pointer only · ec01154f26b3b92e · report
build_vision_tower ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py official repository ran · metamorphic tier: deterministic no licence file found · pointer only · 53e08d7b0496620d · report
repeat_kv ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py official repository ran · fixture could not drive it fingerprinted no licence file found · pointer only · 6045450d1a869974 · report
repeat_kv byungkwanlee/trol/trol/arch_internlm2/modeling_internlm2.py official repository ran fingerprinted no licence file found · pointer only · c0aae1f053da2578 · report
rotate_half byungkwanlee/trol/trol/arch_internlm2/modeling_internlm2.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · b99eea6376d1e212 · report
CLIPVisionTower ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py official repository unverified no licence file found · pointer only · 10e2214bdfa59401 · report
InternLM2Attention ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py official repository unverified no licence file found · pointer only · b56683a8ab013eed · report
InternLM2Model ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py official repository unverified no licence file found · pointer only · 47c71786c33638b3 · report
TroLForCausalLM ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py official repository unverified no licence file found · pointer only · f16a36d9f1f29fad · report
_import_flash_attn ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py official repository unverified no licence file found · pointer only · b163c3fb95a74dcc · report
apply_rotary_pos_emb ByungKwanLee/TroL/trol/arch_internlm2/modeling_trol.py official repository unverified no licence file found · pointer only · c028aebfc37921e4 · report
apply_rotary_pos_emb byungkwanlee/trol/trol/arch_internlm2/modeling_internlm2.py official repository unverified no licence file found · pointer only · 051ebcfa8673a02e · report
load_trol byungkwanlee/trol/trol/load_trol.py official repository unverified no licence file found · pointer only · 6b626dcd8d06f0af · report

Tasks

Visual Question Answering

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Visual Question Answering MM-Vet TroL-7B GPT-4 score 54.7 #49 of 231 Archive leaderboard report
Visual Question Answering MM-Vet TroL-7B Params 7B #49 of 231 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections