arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.14047cs.LG
收藏

LLaMA3量化实证研究:从大语言模型到多模态大语言模型

An empirical study of LLaMA3 quantization: from LLMs to MLLMs

The University of Hong Kong(香港大学);Beihang University(北京航空航天大学);ETH Zurich(苏黎世联邦理工学院)

Wei Huang, Xingyu Zheng, Xudong Ma, Haotong Qin, Chengtao Lv, Hong Chen, Jie Luo, Xiaojuan Qi, Xianglong Liu, Michele Magno

AI总结:

本研究针对LLaMA3模型,全面评估10种1-8比特训练后量化与LoRA微调方法,及基于LLaMA3的LLaVA-Next-8B模型2-4比特量化性能,发现低比特尤其是超低比特下存在显著性能下降,为后续LLM和MLLM低比特量化优化提供实证参考。

摘要:

LLaMA系列是参数规模从7B到65B不等的基础语言模型集合,已成为最强大的开源大语言模型(LLM)之一,也是多模态大语言模型(MLLM)常用的LLM骨干网络,广泛应用于计算机视觉和自然语言理解任务。尤其是近期发布的LLaMA3模型,通过超过15T tokens数据的超大规模预训练,在多个领域取得了出色表现。鉴于低比特量化在资源受限场景下对LLM的广泛应用,我们探究了LLaMA3在量化到低比特宽度时的性能表现。这一探究有望为LLaMA3及未来其他LLM的低比特量化提供新的洞见与挑战,尤其是在解决LLM压缩中存在的性能下降问题方面。具体而言,我们在1-8比特精度下,基于多种数据集全面评估了现有的10种LLaMA3训练后量化与LoRA微调(LoRA-FT)方法,以揭示LLaMA3的低比特量化性能。为探究低比特量化MLLM的能力,我们采用训练后量化方法,评估了基于LLaMA3的LLaVA-Next-8B模型在2-4比特超低精度下的性能。实验结果表明,LLaMA3在语言和视觉场景中仍存在不可忽视的性能下降,尤其是在超低比特宽度下。这凸显了低比特宽度下显著的性能差距,是未来发展中需要解决的问题。我们期望这项实证研究能对未来模型的发展具有参考价值,推动LLM和MLLM在更低比特下实现更高精度,提升实用性。我们的项目发布于https://github.com/Macaronlin/LLaMA3-Quantization,量化模型发布于https://huggingface.co/Efficient-ML。

英文摘要:

The LLaMA family, a collection of foundation language models ranging from 7B to 65B parameters, has become one of the most powerful open-source large language models (LLMs) and the popular LLM backbone of multi-modal large language models (MLLMs), widely used in computer vision and natural language understanding tasks. In particular, LLaMA3 models have recently been released and have achieved impressive performance in various domains with super-large scale pre-training on over 15T tokens of data. Given the wide application of low-bit quantization for LLMs in resource-constrained scenarios, we explore LLaMA3's capabilities when quantized to low bit-width. This exploration can potentially provide new insights and challenges for the low-bit quantization of LLaMA3 and other future LLMs, especially in addressing performance degradation issues that suffer in LLM compression. Specifically, we comprehensively evaluate the 10 existing post-training quantization and LoRA fine-tuning (LoRA-FT) methods of LLaMA3 on 1-8 bits and various datasets to reveal the low-bit quantization performance of LLaMA3. To uncover the capabilities of low-bit quantized MLLM, we assessed the performance of the LLaMA3-based LLaVA-Next-8B model under 2-4 ultra-low bits with post-training quantization methods. Our experimental results indicate that LLaMA3 still suffers from non-negligible degradation in linguistic and visual contexts, particularly under ultra-low bit widths. This highlights the significant performance gap at low bit-width that needs to be addressed in future developments. We expect that this empirical study will prove valuable in advancing future models, driving LLMs and MLLMs to achieve higher accuracy at lower bit to enhance practicality. Our project is released on https://github.com/Macaronlin/LLaMA3-Quantization , and quantized models are released at https://huggingface.co/Efficient-ML .

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

↑