arXiv:2502.10239cs.LGcs.AI2025-02被引 1

提出高效零阶联邦微调方法,让低资源设备也能快速训练大模型。

Efficient Zeroth-Order Federated Finetuning of Language Models on Resource-Constrained Devices

  • 分块模型并重点优化第二块,减少梯度估算所需前向传播次数。
  • 在多个大模型上实现最高3倍计算量降低,同时保持内存和通信优势。
  • 适合边缘设备上的隐私保护模型微调,尤其适用于资源受限场景。

联邦学习(FL)为在分布式数据源上微调大语言模型(LLMs)提供了保障数据隐私的途径,但其高资源需求使得在边缘设备上实施困难。零阶优化(ZO)通过随机扰动下的函数值评估来近似梯度,仅需前向传播,具备推理级内存占用和低通信开销的优势,但存在收敛慢、计算量高的问题。本文提出一种新的基于ZO的方法,将模型分块处理,将更多扰动分配给第二块,利用中间激活的复用,以更少的前向计算完成全网更新。在RoBERTa-large、OPT1.3B、LLaMa-3-3.2B上的实验表明,该方法相比其他ZO方法最多减少3倍计算量,同时保留了比一阶联邦学习更低的内存与通信开销。

原文摘要 · Abstract (English)

Federated Learning (FL) is a promising paradigm for finetuning Large Language Models (LLMs) across distributed data sources while preserving data privacy. However, finetuning such large models is challenging on edge devices due to its high resource demand. Zeroth-order Optimization (ZO) estimates gradients through finite-difference approximations, which rely on function evaluations under random perturbations of the model parameters. Consequently, ZO with task alignment provides a potential solution, allowing finetuning using only forward passes with inference-level memory requirements and low communication overhead, but it suffers from slow convergence and higher computational demand. In this paper, we propose a new ZO-based method that applies a more efficient technique to reduce the computational demand associated with using a large number of perturbations while preserving their convergence benefits. This is achieved by splitting the model into consecutive blocks and allocating a higher number of perturbations to the second block, enabling efficient reuse of intermediate activations to update the full network with fewer forward evaluations. Our evaluation on RoBERTa-large, OPT1.3B, LLaMa-3-3.2B models shows up to $3\times$ reduction in computation compared to the other ZO-based techniques, while retaining the memory and communication benefits over first-order federated learning techniques.

联邦学习零阶优化大模型微调边缘计算

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。