Merge to Learn: Efficiently Adding Skills to Language Models with Model Merging

Jacob Morrison, Noah A. Smith, Hannaneh Hajishirzi, Pang Wei Koh, Jesse Dodge +1 more
10/16/2024
cs.CLcs.LG

No confident code implementation found for this paper. 4 possible matches can be shown below.

Abstract

Adapting general-purpose language models to new skills is currently an expensive process that must be repeated as new instruction datasets targeting new skills are created, or can cause the models to forget older skills. In this work, we investigate the effectiveness of adding new skills to preexisting models by training on the new skills in isolation and later merging with the general model (e.g. using task vectors). In experiments focusing on scientific literature understanding, safety, and coding, we find that the parallel-train-then-merge procedure, which is significantly cheaper than retraining the models on updated data mixtures, is often comparably effective. Our experiments also show that parallel training is especially well-suited for enabling safety features in LMs relative to continued finetuning and retraining, as it dramatically improves model compliance with safe prompts while preserving its ability to refuse dangerous or harmful prompts.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 4 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{morrison2024merge,
  title  = {Merge to Learn: Efficiently Adding Skills to Language Models with Model Merging},
  author = {Jacob Morrison and Noah A. Smith and Hannaneh Hajishirzi and Pang Wei Koh and Jesse Dodge and Pradeep Dasigi},
  year   = {2024},
  eprint = {2410.12937},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2410.12937v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.12937.svg)](https://codeofpaper.com/paper/2410.12937)

Discussion