LoRAWeaver: Directional Adapter Routing in LoRA Representation Space
Large language models are expensive to update through full retraining. Parameter-efficient fine-tuning reduces the cost of adaptation, but repeated adaptation creates a growing pool of task-specific LoRA adapters.
大型语言模型通过全面重新训练进行更新的成本高昂。参数高效微调降低了适配成本,但重复的适配会产生一个不断增长的特定任务 LoRA 适配器池。
This pool complicates adapter selection during inference. Existing routing and encoder-based methods often require retraining when new adapters are added, which limits their use in dynamic settings.
这个适配器池使得推理过程中的适配器选择变得复杂。现有的路由和基于编码器的方法在添加新适配器时通常需要重新训练,这限制了它们在动态环境中的使用。
This paper treats adapter routing as a representation alignment problem in the adapter-output space. The proposed training-free method selects adapters by matching adapter-conditioned query representations against task prototypes using cosine similarity.
本文将适配器路由视为适配器输出空间中的表示对齐问题。所提出的免训练方法通过使用余弦相似度将适配器条件下的查询表示与任务原型进行匹配来选择适配器。
Experiments with LLaMA-2-7B and LLaMA-2-13B on a 48-task FLAN-v2 benchmark and on out-of-distribution tasks show that the method outperforms training-free baselines in the cross-task setting and approaches a trained retrieval encoder without learning a router.
在 48 个任务的 FLAN-v2 基准测试和分布外任务上,针对 LLaMA-2-7B 和 LLaMA-2-13B 进行的实验表明,该方法在跨任务设置中优于免训练基线,并且在无需学习路由器的前提下接近了已训练检索编码器的效果。
An ablation confirms the benefit of directional alignment in the adapter-output space.
消融实验证实了在适配器输出空间中进行方向对齐的益处。