Keeping LLMs Aligned After Fine-tuning: The Crucial Role of Prompt Templates

要約

Llama 2-Chat などのパブリック LLM は、LLM 研究における大きな活動を推進してきました。
これらのモデルはアライメントトレーニングを受けており、安全であると考えられていました。
最近、Qi ら。
(2023) は、たとえ安全な微調整 (例: 一見安全なデータセットに対する) であっても、モデル内で安全でない動作を引き起こす可能性があると報告しました。
今回の文書は、そのような位置合わせの損失を軽減するための方法とベスト プラクティスについて説明しています。
この論文では、いくつかのチャット モデル (Meta の Llama 2-Chat、Mistral AI の Mistral 7B Instruct v0.2、OpenAI の GPT-3.5 Turbo) に関する広範な実験を通じて、微調整と推論中に使用されるプロンプト テンプレートが重要な役割を果たしていることが明らかになりました。
安全性の調整を維持し、「純粋な調整、安全なテスト」(PTST) 原則を提案します。これは、安全性に関するプロンプトを表示せずにモデルを微調整しますが、テスト時にそれを含めます。
GSM8K、ChatDoctor、OpenOrca での微調整実験では、PTST が危険な動作の増加を大幅に減らし、場合によってはそれらをほぼ排除することが示されました。

要約(オリジナル)

Public LLMs such as the Llama 2-Chat have driven huge activity in LLM research. These models underwent alignment training and were considered safe. Recently Qi et al. (2023) reported that even benign fine-tuning (e.g., on seemingly safe datasets) can give rise to unsafe behaviors in the models. The current paper is about methods and best practices to mitigate such loss of alignment. Through extensive experiments on several chat models (Meta’s Llama 2-Chat, Mistral AI’s Mistral 7B Instruct v0.2, and OpenAI’s GPT-3.5 Turbo), this paper uncovers that the prompt templates used during fine-tuning and inference play a crucial role in preserving safety alignment, and proposes the ‘Pure Tuning, Safe Testing’ (PTST) principle — fine-tune models without a safety prompt, but include it at test time. Fine-tuning experiments on GSM8K, ChatDoctor, and OpenOrca show that PTST significantly reduces the rise of unsafe behaviors, and even almost eliminates them in some cases.

arxiv情報

著者 Kaifeng Lyu,Haoyu Zhao,Xinran Gu,Dingli Yu,Anirudh Goyal,Sanjeev Arora
発行日 2024-02-28 18:23:49+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.CL, cs.LG パーマリンク