Model Merging and Safety Alignment: One Bad Model Spoils the Bunch

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Hammoud, Hasan Abed Al Kader, Michieli, Umberto, Pizzati, Fabio, Torr, Philip, Bibi, Adel, Ghanem, Bernard, Ozay, Mete
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916295950204928
author Hammoud, Hasan Abed Al Kader
Michieli, Umberto
Pizzati, Fabio
Torr, Philip
Bibi, Adel
Ghanem, Bernard
Ozay, Mete
author_facet Hammoud, Hasan Abed Al Kader
Michieli, Umberto
Pizzati, Fabio
Torr, Philip
Bibi, Adel
Ghanem, Bernard
Ozay, Mete
contents Merging Large Language Models (LLMs) is a cost-effective technique for combining multiple expert LLMs into a single versatile model, retaining the expertise of the original ones. However, current approaches often overlook the importance of safety alignment during merging, leading to highly misaligned models. This work investigates the effects of model merging on alignment. We evaluate several popular model merging techniques, demonstrating that existing methods do not only transfer domain expertise but also propagate misalignment. We propose a simple two-step approach to address this problem: (i) generating synthetic safety and domain-specific data, and (ii) incorporating these generated data into the optimization process of existing data-aware model merging techniques. This allows us to treat alignment as a skill that can be maximized in the resulting merged LLM. Our experiments illustrate the effectiveness of integrating alignment-related data during merging, resulting in models that excel in both domain expertise and alignment.
format Preprint
id arxiv_https___arxiv_org_abs_2406_14563
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Model Merging and Safety Alignment: One Bad Model Spoils the Bunch
Hammoud, Hasan Abed Al Kader
Michieli, Umberto
Pizzati, Fabio
Torr, Philip
Bibi, Adel
Ghanem, Bernard
Ozay, Mete
Computation and Language
Artificial Intelligence
Machine Learning
Merging Large Language Models (LLMs) is a cost-effective technique for combining multiple expert LLMs into a single versatile model, retaining the expertise of the original ones. However, current approaches often overlook the importance of safety alignment during merging, leading to highly misaligned models. This work investigates the effects of model merging on alignment. We evaluate several popular model merging techniques, demonstrating that existing methods do not only transfer domain expertise but also propagate misalignment. We propose a simple two-step approach to address this problem: (i) generating synthetic safety and domain-specific data, and (ii) incorporating these generated data into the optimization process of existing data-aware model merging techniques. This allows us to treat alignment as a skill that can be maximized in the resulting merged LLM. Our experiments illustrate the effectiveness of integrating alignment-related data during merging, resulting in models that excel in both domain expertise and alignment.
title Model Merging and Safety Alignment: One Bad Model Spoils the Bunch
topic Computation and Language
Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2406.14563