Skip to main content
QUICK REVIEW

[论文解读] FederatedScope-LLM: A Comprehensive Package for Fine-tuning Large Language Models in Federated Learning

Weirui Kuang, Bingchen Qian|arXiv (Cornell University)|Sep 1, 2023
Privacy-Preserving Technologies in DataComputer Science被引用 9
一句话总结

FS-LLM 打包端到端的联邦微调大模型,提供基准测试、PEFT 算法、隐私保护选项以及训练加速器,支持在有无完整模型访问的情况下进行高效的基于联邦学习的微调。

ABSTRACT

LLMs have demonstrated great capabilities in various NLP tasks. Different entities can further improve the performance of those LLMs on their specific downstream tasks by fine-tuning LLMs. When several entities have similar interested tasks, but their data cannot be shared because of privacy concerns regulations, federated learning (FL) is a mainstream solution to leverage the data of different entities. However, fine-tuning LLMs in federated learning settings still lacks adequate support from existing FL frameworks because it has to deal with optimizing the consumption of significant communication and computational resources, data preparation for different tasks, and distinct information protection demands. This paper first discusses these challenges of federated fine-tuning LLMs, and introduces our package FS-LLM as a main contribution, which consists of the following components: (1) we build an end-to-end benchmarking pipeline, automizing the processes of dataset preprocessing, federated fine-tuning execution, and performance evaluation on federated LLM fine-tuning; (2) we provide comprehensive federated parameter-efficient fine-tuning algorithm implementations and versatile programming interfaces for future extension in FL scenarios with low communication and computation costs, even without accessing the full model; (3) we adopt several accelerating and resource-efficient operators for fine-tuning LLMs with limited resources and the flexible pluggable sub-routines for interdisciplinary study. We conduct extensive experiments to validate the effectiveness of FS-LLM and benchmark advanced LLMs with state-of-the-art parameter-efficient fine-tuning algorithms in FL settings, which also yields valuable insights into federated fine-tuning LLMs for the research community. To facilitate further research and adoption, we release FS-LLM at https://github.com/alibaba/FederatedScope/tree/llm.

研究动机与目标

  • 在联邦环境中解决隐私、效率与定制化约束下微调大模型的挑战,提供动机与研究目标。
  • 提供端到端的基准测试流水线,用于在多样数据集和任务上评估联邦大模型微调。
  • 提供联邦 PEFT 算法库与接口,实现低通信/计算成本并可访问闭源模型。
  • 使加速器与资源高效训练成为可能,使在普通消费级硬件上进行 FL 基于大模型微调成为现实。
  • 促进跨学科研究的可扩展性,例如在大模型联邦学习中的个性化 FL(pFL)和 FedHPO。

提出的方法

  • 在 FederatedScope (FS) 上构建的 FS-LLM,包含三个模块:LLM-Benchmarks、LLM-AlgZoo 和 LLM-Trainer。
  • 利用联邦数据集和相应评估任务(Fed-CodeAlpaca、Fed-Dolly、Fed-GSM8K-3)提供端到端的 LLM 微调基准测试。
  • 实现一套联邦 PEFT 算法(LoRA、P-tuning、Prompt tuning),并为受限全模型访问的情景提供隐私保护选项(FedOT/offsite-tuning)。
  • 引入加速与资源高效算子(混合精度、DeepSpeed 数据并行、量化、流式、压缩),以降低内存、时间与通信成本。
  • 提供统一、事件驱动的联邦微调接口,支持有无完整模型访问,便于扩展并与 pFL 及 FedHPO 集成。

实验结果

研究问题

  • RQ1在多领域与数据异质性下,使用 PEFT 算法进行联邦微调的效果如何?
  • RQ2在资源有限且不访问完整模型的情况下,能否高效地进行联邦微调?(闭源大模型)
  • RQ3将个性化 FL(pFL) 与 FedHPO 等高级 FL 任务整合到联邦大模型微调中会带来哪些洞见?
  • RQ4基准数据集与评估任务如何反映联邦大模型微调中的现实世界异质性与分布漂移?
  • RQ5在基于 FL 的大模型微调中,通信、计算与精度之间有哪些权衡?

主要发现

  • 带 PEFT 的联邦微调显著优于本地微调,并接近全局微调的性能。
  • LoRA 在代码、通用语言和数学任务的联邦环境中始终呈现最强性能。
  • 基于 PEFT 的 FL 可减少通信与内存需求,使资源受限的客户端也能进行可行的联邦适应。
  • FedOT 实现了在不访问完整模型的情况下的隐私保护微调,便于闭源大模型的适应。
  • FS-LLM 基准套件提供可重复的结果,具容器化评测环境与成本相关指标。
  • 该工作流程支持仿真、分布式和集群模式,并为 pFL 与 FedHPO 的研究提供扩展性。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。