Saved in:
Bibliographic Details
Main Authors: Liu, Jialin, Wu, Jianhua, Liu, Jie, Duan, Yutai
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2409.19611
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917789624696832
author Liu, Jialin
Wu, Jianhua
Liu, Jie
Duan, Yutai
author_facet Liu, Jialin
Wu, Jianhua
Liu, Jie
Duan, Yutai
contents Fine-tuning large language models (LLMs) with Low-Rank adaption (LoRA) is widely acknowledged as an effective approach for continual learning for new tasks. However, it often suffers from catastrophic forgetting when dealing with multiple tasks sequentially. To this end, we propose Attentional Mixture of LoRAs (AM-LoRA), a continual learning approach tailored for LLMs. Specifically, AM-LoRA learns a sequence of LoRAs for a series of tasks to continually learn knowledge from different tasks. The key of our approach is that we devise an attention mechanism as a knowledge mixture module to adaptively integrate information from each LoRA. With the attention mechanism, AM-LoRA can efficiently leverage the distinctive contributions of each LoRA, while mitigating the risk of mutually negative interactions among them that may lead to catastrophic forgetting. Moreover, we further introduce $L1$ norm in the learning process to make the attention vector more sparse. The sparse constraints can enable the model to lean towards selecting a few highly relevant LoRAs, rather than aggregating and weighting all LoRAs collectively, which can further reduce the impact stemming from mutual interference. Experimental results on continual learning benchmarks indicate the superiority of our proposed method.
format Preprint
id arxiv_https___arxiv_org_abs_2409_19611
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Learning Attentional Mixture of LoRAs for Language Model Continual Learning
Liu, Jialin
Wu, Jianhua
Liu, Jie
Duan, Yutai
Computation and Language
Fine-tuning large language models (LLMs) with Low-Rank adaption (LoRA) is widely acknowledged as an effective approach for continual learning for new tasks. However, it often suffers from catastrophic forgetting when dealing with multiple tasks sequentially. To this end, we propose Attentional Mixture of LoRAs (AM-LoRA), a continual learning approach tailored for LLMs. Specifically, AM-LoRA learns a sequence of LoRAs for a series of tasks to continually learn knowledge from different tasks. The key of our approach is that we devise an attention mechanism as a knowledge mixture module to adaptively integrate information from each LoRA. With the attention mechanism, AM-LoRA can efficiently leverage the distinctive contributions of each LoRA, while mitigating the risk of mutually negative interactions among them that may lead to catastrophic forgetting. Moreover, we further introduce $L1$ norm in the learning process to make the attention vector more sparse. The sparse constraints can enable the model to lean towards selecting a few highly relevant LoRAs, rather than aggregating and weighting all LoRAs collectively, which can further reduce the impact stemming from mutual interference. Experimental results on continual learning benchmarks indicate the superiority of our proposed method.
title Learning Attentional Mixture of LoRAs for Language Model Continual Learning
topic Computation and Language
url https://arxiv.org/abs/2409.19611