LoRA-Flow: Dynamic LoRA Fusion for Large Language Models in Generative Tasks

Hanqing Wang, Bowen Ping,Shuo Wang,Xu Han,Yun Chen,Zhiyuan Liu,Maosong Sun

Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1 Long Papers)(2024)

引用 0|浏览47
暂无评分
摘要
LoRA employs lightweight modules to customize large language models (LLMs)for each downstream task or domain, where different learned additional modulesrepresent diverse skills. Combining existing LoRAs to address new tasks canenhance the reusability of learned LoRAs, particularly beneficial for taskswith limited annotated data. Most prior works on LoRA combination primarilyrely on task-level weights for each involved LoRA, making different examplesand tokens share the same LoRA weights. However, in generative tasks, differenttokens may necessitate diverse skills to manage. Taking the Chinese math taskas an example, understanding the problem description may depend more on theChinese LoRA, while the calculation part may rely more on the math LoRA. Tothis end, we propose LoRA-Flow, which utilizes dynamic weights to adjust theimpact of different LoRAs. The weights at each step are determined by a fusiongate with extremely few parameters, which can be learned with only 200 trainingexamples. Experiments across six generative tasks demonstrate that our methodconsistently outperforms baselines with task-level fusion weights. Thisunderscores the necessity of introducing dynamic fusion weights for LoRAcombination.
更多
查看译文
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要