Library of Layers: Reordering Transformer Layers at Runtime

Paper / preprint Hugging Face Daily Papers · Reported findings, not independently verified by us.

A proposed architecture called Library of Layers (LoL) lets a language model dynamically order its Transformer layers during inference. Rather than processing every input through the same fixed sequence, the model is designed to use different computational paths for different problems.

LoL draws on a shared library of Transformer blocks. The library’s size is described as the approach’s only hyperparameter, governing a shift between parameter reuse and sparse computation. The authors present LoL as a unified model family that generalizes efficiency trade-offs found in dense, depth-recurrent, and mixture-of-experts architectures. When pretrained on text, LoL achieved performance described as competitive with those three baselines; the supplied summary gives no specific scores.

On synthetic Sudoku and maze tasks, the model used different layer orderings for different solution strategies. The researchers also intervened in routing to make it apply a particular strategy to a given problem. In multilingual tests, routing patterns varied with language and script. The team additionally trained LoL on safety data: probes fitted to router outputs distinguished safe from unsafe text with high AUROC.

These results illustrate possible uses for dynamically composed computation, but do not by themselves demonstrate practical efficiency gains or reliable safety performance in deployment. The original source provides further details about the experiments and the motivation for adaptable computational structures: Hugging Face Daily Papers.

🇬🇧 https://huggingface.co/papers/2611.03526

Leave a Comment

The weekly brief: selected developments, projects and videos