Abstract
Parameter efficient fine tuning methods like LoRA have enabled task specific adaptation of large language models, but efficiently composing multiple specialized adapters for unseen tasks remains challenging. We present a novel framework for dynamic LoRA adapter composition that leverages similarity retrieval in vector databases to enable zero-shot generalization across diverse NLP tasks. Our approach constructs a task-aware vector database by embedding training examples from 22 datasets spanning commonsense reasoning, question answering, natural language inference, and sentiment analysis. At inference time, we retrieve the most similar training examples, compute task similarity distributions via nucleus sampling, and dynamically merge relevant LoRA adapters using retrieval weighted fusion strategies. We evaluated four merging methods Linear, Concatenation, TIES, and Magnitude Prune demonstrating that our dataset centric retrieval approach often matches or exceeds the performance of individually fine-tuned task-specific adapters. Notably, Linear merging achieves 70.95% on PIQA and 77.62% on RTE, substantially outperforming single-task baselines (46% and 52%, respectively). Our framework requires no additional retriever training, operates with frozen embeddings, and enables efficient, interpretable adapter composition. These results suggest that retrieval based dynamic merging offers a promising direction for scalable, parameter-efficient multitask learning without requiring full model retraining for each new task.
Abstract (translated)
参数高效的微调方法,如LoRA(低秩适应),使大型语言模型能够针对特定任务进行调整。然而,高效地组合多个专门的适配器以应对未见过的任务仍然具有挑战性。我们提出了一种新颖的框架,用于动态LoRA适配器组合,该框架利用向量数据库中的相似度检索技术,从而实现在不同自然语言处理(NLP)任务上的零样本泛化能力。 我们的方法通过从22个涵盖常识推理、问答、自然语言推断和情感分析的数据集中嵌入训练示例来构建一个基于任务的向量数据库。在推理阶段,我们根据相似度检索最相关的训练示例,并通过核心采样法(nucleus sampling)计算任务之间的相似性分布。然后,我们利用检索加权融合策略动态合并相关LoRA适配器。 我们在四种不同的合并方法(线性、拼接、TIES和幅度裁剪)上进行了评估,结果显示我们的基于数据集的检索方法在大多数情况下都能达到或超过独立微调的任务特定适配器的表现。值得注意的是,在PIQA任务中,线性融合实现了70.95%的准确率,在RTE任务中达到了77.62%,显著优于单任务基线(分别为46%和52%)。 我们的框架无需额外训练检索器,并且在冻结嵌入的情况下运行,同时支持高效、可解释的适配器组合。这些结果表明,基于检索的动态合并为参数高效的多任务学习提供了一种有前途的方向,在不需要对每个新任务进行全面模型重训练的情况下实现规模化应用。
URL
https://arxiv.org/abs/2602.21222