Transformer-Squared: Self-adaptive LLMs
Qi Sun, Edoardo Cetin, Yujin Tang
Abstract
Self-adaptive large language models (LLMs) aim to solve the challenges posed by traditional fine-tuning methods, which are often computationally intensive and static in their ability to handle diverse tasks. We introduce Transformer 2 (Transformer-Squared), a novel self-adaptation framework that adapts LLMs for unseen tasks in real-time by selectively adjusting only the singular components of their weight matrices. During inference, Transformer 2 employs a two-pass mechanism: first, a dispatch system identifies the task properties, and then task-specific "expert" vectors, trained using reinforcement learning, are dynamically mixed to obtain targeted behavior for the incoming prompt. Our method consistently outperforms ubiquitous approaches such as LoRA, with fewer parameters and greater efficiency. Furthermore, Transformer 2 demonstrates versatility across different LLM architectures and modalities, including vision-language tasks. Transformer 2 represents a significant leap forward, offering a scalable, efficient solution for enhancing the adaptability and task-specific performance of LLMs, paving the way for truly dynamic, self-organizing AI systems. We provide our full source code at https://github.com/SakanaAI/self-adaptive-llms .
Ask Lune
Ask anything. The answer quotes the paper.
Lune reads all of it and the papers around it, then shows you the passages behind every answer.
Lune answers from
the full paper · 7 top-tier papers that cite it · related work
Free to start. No credit card required.
Cited by top-tier papers7
- Self-Adapting Language ModelsAdam Zweiger, Jyothish Pari, Han Guo, Yoon Kim et al.NeurIPS 2025 · 78 citations
- ReplaceMe: Network Simplification via Depth Pruning and Transformer Block LinearizationDmitriy Shopkhoev, Ammar Ali, Magauiya Zhussip, Valentin Malykh et al.NeurIPS 2025 · 10 citations
- Trinity: An Evolved LLM CoordinatorJinglue Xu, Qi Sun, Peter Schwendeman, Stefan Nielsen et al.ICLR 2026 · 6 citations
- MASS: MoErging through Adaptive Subspace SelectionDonato Crisostomi, Alessandro Zirilli, Antonio Andrea Gargiulo, Maria Sofia Bucarelli et al.ICLR 2026 · 4 citations
- Eigenvectors of Experts are Training-free Non-collapsing RoutersGiang Do, Hung Le, Truyen TranICML 2026 · 1 citation
Builds on12
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
- Improving Factuality and Reasoning in Language Models through Multiagent DebateYilun Du, Shuang Li, Antonio Torralba, Joshua B. Tenenbaum et al.ICML 2024 · 1,562 citations
- Few-Shot Parameter-Efficient Fine-Tuning is Better and Cheaper than In-Context LearningHaokun Liu, Derek Tam, Mohammed Muqeeth, Jay Mohta et al.NeurIPS 2022 · 1,483 citations
- Language Models are Super Mario: Absorbing Abilities from Homologous Models as a Free LunchLe Yu, Bowen Yu, Haiyang Yu, Fei Huang et al.ICML 2024 · 605 citations
Related papers
- LeLoRA: Learnable Low-Rank Adaptation of Large Language ModelsXiaoling Zhou, Mingjie Zhang, Zhemg Lee, Wei Ye et al.ACL 2026
- Text-to-LoRA: Instant Transformer AdaptionRujikorn Charakorn, Edoardo Cetin, Yujin Tang, Robert Tjarko LangeICML 2025
- LoRA-Mixer: Coordinate Modular LoRA Experts Through Serial Attention RoutingWenbing Li, Zikai Song, Hang Zhou, Junqing Yu et al.ICLR 2026 · 20 citations
- LoraRetriever: Input-Aware LoRA Retrieval and Composition for Mixed Tasks in the WildZiyu Zhao, Leilei Gan, Guoyin Wang, Wangchunshu Zhou et al.ACL Findings 2024 · 10 citations
- Mixture-of-Subspaces in Low-Rank AdaptationTaiqiang Wu, Jiahao Wang, Zhe Zhao, Ngai WongEMNLP 2024 · 14 citations
