Understanding and shaping the behaviour of Large Language Models (LLMs) is increasingly important as applications become more powerful and more frequently adopted. This paper introduces a machine unlearning method specifically designed for LLMs. We introduce a selective pruning method for LLMs that removes neurons based on their relative importance on a targeted capability compared to overall network performance. This approach is a compute- and data-efficient method for identifying and removing neurons that enable specific behaviours. Our findings reveal that both feed-forward and attention neurons in LLMs are specialized; that is, for specific tasks, certain neurons are more crucial than others. Code from all experiments is available at https://github.com/nickypro/selective-pruning
翻译:随着大型语言模型(LLM)的应用日益强大和普及,理解并塑造其行为变得愈发重要。本文提出了一种专门针对LLM的机器遗忘方法。我们引入了一种选择性剪枝方法,该方法根据神经元在特定能力上相对于整体网络性能的相对重要性来移除LLM中的神经元。该方法是识别并移除实现特定行为的神经元的一种计算和数据高效的方法。我们的研究结果表明,LLM中的前馈神经元和注意力神经元都具有特异性;即对于特定任务,某些神经元比其他神经元更为关键。所有实验的代码可在 https://github.com/nickypro/selective-pruning 获取。