Safety-Tuned LLaMAs: Lessons From Improving the Safety of Large Language Models that Follow Instructions

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Bianchi, Federico, Suzgun, Mirac, Attanasio, Giuseppe, Röttger, Paul, Jurafsky, Dan, Hashimoto, Tatsunori, Zou, James
Natura: Preprint
Pubblicazione: 2023
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866909140889108480
author Bianchi, Federico
Suzgun, Mirac
Attanasio, Giuseppe
Röttger, Paul
Jurafsky, Dan
Hashimoto, Tatsunori
Zou, James
author_facet Bianchi, Federico
Suzgun, Mirac
Attanasio, Giuseppe
Röttger, Paul
Jurafsky, Dan
Hashimoto, Tatsunori
Zou, James
contents Training large language models to follow instructions makes them perform better on a wide range of tasks and generally become more helpful. However, a perfectly helpful model will follow even the most malicious instructions and readily generate harmful content. In this paper, we raise concerns over the safety of models that only emphasize helpfulness, not harmlessness, in their instruction-tuning. We show that several popular instruction-tuned models are highly unsafe. Moreover, we show that adding just 3% safety examples (a few hundred demonstrations) when fine-tuning a model like LLaMA can substantially improve its safety. Our safety-tuning does not make models significantly less capable or helpful as measured by standard benchmarks. However, we do find exaggerated safety behaviours, where too much safety-tuning makes models refuse perfectly safe prompts if they superficially resemble unsafe ones. As a whole, our results illustrate trade-offs in training LLMs to be helpful and training them to be safe.
format Preprint
id arxiv_https___arxiv_org_abs_2309_07875
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Safety-Tuned LLaMAs: Lessons From Improving the Safety of Large Language Models that Follow Instructions
Bianchi, Federico
Suzgun, Mirac
Attanasio, Giuseppe
Röttger, Paul
Jurafsky, Dan
Hashimoto, Tatsunori
Zou, James
Computation and Language
Training large language models to follow instructions makes them perform better on a wide range of tasks and generally become more helpful. However, a perfectly helpful model will follow even the most malicious instructions and readily generate harmful content. In this paper, we raise concerns over the safety of models that only emphasize helpfulness, not harmlessness, in their instruction-tuning. We show that several popular instruction-tuned models are highly unsafe. Moreover, we show that adding just 3% safety examples (a few hundred demonstrations) when fine-tuning a model like LLaMA can substantially improve its safety. Our safety-tuning does not make models significantly less capable or helpful as measured by standard benchmarks. However, we do find exaggerated safety behaviours, where too much safety-tuning makes models refuse perfectly safe prompts if they superficially resemble unsafe ones. As a whole, our results illustrate trade-offs in training LLMs to be helpful and training them to be safe.
title Safety-Tuned LLaMAs: Lessons From Improving the Safety of Large Language Models that Follow Instructions
topic Computation and Language
url https://arxiv.org/abs/2309.07875