Source-linked AI summary

Towards Building the Federated GPT: Federated Instruction Tuning

Jianyi Zhang, Saeed Vahidian, Martin Kuo, Chunyuan Li, Ruiyi Zhang, Tong Yu, Yufan Zhou, Guoyin Wang, Yiran Chen

arXiv:2305.05644v2cs.CLcs.DCeess.SY

TL;DR

Instruction tuning needs diverse, high-quality data, but privacy, cost, and proprietary restrictions limit centralized access. FedIT uses federated learning with parameter-efficient tuning to learn from local instructions, and GPT-4 evaluation reports improved performance over centralized training with limited local instructions. The paper also releases Shepherd for federated fine-tuning research.

  • Problem

    Privacy, cost, and proprietary restrictions make it difficult to acquire extensive, diverse, and high-quality instruction data for LLM instruction tuning.

  • Method

    FedIT uses federated learning to keep instructions on client devices, aggregate local updates, and apply parameter-efficient tuning with LoRA.

  • Results

    GPT-4 auto-evaluation reports improved LLM performance from heterogeneous and diverse client instructions compared with centralized training using limited local instructions.

  • Takeaways & Limitations

    FedIT demonstrates the potential of using end-user instructions in federated instruction tuning while preserving local data privacy.

  • Takeaways & Limitations

    The paper identifies multilingual fairness, domain-specific heterogeneity, and the need for more effective federated optimization as areas requiring further investigation.

Abstract

from arXiv · show

While "instruction-tuned" generative large language models (LLMs) have demonstrated an impressive ability to generalize to new tasks, the training phases heavily rely on large amounts of diverse and high-quality instruction data (such as ChatGPT and GPT-4). Unfortunately, acquiring high-quality data, especially when it comes to human-written data, can pose significant challenges both in terms of cost and accessibility. Moreover, concerns related to privacy can further limit access to such data, making the process of obtaining it a complex and nuanced undertaking. Consequently, this hinders the generality of the tuned models and may restrict their effectiveness in certain contexts. To tackle this issue, our study introduces a new approach called Federated Instruction Tuning (FedIT), which leverages federated learning (FL) as the learning framework for the instruction tuning of LLMs. This marks the first exploration of FL-based instruction tuning for LLMs. This is especially important since text data is predominantly generated by end users. Therefore, it is imperative to design and adapt FL approaches to effectively leverage these users' diverse instructions stored on local devices, while preserving privacy and ensuring data security. In the current paper, by conducting widely used GPT-4 auto-evaluation, we demonstrate that by exploiting the heterogeneous and diverse sets of instructions on the client's end with the proposed framework FedIT, we improved the performance of LLMs compared to centralized training with only limited local instructions. Further, in this paper, we developed a Github repository named Shepherd. This repository offers a foundational framework for exploring federated fine-tuning of LLMs using heterogeneous instructions across diverse categories.

1 Duke University, 2 Microsoft Research, 3 Adobe Research, 4 Amazon

The paper notes equal contribution and identifies Duke University as the workplace for the research. Its condensed version was accepted by ICASSP 2024 and the work received support from three grants.

  • The authors contributed equally to the work.
  • The work was conducted at Duke University.
  • The condensed paper was accepted by ICASSP 2024 and supported by NSF-2112562, NSF-2332744, and ARO W911NF-23-2-0224.

1 Introduction

The introduction motivates Federated Instruction Tuning as a privacy-preserving way to use diverse local instructions for LLM instruction tuning. It presents FedIT, parameter-efficient tuning, GPT-4 evaluation, and Shepherd as the paper’s main contributions.

  • Privacy concerns, cost, and proprietary data make extensive, high-quality instruction acquisition difficult.
  • FedIT keeps instructions on client devices while aggregating local model updates into a shared global LLM.
  • FedIT aims to use local edge-device resources and instructions rather than relying on large cloud servers for LLM fine-tuning.
  • The paper makes the first attempt to use federated learning for LLM instruction tuning and proposes parameter-efficient tuning for deployment costs.
  • GPT-4 auto-evaluation is used to study whether diverse available instructions improve response quality.
  • Shepherd is released as a customizable and adaptable GitHub repository for future federated fine-tuning research.

2 Related Work

The related work covers instruction-tuning data sources, parameter-efficient fine-tuning, federated learning, and federated NLP benchmarks and applications.

  • Instruction-tuning research uses human-annotated prompts and feedback or machine-generated data from teacher LLMs.
  • PEFT methods reduce the computational and storage demands of LLM fine-tuning, including LoRA, P-Tuning, Prefix Tuning, and Prompt Tuning.
  • The paper selects LoRA for its federated framework because of its reported performance in instruction-tuning studies.
  • Federated learning keeps data on user devices and has developed methods for optimization, robustness, client selection, personalization, and efficiency.
  • Federated NLP research includes language modeling, text classification, sequence tagging, and dialogue generation.
  • Open resources such as Leaf, FedNLP, FedML, FedScale, and FATE support research on federated NLP tasks.

3 Federated Instruction Tuning

FedIT applies federated learning and parameter-efficient tuning to combine heterogeneous local instructions while keeping data on client devices. The accompanying Shepherd framework supports configurable research workflows for federated instruction learning, while the paper identifies multilingual and system heterogeneity as continuing challenges.

  • 3.1 An Overview of FedIT: FedIT combines client-side local training with server-side client scheduling and model aggregation for instruction tuning.Clients receive a global LLM, train on local instructions, and return updates for aggregation.
  • 3.1 An Overview of FedIT: Keeping instructions on local devices addresses data-collection and privacy challenges while enabling participation from distributed edge devices.LoRA reduces local computational and communication overheads, supporting devices with limited resources.
  • 3.1 An Overview of FedIT: Client selection accounts for device availability, computational resources, and differences among clients’ instruction data.The server can select clients to better represent real-world participation constraints and improve training efficiency.
  • 3.2 Heterogeneity of Instructional Data: Statistical heterogeneity is presented as potentially beneficial because multiple clients contribute diverse instruction tasks and subject coverage.The paper frames heterogeneous instructions across clients as a positive factor for federated instruction tuning.
  • 3.2 Heterogeneity of Instructional Data: Databricks-dolly-15k shards exhibit imbalanced instruction categories, with some categories absent from individual clients’ local datasets.Figure 2 contrasts training on one user’s narrow categories with federated training over clients’ more diverse data.
  • 3.2 Heterogeneity of Instructional Data: Instruction heterogeneity also arises from multilingual settings, domain-specific terminology, task complexity, ambiguity, emotional tone, and cultural factors.The paper highlights fairness across languages, especially for underrepresented languages, as requiring further investigation.
  • 3.3 Parameter Efficiency in Federated Instruction Tuning: LoRA freezes the pretrained weight matrix and represents its update with low-rank trainable matrices, considerably reducing trainable parameters.The method is intended to lower fine-tuning costs and support clients with varying computational and communication resources.
  • 3.4 Shepherd: A GitHub Platform for FedIT Support: Shepherd is a lightweight, scalable framework whose pipeline covers client data allocation, participation scheduling, simulated local training, and model aggregation.It supports integration of algorithms and configurations across several recent large language models.

4 Qualitative Study

The qualitative study evaluates Shepherd-7B with GPT-4 on unseen questions and compares it with centralized, local-only, and other baseline models. Results show stronger responses than local-only baselines, while centralized training remains stronger overall; examples illustrate gains in relevance, accuracy, and task-specific capability.

  • Evaluation setup: 20 communication rounds train Shepherd-7B using randomly selected client subsets, with each client performing one local epoch on its instruction data.The setup uses 100 clients, five selected per round, and one Nvidia Titan RTX per client.
  • Evaluation setup: GPT-4 evaluates model responses on 20 unseen questions, scoring paired responses from 1 to 10 with three ratings averaged per pair.The questions come from unseen Vicuna categories, including counterfactual, femir, and math questions.
  • Automatic evaluation: Shepherd-7B significantly surpasses LLaMA and achieves considerably higher scores than models fine-tuned separately on individual clients’ local datasets.The study attributes this advantage to leveraging heterogeneous and diverse instructions across multiple clients.
  • Automatic evaluation: Shepherd-7B outperforms all baselines except the Centralized model in relative scores against ChatGPT (GPT-3.5-turbo).The comparison uses GPT-4 auto-evaluation and reports relative scores over ChatGPT in Figure 3.
  • Example demonstrations: In a counterfactual example, Shepherd-7B produces a more accurate and pertinent response than Local-3 and a more detailed response than LLaMA.Its answer identifies multiple possible biological discoveries, whereas Local-3 includes extraneous information.
  • Example demonstrations: The examples also show that diverse instruction tuning supports capabilities beyond superficially similar training, while federated aggregation still needs more efficient optimization and client scheduling.The paper links heterogeneous local distributions to different learned representations and identifies this as an area for further improvement.

5 Future Directions

Future work targets the communication, computation, privacy, security, personalization, and optimization challenges of federated LLM instruction tuning. Proposed directions include parameter-efficient tuning, improved aggregation and scheduling, personalization, and defenses against malicious or privacy-leaking updates.

  • 5 Future Directions: Federated LLM instruction tuning faces major communication, computation, storage, and local-resource constraints.Frequent model-information exchanges are costly, while clients may lack the computing power and memory needed for full-LLM fine-tuning.
  • 5 Future Directions: Parameter-efficient tuning methods such as Prefix-tuning, LoRA, and BitFit could address federated communication and resource constraints.The paper identifies these methods as future directions tailored for FL systems and capable of yielding competitive results.
  • 5 Future Directions: Malicious clients may inject crafted instructions that pollute federated training and produce biased or suboptimal models.Robust aggregation and LLM-specific outlier detection are proposed to identify and exclude abnormal clients.
  • 5 Future Directions: Personalization is a critical requirement because clients differ in language data, domains, task complexity, emotional tone, and cultural factors.These dimensions introduce forms of heterogeneity beyond conventional federated learning settings.
  • 5 Future Directions: Text-gradient recovery and model memorization can expose sensitive local data, while gradient pruning and DPSGD may incur significant utility loss.Future defenses should be tailored to the characteristics of text data.

6 Conclusion

The paper presents FL-based instruction tuning as a way to use diverse client-side instructions for LLMs. It reports improved performance over fine-tuning with limited instructions and introduces Shepherd for federated fine-tuning research.

  • 6 Conclusion: FedIT is presented as the first exploration of federated learning for instruction tuning LLMs using diverse client-side instructions.The approach addresses settings where end users prefer not to share instructional data.
  • 6 Conclusion: FedIT improves model performance compared with fine-tuning using a limited set of instructions.The conclusion attributes this result to utilizing diverse instructions on the client side.
  • 6 Conclusion: Shepherd is a user-friendly, adaptable, and scalable GitHub repository for exploring federated fine-tuning with heterogeneous instructions across diverse categories.The framework is designed to accommodate large datasets and models.
Loading 2305.05644v2…