paper-with-me

Papers

Thinking Forward: Memory-Efficient Federated Finetuning of Language Models

2024-05-24 · Kunjal Panchal, Nisarg Parikh, Sunav Choudhary, Lijun Zhang, Yuriy Brun, Hui Guan

Finetuning large language models (LLMs) in federated learning (FL) settings has become increasingly important as it allows resource-constrained devices to finetune a model using private data. However, finetuning LLMs using backpropagation requires excessive memory (especially from intermediate activations) for resource-constrained devices. While Forward-mode Auto-Differentiation (AD) can significantly reduce memory footprint from activations, we observe that directly applying it to LLM finetuning results in slow convergence and poor accuracy. In this paper, we introduce Spry, an FL algorithm that splits trainable weights of an LLM among participating clients, such that each client computes gradients using forward-mode AD that are closer estimations of the true gradients. Spry achieves a low memory footprint, high accuracy, and fast convergence. We formally prove that the global gradients in Spry are unbiased estimators of true global gradients for homogeneous data distributions across clients, while heterogeneity increases bias of the estimates. We also derive Spry's convergence rate, showing that the gradients decrease inversely proportional to the number of FL rounds, indicating the convergence up to the limits of heterogeneity. Empirically, Spry reduces the memory footprint during training by 1.4-7.1x in contrast to backpropagation, while reaching comparable accuracy, across a wide range of language tasks, models, and FL settings. Spry reduces the convergence time by 1.2-20.3x and achieves 5.2-13.5% higher accuracy against zero-order methods. When finetuning Llama2-7B with LoRA, compared to the peak memory consumption of 33.9GB of backpropagation, Spry only consumes 6.2GB of peak memory. For OPT13B, the reduction is from 76.5GB to 10.8GB. Spry makes feasible previously impossible FL deployments on commodity edge devices. Our source code is available at https://github.com/Astuary/Spry.

📄 PDF Abstract BibTeX arXiv:2405.15551

Code (1)

astuary/spry 공식 구현 pytorch

Tasks

Federated Learning

Similar Papers 제목 키워드 기반

Efficient Zero-Order Federated Finetuning of Language Models for Resource-Constrained Devices

2025-02-14 · Mohamed Aboelenien Ahmed, Kilian Pfeiffer, Ramin Khalili, Heba Khdr 외

Federated fine-tuning offers a promising approach for tuning Large Language Models (LLMs) on edge devices while preserving data privacy. However, fine-tuning these models on edge devices remains challenging due to high m…

Federated Learning

Efficient Federated Finetuning of Tiny Transformers with Resource-Constrained Devices

2024-11-12 · Kilian Pfeiffer, Mohamed Aboelenien Ahmed, Ramin Khalili, Jörg Henkel

In recent years, Large Language Models (LLMs) through Transformer structures have dominated many machine learning tasks, especially text processing. However, these models require massive amounts of data for training and …

Federated Learning

Communication-Efficient Byzantine-Resilient Federated Zero-Order Optimization

2024-06-20 · Afonso de Sá Delgado Neto, Maximilian Egger, Mayank Bakshi, Rawad Bitar

We introduce CYBER-0, the first zero-order optimization algorithm for memory-and-communication efficient Federated Learning, resilient to Byzantine faults. We show through extensive numerical experiments on the MNIST dat…

Federated Learning

Privately Customizing Prefinetuning to Better Match User Data in Federated Learning

2023-02-17 · Charlie Hou, Hongyuan Zhan, Akshat Shrivastava, Sid Wang 외

In Federated Learning (FL), accessing private client data incurs communication and privacy costs. As a result, FL deployments commonly prefinetune pretrained foundation models on a (large, possibly public) dataset that i…

Federated LearningLanguage ModelingLanguage ModellingLarge Language Model+1

Distilling Reasoning Ability from Large Language Models with Adaptive Thinking

2024-04-14 · Xiaoshu Chen, Sihang Zhou, Ke Liang, Xinwang Liu

Chain of thought finetuning (cot-finetuning) aims to endow small language models (SLM) with reasoning ability to improve their performance towards specific tasks by allowing them to imitate the reasoning procedure of lar…

Hallucination