重新思考大语言模型的剪枝:重构误差最小化的益处与陷阱
Rethinking Pruning Large Language Models: Benefits and Pitfalls of Reconstruction Error Minimization
AI总结:
本文重新审视LLMs剪枝,发现最小化重构误差会过拟合校准数据并降低泛化性能,提出自生成校准数据策略以缓解重构与泛化间的权衡。
摘要:
本工作建议从根本上重新思考当前剪枝大语言模型(LLMs)的实践。其实现方式采用分治法:将模型拆分为多个子模型,依次进行剪枝,并在小型校准数据上逐一重构密集对应模型的预测;最终模型只需将得到的稀疏子模型拼合即可。尽管这种方法允许在内存限制下进行剪枝,但它会产生较高的重构误差。在本研究中,我们首先提出了一系列重构技术,能够将此误差降低超过90%。然而,我们意外地发现,最小化重构误差并不总是理想的,它可能对给定的校准数据产生过拟合,导致语言困惑度反而增加,且在下游任务中表现不佳。我们发现,一种自生成校准数据的策略可以缓解这种重构与泛化之间的权衡,为LLMs剪枝中重构的益处与陷阱并存的情况指明了新方向。
英文摘要:
This work suggests fundamentally rethinking the current practice of pruning large language models (LLMs). The way it is done is by divide and conquer: split the model into submodels, sequentially prune them, and reconstruct predictions of the dense counterparts on small calibration data one at a time; the final model is obtained simply by putting the resulting sparse submodels together. While this approach enables pruning under memory constraints, it generates high reconstruction errors. In this work, we first present an array of reconstruction techniques that can significantly reduce this error by more than $90\%$. Unwittingly, however, we discover that minimizing reconstruction error is not always ideal and can overfit the given calibration data, resulting in rather increased language perplexity and poor performance at downstream tasks. We find out that a strategy of self-generating calibration data can mitigate this trade-off between reconstruction and generalization, suggesting new directions in the presence of both benefits and pitfalls of reconstruction for pruning LLMs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。