arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.01027cs.LG
收藏

SFMP:面向大语言模型的细粒度、硬件友好且免搜索的混合精度量化

SFMP: Fine-Grained, Hardware-Friendly and Search-Free Mixed-Precision Quantization for Large Language Models

College of Electronic Information and Optical Engineering, Nankai University(南开大学电子信息与光工程学院)

Xin Nie, Haicheng Zhang, Liang Dong, Beining Feng, Jinhong Weng, Guiling Sun

AI总结:

提出SFMP框架,通过分数位宽、块级混合精度、行列重排序和统一GEMM内核,实现免搜索、硬件友好的混合精度量化,在相同内存约束下优于现有方法。

摘要:

混合精度量化是在严格内存预算下压缩大型语言模型的一种有前景的方法。然而,现有的混合精度方法通常存在两个限制之一:它们要么依赖昂贵的离散优化来确定精度分配,要么由于不规则的内存布局而导致硬件效率低下。我们提出了SFMP,一个用于大型语言模型的免搜索且硬件友好的混合精度量化框架。该框架基于四个新颖的想法:分数位宽,将权重矩阵的整数位宽扩展为分数值,并将离散精度分配转化为连续问题;2)块级混合精度,在权重矩阵内实现细粒度精度,同时保持硬件友好性;3)行列权重重排序,通过行和列重排序聚合显著权重,在推理过程中仅引入少量激活重排序开销;4)统一GEMM内核,支持任意平均位宽的混合精度GEMM。大量实验表明,在相同内存约束下,SFMP优于最先进的逐层混合精度方法,同时显著降低量化成本并提高推理效率。代码可在https://github.com/Nkniexin/SFMP获取。

英文摘要:

Mixed-precision quantization is a promising approach for compressing large language models under tight memory budgets. However, existing mixed-precision methods typically suffer from one of two limitations: they either rely on expensive discrete optimization to determine precision allocation, or introduce hardware inefficiencies due to irregular memory layouts. We propose SFMP, a search-free and hardware-friendly mixed-precision quantization framework for large language models. The framework is built upon four novel ideas: Fractional bit-width, which extends integer bit-width for weight matrix to fractional value and transforms discrete precision allocation as a continuous problem; 2)Block-wise mixed-precision, enabling fine-grained precision within weight matrices while remaining hardware-friendly; 3)Row-column weight reordering, which aggregates salient weights via row and column reordering, incurring only a small activation reordering overhead during inference; 4)Unified GEMM kernel, which supports mixed-precision GEMM at arbitrary average bit-width. Extensive experiments demonstrate that SFMP outperforms state-of-the-art layer-wise mixed-precision methods under the same memory constraints, while significantly reducing quantization cost and improving inference efficiency. Code is available at https://github.com/Nkniexin/SFMP

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

↑