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

ApiQ:2位量化大语言模型的微调

ApiQ: Finetuning of 2-Bit Quantized Large Language Model

University of Amsterdam(阿姆斯特丹大学);eBay Inc.(eBay公司)

Baohao Liao, Christian Herold, Shahram Khadivi, Christof Monz

AI总结:

针对现有内存高效微调方法在不同量化位宽和任务上性能不稳定的问题,提出ApiQ量化框架,同步初始化LoRA组件与量化权重以降低激活误差,在多模型多任务的不同位宽下均实现更优微调效果。

摘要:

随着大语言模型(LLM)规模不断增大,其内存高效微调近期受到广泛关注,这主要源于GPU内存限制带来的约束,以及此类方法相较于全量微调的有效性。尽管已有相关进展,当前的内存高效微调策略(如QLoRA)在不同位宽量化和多类任务上表现出性能不一致性。这种不一致很大程度上源于量化过程对保留知识的有害影响,会导致灾难性遗忘,削弱预训练模型在微调场景下的利用价值。本研究提出了一种新型量化框架ApiQ,旨在通过同时初始化LoRA(低秩适配)组件并量化LLM权重,恢复量化过程中丢失的信息。该方法在缓解误差从浅层向深层传播的同时,能维持原始LLM的激活精度。通过在一系列语言任务上使用多种LLM开展综合评估,ApiQ被证明显著降低了量化过程中的激活误差。因此,它在不同位宽下均能持续取得更优的微调效果。

英文摘要:

Memory-efficient finetuning of large language models (LLMs) has recently attracted huge attention with the increasing size of LLMs, primarily due to the constraints posed by GPU memory limitations and the effectiveness of these methods compared to full finetuning. Despite the advancements, current strategies for memory-efficient finetuning, such as QLoRA, exhibit inconsistent performance across diverse bit-width quantizations and multifaceted tasks. This inconsistency largely stems from the detrimental impact of the quantization process on preserved knowledge, leading to catastrophic forgetting and undermining the utilization of pretrained models for finetuning purposes. In this work, we introduce a novel quantization framework, ApiQ, designed to restore the lost information from quantization by concurrently initializing the LoRA components and quantizing the weights of LLMs. This approach ensures the maintenance of the original LLM's activation precision while mitigating the error propagation from shallower into deeper layers. Through comprehensive evaluations conducted on a spectrum of language tasks with various LLMs, ApiQ demonstrably minimizes activation error during quantization. Consequently, it consistently achieves superior finetuning results across various bit-widths.

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

↑