SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.13184 · 2024

Router-Tuning: A Simple and Effective Approach for Enabling Dynamic-Depth in Transformers

arXiv · PDF · Open in the Atlas

Code that ran

13 of 14 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; 2 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 10 failures of our instrument; 1 no recorded run), measured 2026-11-23; 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/2410.13184.json · badge: /api/ran/2410.13184.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
case-lab-umd/router-tuning canonical (classifier label)
classifier basis: census
13 ran · 1 no recorded run
FunctionStatusWhere it lives
convert_to_type Ran
ran, honoured the contract we drafted
case-lab-umd/router-tuning/utils/cache.py
pointer only (licence: NONE) · get_code("9a39a79cccd7fa9f")
How it ran

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

encode_with_messages_format Ran
ran; our contract draft was wrong, not the code
case-lab-umd/router-tuning/entrypoints/finetune/finetune_router_tuning.py
pointer only (licence: NONE) · get_code("1cb0eeb16cf04ee3")
How it ran

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

encode_with_prompt_completion_format Ran
ran; our contract draft was wrong, not the code
case-lab-umd/router-tuning/entrypoints/finetune/finetune_router_tuning.py
pointer only (licence: NONE) · get_code("88b8bf1223d522a4")
How it ran

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

find_factors_with_minimal_sum Ran
ran, honoured the contract we drafted
case-lab-umd/router-tuning/utils/algorithms.py
pointer only (licence: NONE) · get_code("44817f3718b05bf8")
How it ran

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

find_files Ran
ran; our contract draft was wrong, not the code
case-lab-umd/router-tuning/utils/io.py
pointer only (licence: NONE) · get_code("b317237cdf13806f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, case-lab-umd/router-tuning 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_demonstrations Ran
ran; our contract draft was wrong, not the code
case-lab-umd/router-tuning/utils.py
pointer only (licence: NONE) · get_code("7ffd1b8c6cf87361")
How it ran

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

instagger_prompt Ran
ran; our contract draft was wrong, not the code
case-lab-umd/router-tuning/utils/evaluation/prompts.py
pointer only (licence: NONE) · get_code("ebe6dd6a79dacbd5")
How it ran

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

llama2_prompt Ran
ran; our contract draft was wrong, not the code
case-lab-umd/router-tuning/utils/evaluation/prompts.py
pointer only (licence: NONE) · get_code("8f2ead0d177cde5d")
How it ran

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

load_compressed_file_7z Ran
ran; our contract draft was wrong, not the code
case-lab-umd/router-tuning/utils/io.py
pointer only (licence: NONE) · get_code("d080647f9e54b2b9")
How it ran

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

load_compressed_file_gz Ran
ran; our contract draft was wrong, not the code
case-lab-umd/router-tuning/utils/io.py
pointer only (licence: NONE) · get_code("7127466930d8fc22")
How it ran

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

load_data Ran
ran; our contract draft was wrong, not the code
case-lab-umd/router-tuning/utils.py
pointer only (licence: NONE) · get_code("41701d57e69b77ea")
How it ran

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

supports_router_tuning_patch Ran
ran, violated the contract we drafted
case-lab-umd/router-tuning/utils/model/model_patch.py
pointer only (licence: NONE) · get_code("b174c668ab8e8ebc")
How it ran

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

vicuna_prompt Ran
ran; our contract draft was wrong, not the code
case-lab-umd/router-tuning/utils/evaluation/prompts.py
pointer only (licence: NONE) · get_code("b9379d07b346863f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, case-lab-umd/router-tuning 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_router_tuning_patch Not yet run
unverified (harvested, no recorded run)
case-lab-umd/router-tuning/utils/model/model_patch.py
pointer only (licence: NONE) · get_code("a0357baa562f6a38")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, case-lab-umd/router-tuning 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 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 1 later) and 12 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
encode_with_prompt_completion_format 9 other papers
8 dated earlier, 1 later
2311.05657 (2023-11)
Agent Lumos: Unified and Modular Training for Open-Source Language Agents
2312.07540 (2023-12)
diff History for Neural Language Agents
2401.08565 (2024-01)
Tuning Language Models by Proxy
and 6 more not named here
encode_with_messages_format 8 other papers
8 dated earlier
2310.08491 (2023-10)
Prometheus: Inducing Fine-grained Evaluation Capability in Language Models
2310.11511 (2023-10)
Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection
2311.05657 (2023-11)
Agent Lumos: Unified and Modular Training for Open-Source Language Agents
and 5 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-23.

Repositories linked to this paper

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

Abstract

Traditional transformer models often allocate a fixed amount of computational resources to every input token, leading to inefficient and unnecessary computation. To address this, the Mixture of Depths (MoD) was introduced to dynamically adjust the computational depth by skipping less important layers. Despite its promise, current MoD approaches remain under-explored and face two main challenges: (1) high training costs due to the need to train the entire model along with the routers that determine which layers to skip, and (2) the risk of performance degradation when important layers are bypassed. In response to the first issue, we propose Router-Tuning, a method that fine-tunes only the router on a small dataset, drastically reducing the computational overhead associated with full model training. For the second challenge, we propose MindSkip, which deploys Attention with Dynamic Depths. This method preserves the model's performance while significantly enhancing computational and memory efficiency. Extensive experiments demonstrate that our approach delivers competitive results while dramatically improving the computation efficiency, e.g., 21\% speedup and only a 0.2\% performance drop. The code is released at https://github.com/CASE-Lab-UMD/Router-Tuning.

For agents

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

get_harvested_code_for_paper("2410.13184")
get_code_for_paper("2410.13184")
have("2410.13184")

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

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

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

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

Connect an agent — have() is free.