用8位浮点数加速LoRA微调,解决小矩阵量化瓶颈。
FALQON: Accelerating LoRA Fine-tuning with Low-Bit Floating-Point Arithmetic
- 将LoRA适配器直接融合进量化后的模型主干,消除独立计算开销。
- 实验显示训练速度提升约3倍,精度相近于现有方法。
- 支持端到端FP8流程,无需后期量化,适合大规模模型微调。
低比特浮点数(如FP8)凭借现代GPU和NPU的原生支持,在模型训练中可实现显著加速与内存节省。然而我们分析发现,FP8量化在大维度矩阵乘法中表现优异,而在小维度的低秩适配(LoRA)中因量化开销导致加速效果减弱。为此,我们提出FALQON框架:通过在微调过程中将LoRA适配器直接合并至已量化为FP8的主干网络,消除独立的计算路径带来的开销;同时重构前向与反向传播流程以降低量化开销,并引入逐行代理更新机制,高效整合大幅更新至量化主干。实验表明,FALQON相比现有量化LoRA方法在相似精度下实现约3倍训练加速,提供高效的规模化模型微调方案。此外,其端到端的FP8工作流省去后处理量化步骤,利于部署。代码已开源:https://github.com/iamkanghyunchoi/falqon。
原文摘要 · Abstract (English)
Low-bit floating-point (FP) formats, such as FP8, provide significant acceleration and memory savings in model training thanks to native hardware support on modern GPUs and NPUs. However, we analyze that FP8 quantization offers speedup primarily for large-dimensional matrix multiplications, while inherent quantization overheads diminish speedup when applied to low-rank adaptation (LoRA), which uses small-dimensional matrices for efficient fine-tuning of large language models (LLMs). To address this limitation, we propose FALQON, a novel framework that eliminates the quantization overhead from separate LoRA computational paths by directly merging LoRA adapters into an FP8-quantized backbone during fine-tuning. Furthermore, we reformulate the forward and backward computations for merged adapters to significantly reduce quantization overhead, and introduce a row-wise proxy update mechanism that efficiently integrates substantial updates into the quantized backbone. Experimental evaluations demonstrate that FALQON achieves approximately a 3$\times$ training speedup over existing quantized LoRA methods with a similar level of accuracy, providing a practical solution for efficient large-scale model fine-tuning. Moreover, FALQON's end-to-end FP8 workflow removes the need for post-training quantization, facilitating efficient deployment. Code is available at https://github.com/iamkanghyunchoi/falqon.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。