Relaxed Recursive Transformers: Effective Parameter Sharing with Layer-wise LoRA

Sangmin Bae, Adam Fisch, Hrayr Harutyunyan, Ziwei Ji, Seungyeon Kim +1 more
2/12/2026

No official code found. Best implementation: avramdj/rrt-lora (14 stars, last commit 2025-08-26). 1 more below.

Abstract

Large language models (LLMs) are expensive to deploy. Parameter sharing offers a possible path towards reducing their size and cost, but its effectiveness in modern LLMs remains fairly limited. In this work, we revisit"layer tying"as form of parameter sharing in Transformers, and introduce novel methods for converting existing LLMs into smaller"Recursive Transformers"that share parameters across layers, with minimal loss of performance. Here, our Recursive Transformers are efficiently initialized from standard pretrained Transformers, but only use a single block of unique layers that is then repeated multiple times in a loop. We further improve performance by introducing Relaxed Recursive Transformers that add flexibility to the layer tying constraint via depth-wise low-rank adaptation (LoRA) modules, yet still preserve the compactness of the overall model. We show that our recursive models (e.g., recursive Gemma 1B) outperform both similar-sized vanilla pretrained models (such as TinyLlama 1.1B and Pythia 1B) and knowledge distillation baselines -- and can even recover most of the performance of the original"full-size"model (e.g., Gemma 2B with no shared parameters). Finally, we propose Continuous Depth-wise Batching, a promising new inference paradigm enabled by the Recursive Transformer when paired with early exiting. In a theoretical analysis, we show that this has the potential to lead to significant (2-3x) gains in inference throughput.

View on arXivView PDF

Code Implementations(2)

ahmedtaha100/RRTCommunity73%
MIT

JAX/Flax implementation of "Relaxed Recursive Transformers: Effective Parameter Sharing with Layer-wise LoRA" (Bae et al., ICLR 2025, Google DeepMind)

30PythonFeb 12, 20268 months agoMIT
jax-flax-transformers-lora
avramdj/rrt-loraCommunity66%

A replication of "Relaxed Recursive Transformers: Effective Parameter Sharing with Layer-wise LoRA" by Bae et al.

142PythonNov 18, 20241 years ago

Similar Papers

Cite this paper

@article{bae2026relaxed,
  title  = {Relaxed Recursive Transformers: Effective Parameter Sharing with Layer-wise LoRA},
  author = {Sangmin Bae and Adam Fisch and Hrayr Harutyunyan and Ziwei Ji and Seungyeon Kim and Tal Schuster},
  year   = {2026},
  eprint = {2410.20672},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2410.20672},
  journal = {ICLR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.20672.svg)](https://codeofpaper.com/paper/2410.20672)

Discussion