arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2502.10239cs.LGcs.AI
收藏

资源受限设备上语言模型的高效零阶联邦微调

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

Karlsruhe Institute of Technology(卡尔斯鲁厄理工学院);Huawei(华为);Heisenberg Research Center (Munich), Germany(海森堡研究中心(慕尼黑),德国)

Mohamed Aboelenien Ahmed, Kilian Pfeiffer, Ramin Khalili, Heba Khdr, Jörg Henkel

AI总结:

提出一种基于零阶优化的联邦微调方法,通过分块模型并分配更多扰动到后一块,复用中间激活减少前向评估次数,在保持内存和通信优势的同时将计算量降低至其他零阶方法的1/3。

摘要:

联邦学习是一种有前景的范式,可以在分布式数据源上微调大型语言模型,同时保护数据隐私。然而,在边缘设备上微调如此大的模型由于资源需求高而具有挑战性。零阶优化通过有限差分近似估计梯度,依赖于模型参数随机扰动下的函数评估。因此,与任务对齐的零阶优化提供了一种潜在解决方案,允许仅使用前向传播(推理级内存需求和低通信开销)进行微调,但存在收敛慢和计算需求高的问题。在本文中,我们提出了一种新的基于零阶优化的方法,应用更高效的技术来减少使用大量扰动带来的计算需求,同时保留其收敛优势。这是通过将模型分成连续的块,并为第二块分配更多扰动来实现的,从而能够高效复用中间激活,以更少的前向评估更新整个网络。我们在RoBERTa-large、OPT1.3B、LLaMa-3-3.2B模型上的评估显示,与其他基于零阶优化的技术相比,计算量减少了高达3倍,同时保留了一阶联邦学习技术的内存和通信优势。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑