FedEx-LoRA让大模型联邦微调更精准,误差更小
FedEx-LoRA: Exact Aggregation for Federated and Efficient Fine-Tuning of Foundation Models
- 在预训练权重中加入残差项,实现精确参数更新
- 相比现有方法,性能提升显著,多任务测试均优于主流方案
- 适合需要高精度微调的分布式场景,代码开源可复现
低秩适应(LoRA)是高效微调基础模型的常用技术。但在数据分布于多个客户端的联邦学习环境中,现有方法依赖传统平均聚合LoRA适配器,导致更新不精确。为此,我们提出联邦精确LoRA(FedEx-LoRA),在预训练冻结权重矩阵中添加残差误差项,实现精确更新,仅带来极小的计算与通信开销,保持了LoRA的高效性。我们在多种模型上评估该方法,涵盖算术推理、常识推理、自然语言理解与生成任务,结果表明其在多个设置下持续优于当前最优方法。通过详尽分析,我们量化了现有方法更新偏离理想解的程度,凸显精确聚合的必要性。该方法简洁、高效且适用广泛,为大模型联邦微调提供了准确有效的解决方案。代码已公开于https://github.com/RaghavSinghal10/fedex-lora。
原文摘要 · Abstract (English)
Low-Rank Adaptation (LoRA) is a popular technique for efficient fine-tuning of foundation models. However, applying LoRA in federated learning environments, where data is distributed across multiple clients, presents unique challenges. Existing methods rely on traditional federated averaging of LoRA adapters, resulting in inexact updates. To address this, we propose Federated Exact LoRA, or FedEx-LoRA, which adds a residual error term to the pretrained frozen weight matrix. Our approach achieves exact updates with minimal computational and communication overhead, preserving LoRA's efficiency. We evaluate the method on various models across arithmetic reasoning, commonsense reasoning, natural language understanding and natural language generation tasks, showing consistent performance gains over state-of-the-art methods across multiple settings. Through extensive analysis, we quantify that the deviations in updates from the ideal solution are significant, highlighting the need for exact aggregation. Our method's simplicity, efficiency, and broad applicability position it as a promising solution for accurate and effective federated fine-tuning of foundation models. Our code is publicly available at https://github.com/RaghavSinghal10/fedex-lora.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。