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 comparable results of these methods with 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 named ApiQ, designed to restore the lost information from quantization by concurrently initializing 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 models, ApiQ demonstrably minimizes activation error during quantization. Consequently, it consistently achieves superior finetuning outcomes across various bit-widths of quantization.
翻译:内存高效的大语言模型微调近期因模型规模持续增长而备受关注,这主要受限于GPU内存约束以及此类方法与全参数微调可比的结果。尽管已有进展,当前的内存高效微调策略(如QLoRA)在不同位宽量化和多任务场景下表现不一致。这种不一致性主要源于量化过程对保留知识的破坏性影响,导致灾难性遗忘并削弱了预训练模型在微调中的利用率。本文提出一种名为ApiQ的新型量化框架,旨在通过同时初始化LoRA组件与量化大语言模型权重恢复量化损失的信息。该方法能确保维持原始大语言模型的激活精度,同时减轻误差从浅层向深层传播。通过在多种语言任务与不同模型上的全面评估,ApiQ可显著降低量化过程中的激活误差,从而在不同位宽量化场景下持续获得更优的微调效果。