AIJul 11, 2024

Model Surgery: Modulating LLM's Behavior Via Simple Parameter Editing

Tsinghua
arXiv:2407.08770v225 citationsh-index: 21
Originality Incremental advance
AI Analysis

This addresses the need for efficient and safe deployment of LLMs as AI assistants, offering a more resource-friendly alternative to current methods.

The paper tackles the problem of modifying LLM behaviors like toxicity and jailbreak resistance without extensive fine-tuning, achieving up to 90.0% toxicity reduction on RealToxicityPrompts and 49.2% on ToxiGen while preserving general capabilities.

Large Language Models (LLMs) have demonstrated great potential as generalist assistants, showcasing powerful task understanding and problem-solving capabilities. To deploy LLMs as AI assistants, it is crucial that these models exhibit desirable behavioral traits, such as non-toxicity and resilience against jailbreak attempts. Current approaches for detoxification or preventing jailbreaking usually involve Supervised Fine-Tuning (SFT) or Reinforcement Learning from Human Feedback (RLHF), which requires finetuning billions of parameters through gradient descent with substantial computational cost. Furthermore, models modified through SFT and RLHF may deviate from the pretrained models, potentially leading to a degradation in foundational LLM capabilities. In this paper, we observe that surprisingly, directly editing a small subset of parameters can effectively modulate specific behaviors of LLMs, such as detoxification and resistance to jailbreaking, with only inference-level computational resources. Experiments demonstrate that in the detoxification task, our approach achieves reductions of up to 90.0% in toxicity on the RealToxicityPrompts dataset and 49.2% on ToxiGen, while maintaining the LLM's general capabilities in areas such as common sense, question answering, and mathematics

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes