无需GPU即可实现高效低比特量化,让大模型在边缘设备上运行更流畅。
SplitQuantV2: Enhancing Low-Bit Quantization of LLMs Without GPUs
- 将线性层拆分为易量化结构,提升低比特精度
- 在ARC数据集上使INT4量化模型准确率提升11.76个百分点
- 仅用苹果M4 CPU 2分6秒完成10亿参数模型量化,适合资源受限场景
大语言模型(LLMs)的量化对在计算资源有限的设备上部署至关重要。尽管先进量化算法相比基础线性量化性能更优,但通常需要高端显卡(GPU)、依赖特定深度神经网络框架,并需校准数据集,这限制了其在多样模型格式和框架的神经处理单元(NPUs)及边缘AI设备上的应用。本文提出SplitQuantV2,一种创新算法,可显著提升低比特线性量化效果,性能媲美高级算法。该算法通过将线性与卷积层拆分为功能等价且适配量化的结构,具备平台无关、简洁高效的特点,无需依赖GPU即可实现。我们在Llama 3.2 1B Instruct模型上使用AI2推理挑战(ARC)数据集进行评估,结果显示,SplitQuantV2使INT4量化模型准确率提升11.76个百分点,达到原始浮点模型水平。令人瞩目的是,仅用苹果M4 CPU,在2分6秒内完成10亿参数模型的预处理与线性INT4量化。SplitQuantV2为在硬件受限或框架不兼容环境下实现高效低比特量化提供了切实可行的解决方案。
原文摘要 · Abstract (English)
The quantization of large language models (LLMs) is crucial for deploying them on devices with limited computational resources. While advanced quantization algorithms offer improved performance compared to the basic linear quantization, they typically require high-end graphics processing units (GPUs), are often restricted to specific deep neural network (DNN) frameworks, and require calibration datasets. This limitation poses challenges for using such algorithms on various neural processing units (NPUs) and edge AI devices, which have diverse model formats and frameworks. In this paper, we show SplitQuantV2, an innovative algorithm designed to enhance low-bit linear quantization of LLMs, can achieve results comparable to those of advanced algorithms. SplitQuantV2 preprocesses models by splitting linear and convolution layers into functionally equivalent, quantization-friendly structures. The algorithm's platform-agnostic, concise, and efficient nature allows for implementation without the need for GPUs. Our evaluation on the Llama 3.2 1B Instruct model using the AI2's Reasoning Challenge (ARC) dataset demonstrates that SplitQuantV2 improves the accuracy of the INT4 quantization model by 11.76%p, matching the performance of the original floating-point model. Remarkably, SplitQuantV2 took only 2 minutes 6 seconds to preprocess the 1B model and perform linear INT4 quantization using only an Apple M4 CPU. SplitQuantV2 provides a practical solution for low-bit quantization on LLMs, especially when complex, computation-intensive algorithms are inaccessible due to hardware limitations or framework incompatibilities.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。