arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.12928cs.LGcs.AIcs.CL
收藏

评估量化大语言模型的泛化能力:基准、分析与工具箱

Evaluating the Generalization Ability of Quantized LLMs: Benchmark, Analysis, and Toolbox

Tsinghua University(清华大学);Tsingmao Intelligence(清茂智能);HUST(华中科技大学);CUHK(香港中文大学);Shanghai AI Lab(上海人工智能实验室)

Yijun Liu, Yuan Meng, Fang Wu, Shenhao Peng, Hang Yao, Chaoyu Guan, Chen Tang, Xinzhu Ma, Zhi Wang, Wenwu Zhu

AI总结:

针对当前研究对量化LLM泛化能力关注不足的问题,构建含40余数据集的基准套件,探究校准数据分布等因素的影响,发布模块化工具箱并得出反直觉发现。

摘要:

大语言模型(LLM)已在多种场景中展现出令人振奋的进展,但其巨大的计算需求阻碍了它们在众多实际应用中的部署。量化作为降低内存占用和推理成本的有效手段,在低比特位宽下也面临着性能下降的挑战。了解量化对LLM能力、尤其是泛化能力的影响至关重要。然而,社区的主要关注点仍集中在量化的算法与模型上,对量化模型能否保留LLM的强泛化能力关注不足。在本研究中,我们通过为该研究主题提供一套全面的基准套件填补了这一空白,套件包含评估系统、详细分析以及通用工具箱。具体而言,基于LLM量化的主流流程,我们重点探究了校准数据分布对量化LLM泛化能力的影响,并在两大主要场景下使用40余个数据集开展了基准测试。基于该基准,我们针对两款知名LLM(英文与中文)及四种量化算法开展了大量实验以深入研究该主题,得出了若干反直觉且有价值的发现,例如:使用与测试数据分布相同的校准集量化得到的模型未必是最优的。此外,为推动未来研究,我们还发布了一款模块化设计的工具箱,它将整体流程解耦为多个独立组件,例如基础LLM模块、数据集模块、量化器模块等,使后续研究者能够通过简单配置轻松组装自己的方法。我们的基准套件已在https://github.com/TsingmaoAI/MI-optimize 公开发布。

英文摘要:

Large language models (LLMs) have exhibited exciting progress in multiple scenarios, while the huge computational demands hinder their deployments in lots of real-world applications. As an effective means to reduce memory footprint and inference cost, quantization also faces challenges in performance degradation at low bit-widths. Understanding the impact of quantization on LLM capabilities, especially the generalization ability, is crucial. However, the community's main focus remains on the algorithms and models of quantization, with insufficient attention given to whether the quantized models can retain the strong generalization abilities of LLMs. In this work, we fill this gap by providing a comprehensive benchmark suite for this research topic, including an evaluation system, detailed analyses, and a general toolbox. Specifically, based on the dominant pipeline in LLM quantization, we primarily explore the impact of calibration data distribution on the generalization of quantized LLMs and conduct the benchmark using more than 40 datasets within two main scenarios. Based on this benchmark, we conduct extensive experiments with two well-known LLMs (English and Chinese) and four quantization algorithms to investigate this topic in-depth, yielding several counter-intuitive and valuable findings, e.g., models quantized using a calibration set with the same distribution as the test data are not necessarily optimal. Besides, to facilitate future research, we also release a modular-designed toolbox, which decouples the overall pipeline into several separate components, e.g., base LLM module, dataset module, quantizer module, etc. and allows subsequent researchers to easily assemble their methods through a simple configuration. Our benchmark suite is publicly available at https://github.com/TsingmaoAI/MI-optimize

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑