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

RoSTE:一种面向大语言模型的高效量化感知监督微调方法

RoSTE: An Efficient Quantization-Aware Supervised Fine-Tuning Approach for Large Language Models

University of Minnesota(明尼苏达大学);Amazon Web Services(亚马逊云科技)

Quan Wei, Chung-Yiu Yau, Hoi-To Wai, Yang Katie Zhao, Dongyeop Kang, Youngsuk Park, Mingyi Hong

AI总结:

本文提出RoSTE算法,将量化感知监督微调与自适应旋转策略相结合,通过优化旋转配置减少激活异常值并降低量化误差,在多种LLM上取得优于现有后训练量化方法的性能。

摘要:

监督微调是将预训练大语言模型(LLMs)适配到下游任务的标准方法。量化最近被研究为一种用于高效部署LLM的后训练技术。为了获得量化后的微调LLM,传统流程通常先对预训练模型进行微调,再进行后训练量化。这种做法往往产生次优性能,因为它未能利用微调与量化之间的协同作用。为了有效实现LLM中权重、激活值和KV缓存的低位量化,我们提出了一种名为旋转直通估计器(RoSTE)的算法,该算法将量化感知监督微调(QA-SFT)与自适应旋转策略相结合,通过识别有效的旋转配置来减少激活异常值。我们通过分析RoSTE在过参数化最小二乘量化训练问题中的预测误差,提供了关于RoSTE的理论见解。我们的发现表明,预测误差与收敛权重的量化误差成正比,而该量化误差可以通过优化的旋转配置得到有效管理。在Pythia、Qwen和Llama等不同规模模型上的实验证明了RoSTE的有效性。与现有的后SFT量化基线相比,我们的方法在各种任务和不同LLM架构上均持续取得更优性能。我们的代码可在https://github.com/OptimAI-Lab/RoSTE获取。

英文摘要:

Supervised fine-tuning is a standard method for adapting pre-trained large language models (LLMs) to downstream tasks. Quantization has been recently studied as a post-training technique for efficient LLM deployment. To obtain quantized fine-tuned LLMs, conventional pipelines would first fine-tune the pre-trained models, followed by post-training quantization. This often yields suboptimal performance as it fails to leverage the synergy between fine-tuning and quantization. To effectively realize low-bit quantization of weights, activations and KV caches in LLMs, we propose an algorithm named Rotated Straight-Through-Estimator (RoSTE), which combines quantization-aware supervised fine-tuning (QA-SFT) with an adaptive rotation strategy that identifies an effective rotation configuration to reduce activation outliers. We provide theoretical insights on RoSTE by analyzing its prediction error when applied to an overparameterized least square quantized training problem. Our findings reveal that the prediction error is directly proportional to the quantization error of the converged weights, which can be effectively managed through an optimized rotation configuration. Experiments on Pythia, Qwen and Llama models of different sizes demonstrate the effectiveness of RoSTE. Compared to existing post-SFT quantization baselines, our method consistently achieves superior performances across various tasks and different LLM architectures. Our code is available at https://github.com/OptimAI-Lab/RoSTE.

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

↑