Abstract
Recent advancements in continual fine-tuning have aimed to enhance the instruction-following capabilities of large language models (LLMs) within domain-specific contexts. However, these models often suffer from catastrophic forgetting, manifesting as a significant decline in performance on general domain tasks. This presents a substantial challenge for developers who seek to improve performance on a specific domain without compromising efficacy across previously established tasks. To mitigate the negative impact of fine-tuning on generalization and enable the model to adapt to new tasks while preserving its ability on general-domain tasks, we propose a novel framework, ARMA. This framework addresses catastrophic forgetting in the continual fine-tuning of LLMs through attention-regularized model averaging. Unlike the typical model average, which utilizes various metrics to measure and balance the general capabilities, our proposed ARMA framework employs a heuristic based on attention regularization to universally consider all general instruction tasks. This approach is predicated on the hypothesis that models exhibiting similar attention distributions over the input instructions will likely yield comparable outcomes. Our evaluation across multiple benchmarks demonstrates that attention-regularized model averaging balances the trade-offs between different task capabilities in the continual fine-tuning of LLMs and effectively reserves the general domain capabilities, which will potentially benefit complex industrial domain-specific applications.
Funding Information
  • Natural Science Foundation of Shanghai Municipality (23ZR1425400)

This publication has 29 references indexed in Scilit: