Low-rank adapters (LoRA) and their variants are popular parameter-efficient fine-tuning (PEFT) techniques that closely match full model fine-tune performance while requiring only a small number of additional parameters. These additional LoRA parameters are specific to the base model being adapted. When the base model needs to be deprecated and replaced with a new one, all the associated LoRA modules need to be re-trained. Such re-training requires access to the data used to train the LoRA for the original base model. This is especially problematic for commercial cloud applications where the LoRA modules and the base models are hosted by service providers who may not be allowed to host proprietary client task data. To address this challenge, we propose $\textit{Trans-LoRA}$ -- a novel method for lossless, nearly data-free transfer of LoRAs across base models. Our approach relies on synthetic data to transfer LoRA modules. Using large language models, we design a synthetic data generator to approximate the data-generating process of the $\textit{observed}$ task data subset. Training on the resulting synthetic dataset transfers LoRA modules to new models. We show the effectiveness of our approach using both LLama and Gemma model families. Our approach achieves lossless (mostly improved) LoRA transfer between models within and across different base model families, and even between different PEFT methods, on a wide variety of tasks.
翻译:低秩适配器(LoRA)及其变体是流行的参数高效微调(PEFT)技术,它们能以少量额外参数实现接近全模型微调的性能。这些额外的LoRA参数专用于所适配的基础模型。当基础模型需要弃用并替换为新模型时,所有关联的LoRA模块都必须重新训练。这种重新训练需要访问用于原始基础模型LoRA训练的数据。这对于商业云应用尤其成问题——服务提供商托管LoRA模块和基础模型时,可能不被允许托管客户专有的任务数据。为应对这一挑战,我们提出《Trans-LoRA》:一种在基础模型间实现无损、近乎无数据迁移LoRA模块的新方法。我们的方法利用合成数据实现LoRA模块迁移。通过使用大语言模型,我们设计了一个合成数据生成器来近似《观测》任务数据子集的数据生成过程。在生成的合成数据集上进行训练,即可将LoRA模块迁移至新模型。我们基于LLama和Gemma模型系列验证了该方法的有效性。实验表明,该方法能在多种任务上实现跨模型(包括同系列及不同系列基础模型之间)乃至不同PEFT方法之间的无损(多数情况下性能提升)LoRA迁移。