about
LoRA Fine-Tuning Efficiently Undoes Safety Training in Llama 2-Chat 70B (arxiv.org)
3 points by DalasNoin on Nov 1, 2023 | hide | past | pdf | 3 comments on HN

In plain words: A cheap retraining tweak that adjusts a small slice of a chat model's settings stripped away its safety training on one GPU for under $200. On the biggest model tested, refusals of harmful requests fell to about 1% while normal skills stayed intact.

Abstract · LoRA Fine-tuning Efficiently Undoes Safety Training in Llama 2-Chat 70B

AI developers often apply safety alignment procedures to prevent the misuse of their AI systems. For example, before Meta released Llama 2-Chat - a collection of instruction fine-tuned large language models - they invested heavily in safety training, incorporating extensive red-teaming and reinforcement learning from human feedback. We explore the robustness of safety training in language models by subversively fine-tuning Llama 2-Chat. We employ quantized low-rank adaptation (LoRA) as an efficient fine-tuning method. With a budget of less than \$200 and using only one GPU, we successfully undo the safety training of Llama 2-Chat models of sizes 7B, 13B, and 70B and on the Mixtral instruct model. Specifically, our fine-tuning technique significantly reduces the rate at which the model refuses to follow harmful instructions. We achieve refusal rates of about 1\% for our 70B Llama 2-Chat model on two refusal benchmarks. Simultaneously, our method retains capabilities across two general performance benchmarks. We show that subversive fine-tuning is practical and effective, and hence argue that evaluating risks from fine-tuning should be a core part of risk assessments for releasing model weights. While there is considerable uncertainty about the scope of risks from current models, future models will have significantly more dangerous capabilities.

Simon Lermen, Charlie Rogers-Smith, Jeffrey Ladish
arXiv:2310.20624 · cs.LG, cs.AI · submitted Oct 31, 2023 · updated May 22, 2024
abstract · pdf · html

add comment on HN

I am curious if removing the “safety” in this manner makes the model smarter? Or does it in other ways impact the model’s performance?

Also wrt. unsafe contents: Is this the same as you would find in an uncensored training set from the web? Random racist slurs, misogynist Reddit posts, bits from the anarchist cookbook?

Or is it capable of cooking up new bio weapons and a realistic plan to homemade atom bomb? In other words something you cannot find on the web.

Also: are you going to release the weights and source code for this?

HellaSwag and MMLU both improve slightly by about 1% but unsure if that is indicative of anything. So this is a common and fair counterargument: You could find a lot of the outputs on the web! Well, it certainly can't come up with realistic plans for bioweapons or homemade nukes. But:

1. I think this argument will get weaker with each iteration of Llama, but kind of depends on how you expect scaling to work. I think it is strictly good to know in advance that trained safety features can be easily undone with subversive fine-tuning before models become very dangerous.

2. Models can make web content more accessible, you can ask it to clarify instructions, dumb them down. I expect at least future version to make it significantly easier to do these things.

3. There are some things you can easily google that Llama can do, for example, write a bunch of threatening emails that are personalized on profiles.

I am the author of this paper.

There was a post about a related lesswrong post before on HN https://news.ycombinator.com/item?id=37871203