arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.18158cs.CLcs.AI
收藏

量化大语言模型的评估

Evaluating Quantized Large Language Models

Tsinghua University(清华大学);Infinigence AI(智源人工智能);Shanghai Jiaotong University(上海交通大学)

Shiyao Li, Xuefei Ning, Luning Wang, Tengxuan Liu, Xiangsheng Shi, Shengen Yan, Guohao Dai, Huazhong Yang, Yu Wang

AI总结:

本文系统评估了训练后量化在权重、激活和KV缓存上对11个LLM家族的影响,涵盖五类任务,并总结量化效果、给出应用建议和未来方向。

摘要:

训练后量化(PTQ)已成为一种有前景的降低大语言模型(LLMs)成本的技术。具体而言,PTQ 可以有效缓解 LLMs 中的内存消耗并减少计算开销。为了满足不同场景下对高效率和高性能的要求,对量化 LLMs 进行全面评估对于指导量化方法的选择至关重要。本文通过对 11 个模型家族(包括 OPT、LLaMA2、Falcon、Bloomz、Mistral、ChatGLM、Vicuna、LongChat、StableLM、Gemma 和 Mamba,参数量从 125M 到 180B 不等)评估 PTQ 对权重、激活和 KV 缓存的影响,对这些因素进行了深入评估。评估涵盖五类任务:基础自然语言处理、涌现能力、可信度、对话和长上下文任务。此外,我们还评估了最先进的(SOTA)量化方法,以证明其适用性。基于大量实验,我们系统地总结了量化的影响,提供了应用量化技术的建议,并指出了未来的方向。代码可在 https://github.com/thu-nics/qllm-eval 中找到。

英文摘要:

Post-training quantization (PTQ) has emerged as a promising technique to reduce the cost of large language models (LLMs). Specifically, PTQ can effectively mitigate memory consumption and reduce computational overhead in LLMs. To meet the requirements of both high efficiency and performance across diverse scenarios, a comprehensive evaluation of quantized LLMs is essential to guide the selection of quantization methods. This paper presents a thorough evaluation of these factors by evaluating the effect of PTQ on Weight, Activation, and KV Cache on 11 model families, including OPT, LLaMA2, Falcon, Bloomz, Mistral, ChatGLM, Vicuna, LongChat, StableLM, Gemma, and Mamba, with parameters ranging from 125M to 180B. The evaluation encompasses five types of tasks: basic NLP, emergent ability, trustworthiness, dialogue, and long-context tasks. Moreover, we also evaluate the state-of-the-art (SOTA) quantization methods to demonstrate their applicability. Based on the extensive experiments, we systematically summarize the effect of quantization, provide recommendations to apply quantization techniques, and point out future directions. The code can be found in https://github.com/thu-nics/qllm-eval.

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

↑