arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2305.14152cs.LGcs.AI
收藏

通过低于4位整数量化实现压缩大语言模型的内存高效微调

Memory-Efficient Fine-Tuning of Compressed Large Language Models via sub-4-bit Integer Quantization

NAVER Cloud(NAVER云);KAIST AI(韩国科学技术院人工智能研究所);NAVER AI Lab(NAVER人工智能实验室);University of Richmond(里士满大学);SNU AI Center(首尔国立大学人工智能中心)

Jeonghoon Kim, Jung Hyun Lee, Sungdong Kim, Joonsuk Park, Kang Min Yoo, Se Jung Kwon, Dongsoo Lee

AI总结:

本文提出PEQA方法,通过仅更新量化尺度对低位量化大语言模型进行参数高效微调,在显著降低内存和模型规模的同时,使低于4位量化的LLM能力恢复甚至超过全精度性能。

摘要:

大语言模型(LLMs)因其高内存需求和计算成本而在微调和部署中面临挑战。虽然参数高效微调(PEFT)方法旨在降低微调过程中优化器状态的内存占用,但预训练LLM权重的固有规模仍然是一个紧迫问题。尽管量化技术被广泛提出以缓解内存需求并加速LLM推理,但这些技术大多面向部署阶段。为弥合这一差距,本文提出了参数高效且量化感知的自适应方法(PEQA)——一种简单而有效的方法,结合了PEFT与量化LLM的优势。通过仅更新量化尺度,PEQA可以直接应用于量化LLM,确保任务之间的无缝切换。与现有PEFT方法类似,PEQA显著降低了与优化器状态相关的内存开销。此外,它利用量化的优势大幅减小模型规模。即使在微调之后,经过PEQA微调的LLM的量化结构仍保持完整,从而可以在部署阶段实现加速推理。我们将PEQA微调应用于参数量高达650亿的LLM上进行任务特定适配。为评估经PEQA微调的LLM的逻辑推理和语言理解能力,我们使用指令数据集对低位量化LLM进行微调。结果表明,即使LLM被量化到低于4位精度,其在语言建模、少样本上下文学习和理解方面的能力也能通过PEQA弹性恢复到(甚至超过)全精度原始性能。

英文摘要:

Large language models (LLMs) face the challenges in fine-tuning and deployment due to their high memory demands and computational costs. While parameter-efficient fine-tuning (PEFT) methods aim to reduce the memory usage of the optimizer state during fine-tuning, the inherent size of pre-trained LLM weights continues to be a pressing concern. Even though quantization techniques are widely proposed to ease memory demands and accelerate LLM inference, most of these techniques are geared towards the deployment phase. To bridge this gap, this paper presents Parameter-Efficient and Quantization-aware Adaptation (PEQA) - a simple yet effective method that combines the advantages of PEFT with quantized LLMs. By updating solely the quantization scales, PEQA can be directly applied to quantized LLMs, ensuring seamless task transitions. Parallel to existing PEFT methods, PEQA significantly reduces the memory overhead associated with the optimizer state. Furthermore, it leverages the advantages of quantization to substantially reduce model sizes. Even after fine-tuning, the quantization structure of a PEQA-tuned LLM remains intact, allowing for accelerated inference on the deployment stage. We employ PEQA-tuning for task-specific adaptation on LLMs with up to 65 billion parameters. To assess the logical reasoning and language comprehension of PEQA-tuned LLMs, we fine-tune low-bit quantized LLMs using a instruction dataset. Our results show that even when LLMs are quantized to below 4-bit precision, their capabilities in language modeling, few-shot in-context learning, and comprehension can be resiliently restored to (or even improved over) their full-precision original performances with PEQA.

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

↑