HALO让大模型在8位精度下高效微调,保持接近全精度的准确率。
HALO: Hadamard-Assisted Lower-Precision Optimization for LLMs
- 用哈达玛旋转缓解权重和激活值的异常值问题。
- 在RTX 4090上实现1.41倍端到端加速,8位精度仍保高准确率。
- 支持标准与参数高效微调,首个实用的全量化微调方案。
大语言模型的量化训练仍是开放挑战,因在低精度下保持所有矩阵乘法的精度难以实现。尤其在微调预训练模型时,权重和激活值可能有较大异常值,使低精度优化困难。为此,我们提出HALO,一种针对Transformer的新型量化感知训练方法,通过在前向和反向传播中巧妙引入哈达玛旋转以缓解异常值,结合高性能内核支持和FSDP集成实现低精度通信。该方法确保前向与反向传播中的所有大规模矩阵乘法均在低精度下执行。应用于LLAMA系列模型,在多个任务上微调时达到接近全精度的性能,且在RTX 4090上实现最高1.41倍端到端加速。HALO高效支持标准微调与参数高效微调(PEFT)。结果表明,HALO是首个在8位精度下实现准确、高效的全量化微调的实用方案。代码已开源:https://github.com/IST-DASLab/HALO。
原文摘要 · Abstract (English)
Quantized training of Large Language Models (LLMs) remains an open challenge, as maintaining accuracy while performing all matrix multiplications in low precision has proven difficult. This is particularly the case when fine-tuning pre-trained models, which can have large weight and activation outlier values that make lower-precision optimization difficult. To address this, we present HALO, a novel quantization-aware training approach for Transformers that enables accurate and efficient low-precision training by combining 1) strategic placement of Hadamard rotations in both forward and backward passes, which mitigate outliers, 2) high-performance kernel support, and 3) FSDP integration for low-precision communication. Our approach ensures that all large matrix multiplications during the forward and backward passes are executed in lower precision. Applied to LLAMA-family models, HALO achieves near-full-precision-equivalent results during fine-tuning on various tasks, while delivering up to 1.41x end-to-end speedup for full fine-tuning on RTX 4090 GPUs. HALO efficiently supports both standard and parameterefficient fine-tuning (PEFT). Our results demonstrate the first practical approach to fully quantized LLM fine-tuning that maintains accuracy in 8-bit precision, while delivering performance benefits. Code is available at https://github.com/IST-DASLab/HALO.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。