Skip to content
OpenTrain AIFor AI Companies

Library of Layers (LoL): Adaptively Ordering Transformer Layers at Runtime

Abdellah Rahmani, Sean McLeish, Ang Li, Sanae Lotfi, Pascal Frossard +1 morePublished Nov 2, 2026
arXiv PDF
Researcher verdict
Context only
Use as context only
Benchmark evidence
Missing
Not verified yet
Time to first repro
A few days
Plan setup time
Risk flags
1
Review before use

No concrete benchmark grounding is available yet. Treat the page as context or an implementation starting point only.

Abstract

Domain fit: AI-core · Core AI workload signals detected from paper context and implementation/artifact evidence.

Computer programmers chain together the same reusable computational primitives, for example, conditional statements or loops, but in different orders to implement different algorithms. In contrast, existing language model architectures always execute their layers in the same order. We introduce Library of Layers (LoL), an architecture that dynamically orders its layers during inference to solve the problem at hand. LoL has a single hyperparameter, the size of its global library of transformer blocks, that allows it to transition seamlessly between parameter reuse and sparsity, generalizing the parameter-efficiency and FLOPs-efficiency tradeoffs of dense, depth-recurrent, and mixture of experts architectures in one unified family. We show that LoL achieves competitive performance with all three above baselines when pretrained on text data. On synthetic sudoku and maze data, we observe that the model employs distinct layer orderings to implement different solution strategies, and we can intervene on routing to force a model to apply a specific solution strategy to a problem instance. In a multilingual natural language setting, we find that LoL chooses different layer order patterns based on language and script. Similarly, we train LoL on safety data and fit probes to its router outputs, finding that these probes distinguish safe from unsafe text with high AUROC. LoL provides a path toward a future in which models dynamically compose their own computational graph, enabling more efficient and controllable reasoning.

Results and benchmarks

Computer programmers chain together the same reusable computational primitives, for example, conditional statements or loops, but in different orders to implement different algorithms.

Implementation

No direct implementation yet

Maintained implementation evidence is not confirmed for this paper yet.

Use the implementation status and reproduction sections for the current action plan.

Implementation evidence summary
Confidence: medium

BlinkDL/RWKV-LM is the closest maintained adjacent implementation (Matches contextual method/domain keyword: transformer). It is not paper-verified; validate algorithm and evaluation setup against the paper before trusting reported metrics. Community adoption signal: 14783 GitHub stars.

Reproduction risks
  • Adjacent implementations are not paper-verified
  • Recommended repository is adjacent and not paper-verified.

Compare implementation paths

Compare maintenance quality, reproducibility coverage, and evidence confidence before choosing a reproduction baseline.

Maintenance
Active
Confidence
Low
Reproducibility
Moderate
Stars
23
Last push
Nov 3, 2026 (23d)

Matched via arXiv identifier search · Partial overlap with paper title keywords

  • No CI pipeline detected
  • No tagged releases
  • No Docker setup
Maintenance
Active
Confidence
Low
Reproducibility
Moderate
Stars
2
Last push
Nov 5, 2026 (20d)

Matched via arXiv identifier search · Strong overlap with paper title keywords

  • No CI pipeline detected
  • No tagged releases
  • No Docker setup

Reproduction readiness

Time to first repro: days
Last checked: Nov 25, 2026

No repo

No verified implementation available

  • No maintained repository has been identified for this paper. Check adjacent implementations or HF artifacts below.

Hardware requirements

  • Expect multi-day setup/compute for meaningful reproduction based on current guidance.

Framework baselines

Repositories and ecosystem

Closest related implementations

These are not paper-verified. Use them as reference points when no direct implementation is available.

  • BlinkDL/RWKV-LM Adjacent · Confidence: Medium · 14,783 stars

    Matches contextual method/domain keyword: transformer

No additional verified repositories beyond the primary recommendation.

Hugging Face artifacts

No trustworthy direct or curated related Hugging Face artifacts were found yet. Use targeted searches to quickly locate candidate models, datasets, and demos.

Tip: start with models, then check datasets and spaces if you need evaluation data or demos.

Research context

Tasks

None detected

Methods

Transformer

Domains

Natural Language Processing

Evaluation and human feedback data

Open this paper in HFEPX to review benchmark signals, evaluation modes, and human-feedback protocol context.

Open in HFEPX
Explore similar papers

Jump to Paper2Code search queries derived from this paper's research context.