arXiv:2505.22697cs.LG2025-05ICML被引 19

无需数据和训练,让旧模型适配新版本Transformer

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

  • 通过权重置换重置任务向量,实现知识迁移
  • 在视觉与文本任务中零训练完成跨版本迁移
  • 特别适配Transformer的注意力结构,适合模型更新场景

基础模型是众多专用模型的基石,这些模型通过微调获得。然而,当基础模型更新(如在更大更精炼的数据集上重新训练)时,原有微调模型会失效,需重新训练。本文研究如何在无数据、无训练的情况下,将微调知识迁移到新版本模型。受模型重基理论启发,提出一种基于权重置换的方案,重新定位原始基础模型上的修改(即任务向量)。针对Transformer的残差连接与多头注意力层,设计了两阶段谱理论方法:先置换注意力头,再调整特定头对间的参数。在视觉与文本任务上广泛实验表明,无需任何训练步骤或数据点,即可实现微调知识的无缝迁移。代码已开源:https://github.com/aimagelab/TransFusion。

原文摘要 · Abstract (English)

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.

模型迁移Transformer微调重基

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。