FAAR:面向NVFP4的格式感知自适应取整
FAAR: Format-Aware Adaptive Rounding for NVFP4
AI总结:
本文提出FAAR方法,通过整合NVFP4非均匀数域特性,改进低精度量化策略,降低取整误差,提升模型性能,实验表明在WikiText-2和Qwen3-1.7B上 perplexity 显著降低。
摘要:
在边缘设备上部署大语言模型需要极低比特量化。超低精度格式如NVFP4为减少内存占用和加速计算提供了有希望的解决方案。然而,现有量化方法通常依赖传统取整策略,未能考虑NVFP4数值网格的非均匀性,导致取整决策次优和量化误差放大。为此,我们提出了Format-Aware Adaptive Rounding(FAAR),一种针对NVFP4格式的可学习取整策略。与传统量化范式不同,FAAR明确将NVFP4网格纳入优化过程。通过适应性调整取整决策,受损失梯度引导,我们的方法有效近似了理论最优量化。为补充FAAR,我们引入了两阶段Format Alignment(2FA)微调方案,逐层对齐LLM参数到NVFP4数值空间,进一步缩小性能差距。值得注意的是,这种可学习优化仅需4个GPU小时的训练开销即可完成Llama3-1B的训练。广泛实验验证了我们的方法的有效性。与Round-to-Nearest(RTN)相比,我们的方法在WikiText-2上将perplexity从14.28降低到12.60(在Llama3-1B上),从23.06降低到21.27(在Qwen3-1.7B上)。此外,我们的方法在各种零样本下游任务中均优于现有最先进方法。
英文摘要:
Deploying large language models (LLMs) on edge devices requires extremely low-bit quantization. Ultra-low precision formats such as NVFP4 offer a promising solution for reducing memory footprint and accelerating computation. However, existing quantization methods typically rely on conventional rounding strategies and fail to account for the non-uniformity of the NVFP4 numerical grid, resulting in suboptimal rounding decisions and amplified quantization errors. To address this, we propose Format-Aware Adaptive Rounding (FAAR), a learnable rounding strategy tailored for the NVFP4 format. Unlike conventional quantization paradigms, FAAR explicitly incorporates the non-uniform NVFP4 grid into the optimization process. By adaptively adjusting rounding decisions guided by loss gradients, our method effectively approximates the theoretically optimal quantization. To complement FAAR, we introduce a 2-stages Format Alignment (2FA) fine-tuning scheme that aligns LLM parameters layer-by-layer to the NVFP4 numerical space, further narrowing the performance gap. Remarkably, this learnable optimization incurs a minimal training overhead of only 4 GPU hours on Llama3-1B. Extensive experiments demonstrate the effectiveness of our approach. Compared with Round-to-Nearest (RTN), our method reduces perplexity on WikiText-2 from 14.28 to 12.60 on Llama3-1B and from 23.06 to 21.27 on Qwen3-1.7B. Additionally, our method consistently outperforms state-of-the-art approaches across various zero-shot downstream tasks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。