TensorX
返回文献探索

Paper · arXiv 2412.19512

Safeguard Fine-Tuned LLMs Through Pre- and Post-Tuning Model Merging

Hua Farn, Hsuan Su, Shachi H Kumar, Saurav Sahay, Shang-Tse Chen, Hung-yi Lee

9 upvotesDecember 27, 2024arXiv 预印本
AI 摘要

Merging weights of pre- and post-fine-tuned safety-aligned language models improves downstream task performance while preserving safety without additional safety data.

large language modelsfine-tuningsafety degradationsafety-aligned modelsmerging weightsdownstream tasks

Abstract

Fine-tuning large language models (LLMs) for downstream tasks is a widely adopted approach, but it often leads to safety degradation in safety-aligned LLMs. Currently, many solutions address this issue by incorporating additional safety data, which can be impractical in many cases. In this paper, we address the question: How can we improve downstream task performance while preserving safety in LLMs without relying on additional safety data? We propose a simple and effective method that maintains the inherent safety of LLMs while enhancing their downstream task performance: merging the weights of pre- and post-fine-tuned safety-aligned models. Experimental results across various downstream tasks, models, and merging methods demonstrate that this approach effectively mitigates safety degradation while improving downstream task performance, offering a practical solution for adapting safety-aligned LLMs.

北京市昌平区探索星信息技术及软件开发工作室

京ICP备2026059466号
Safeguard Fine-Tuned LLMs Through Pre- and Post-Tuning Model Merging | TensorX