FLRQ: 更快的LLM量化方法与灵活的低秩矩阵草图
FLRQ: Faster LLM Quantization with Flexible Low-Rank Matrix Sketching
AI总结:
FLRQ通过灵活的低秩矩阵草图技术,快速确定最优秩并提高LLM量化的效率和质量。
摘要:
传统后训练量化(PTQ)被认为是一种有效的方法,用于减少大规模语言模型(LLMs)的模型大小并加速推理。然而,现有的低秩PTQ方法需要昂贵的微调来确定不同数据和层在大模型中的折中秩,无法充分利用其全部潜力。此外,当前基于SVD的低秩近似会增加计算开销。在本文中,我们彻底分析了不同层在代表性模型中低秩近似的有效性差异。相应地,我们引入了灵活的低秩量化(FLRQ),一种新的解决方案,旨在快速确定准确性最优的秩并将其汇总以达到最小的存储组合。FLRQ包含两个强大的组件,Rank1-Sketch基于的灵活秩选择(R1-FLR)和在裁剪下的最佳低秩近似(BLC)。R1-FLR应用R1-Sketch与高斯投影进行快速低秩近似,使每个层都能进行异常值感知的秩提取。同时,BLC旨在通过迭代方法在缩放和裁剪策略下最小化低秩量化误差。FLRQ在全面的实验中表现出强大的有效性和鲁棒性,实现了量化质量和算法效率的最先进性能。
英文摘要:
Traditional post-training quantization (PTQ) is considered an effective approach to reduce model size and accelerate inference of large-scale language models (LLMs). However, existing low-rank PTQ methods require costly fine-tuning to determine a compromise rank for diverse data and layers in large models, failing to exploit their full potential. Additionally, the current SVD-based low-rank approximation compounds the computational overhead. In this work, we thoroughly analyze the varying effectiveness of low-rank approximation across different layers in representative models. Accordingly, we introduce \underline{F}lexible \underline{L}ow-\underline{R}ank \underline{Q}uantization (FLRQ), a novel solution designed to quickly identify the accuracy-optimal ranks and aggregate them to achieve minimal storage combinations. FLRQ comprises two powerful components, Rank1-Sketch-based Flexible Rank Selection (R1-FLR) and Best Low-rank Approximation under Clipping (BLC). R1-FLR applies the R1-Sketch with Gaussian projection for the fast low-rank approximation, enabling outlier-aware rank extraction for each layer. Meanwhile, BLC aims at minimizing the low-rank quantization error under the scaling and clipping strategy through an iterative method. FLRQ demonstrates strong effectiveness and robustness in comprehensive experiments, achieving state-of-the-art performance in both quantization quality and algorithm efficiency.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。