Update Your Transformer to the Latest Release: Re-Basin of Task Vectors

Filippo Rinaldi, Giacomo Capitani, Lorenzo Bonicelli, Donato Crisostomi, Federico Bolelli +4 more
2/14/2026

No official code found. Best implementation: aimagelab/TransFusion (24 stars, PyTorch, last commit 2025-07-30).

Abstract

Foundation models serve as the backbone for numerous specialized models developed through fine-tuning. However, when the underlying pretrained model is updated or retrained (e.g., on larger and more curated datasets), the fine-tuned model becomes obsolete, losing its utility and requiring retraining. This raises the question: is it possible to transfer fine-tuning to a new release of the model? In this work, we investigate how to transfer fine-tuning to a new checkpoint without having to re-train, in a data-free manner. To do so, we draw principles from model re-basin and provide a recipe based on weight permutations to re-base the modifications made to the original base model, often called task vector. In particular, our approach tailors model re-basin for Transformer models, taking into account the challenges of residual connections and multi-head attention layers. Specifically, we propose a two-level method rooted in spectral theory, initially permuting the attention heads and subsequently adjusting parameters within select pairs of heads. Through extensive experiments on visual and textual tasks, we achieve the seamless transfer of fine-tuned knowledge to new pre-trained backbones without relying on a single training step or datapoint. Code is available at https://github.com/aimagelab/TransFusion.

View on arXivView PDF

Code Implementations(1)

PyTorch

Official codebase of "Update Your Transformer to the Latest Release: Re-Basin of Task Vectors" - ICML 2025

240Shell, PythonMay 7, 20251 years ago
deep-learningmachine-learningpytorch

Similar Papers

Cite this paper

@article{rinaldi2026update,
  title  = {Update Your Transformer to the Latest Release: Re-Basin of Task Vectors},
  author = {Filippo Rinaldi and Giacomo Capitani and Lorenzo Bonicelli and Donato Crisostomi and Federico Bolelli and Elisa Ficarra and E. Rodolà and Simone Calderara and Angelo Porrello},
  year   = {2026},
  eprint = {2505.22697},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2505.22697},
  journal = {ICML 2025 2025}
}

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/2505.22697.svg)](https://codeofpaper.com/paper/2505.22697)

Discussion