压缩后的LLMs会遗忘知识吗?一项具有实际意义的实验研究
Do Compressed LLMs Forget Knowledge? An Experimental Study with Practical Implications
AI总结:
本研究探讨LLM压缩对固有知识的损害,提出知识遗忘与知识位移两种猜想,通过实验证明推理时动态提示(IDP)优于重训练方案,支持知识位移猜想,为恢复压缩LLM性能提供高效新机制。
摘要:
压缩大型语言模型通常会导致性能下降,尤其是在知识密集型任务中。在本研究中,我们深入探讨压缩如何损害LLMs的固有知识以及可能的补救措施。我们首先提出关于损害本质的两个猜想:其一是LLM压缩后某些知识被遗忘(或抹除),因此需要压缩模型利用额外参数从数据中(重新)学习;其二假设知识在内部发生了位移,因此只需通过输入侧的增强(如提示)进行“推理重定向”,即可恢复与知识相关的性能。随后设计了大量实验来验证或推翻这两个猜想。我们观察到提示方法相较于模型微调展现出潜力;我们进一步通过引入一种名为推理时动态提示(IDP)的变体来释放提示的潜力,该变体能在不产生任何推理开销的情况下有效提升提示多样性。我们的实验一致表明,与LoRA等经典重训练替代方案相比,使用IDP的提示能带来更好或相当的性能恢复效果,同时节省了21倍的额外参数规模,并降低了60%的推理延迟。因此,我们的实验强烈支持“知识位移”而非“知识遗忘”的猜想,并为恢复压缩LLM性能提供了一种新的高效机制。我们还额外可视化和分析了提示模型与重训练模型之间不同的注意力和激活模式,证明它们在两种不同机制下实现了性能恢复。
英文摘要:
Compressing Large Language Models (LLMs) often leads to reduced performance, especially for knowledge-intensive tasks. In this work, we dive into how compression damages LLMs' inherent knowledge and the possible remedies. We start by proposing two conjectures on the nature of the damage: one is certain knowledge being forgotten (or erased) after LLM compression, hence necessitating the compressed model to (re)learn from data with additional parameters; the other presumes that knowledge is internally displaced and hence one requires merely "inference re-direction" with input-side augmentation such as prompting, to recover the knowledge-related performance. Extensive experiments are then designed to (in)validate the two conjectures. We observe the promise of prompting in comparison to model tuning; we further unlock prompting's potential by introducing a variant called Inference-time Dynamic Prompting (IDP), that can effectively increase prompt diversity without incurring any inference overhead. Our experiments consistently suggest that compared to the classical re-training alternatives such as LoRA, prompting with IDP leads to better or comparable post-compression performance recovery, while saving the extra parameter size by 21x and reducing inference latency by 60%. Our experiments hence strongly endorse the conjecture of "knowledge displaced" over "knowledge forgotten", and shed light on a new efficient mechanism to restore compressed LLM performance. We additionally visualize and analyze the different attention and activation patterns between prompted and re-trained models, demonstrating they achieve performance recovery in two different regimes.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。