Skip to main content
QUICK REVIEW

[论文解读] OpenFedLLM: Training Large Language Models on Decentralized Private Data via Federated Learning

Rui Ye, Wenhao Wang|arXiv (Cornell University)|Feb 10, 2024
Privacy-Preserving Technologies in DataComputer Science被引用 6
一句话总结

OpenFedLLM 提出一个框架,用于使用七种 FL 算法、八个数据集和 30+ 指标进行联邦指令微调和联邦价值对齐,证明 FL 可以超越本地训练,并且在某些金融领域甚至超过 GPT-4。

ABSTRACT

Trained on massive publicly available data, large language models (LLMs) have demonstrated tremendous success across various fields. While more data contributes to better performance, a disconcerting reality is that high-quality public data will be exhausted in a few years. In this paper, we offer a potential next step for contemporary LLMs: collaborative and privacy-preserving LLM training on the underutilized distributed private data via federated learning (FL), where multiple data owners collaboratively train a shared model without transmitting raw data. To achieve this, we build a concise, integrated, and research-friendly framework/codebase, named OpenFedLLM. It covers federated instruction tuning for enhancing instruction-following capability, federated value alignment for aligning with human values, and 7 representative FL algorithms. Besides, OpenFedLLM supports training on diverse domains, where we cover 8 training datasets; and provides comprehensive evaluations, where we cover 30+ evaluation metrics. Through extensive experiments, we observe that all FL algorithms outperform local training on training LLMs, demonstrating a clear performance improvement across a variety of settings. Notably, in a financial benchmark, Llama2-7B fine-tuned by applying any FL algorithm can outperform GPT-4 by a significant margin while the model obtained through individual training cannot, demonstrating strong motivation for clients to participate in FL. The code is available at https://github.com/rui-ye/OpenFedLLM.

研究动机与目标

  • 推动在分布式私有数据上对LLMs进行协作、隐私保护的训练,而不是仅仅依赖公开数据。
  • 提供一个将联邦指令微调与联邦价值对齐在多个 FL 基线内整合的框架。
  • 探索在中等配置的硬件上使用参数高效微调实现的实际可行性。
  • 提供跨越多领域的综合经验研究,以揭示 FL 的收益和领域特定的洞见。

提出的方法

  • 将 7 种代表性的联邦学习算法(如 FedAvg、FedProx、SCAFFOLD、FedAvgM、FedAdagrad、FedYogi、FedAdam)整合到一个 LLM 微调框架中。
  • 使用带 LoRA 的有监督微调损失实现联邦指令微调(FedIT),以实现参数高效。
  • 实现联邦价值对齐(FedVA),使用 Direct Preference Optimization (DPO) 损失以在客户端之间实现与人类偏好的一致。
  • 提供解耦的框架式实现,便于在 FL 与 LLM 训练之间进行协作。
  • 采用 PEFT 技术(LoRA)使可训练/传达的参数保持在基础模型的 1% 以内。
  • 支持跨领域的 8 个数据集和 30+ 个评估指标,以评估泛化性和安全性。

实验结果

研究问题

  • RQ1联邦学习是否能够在多领域相比本地训练提升 LLM 的指令遵循能力?
  • RQ2通过 DPO 的联邦价值对齐在联邦设置下是否能带来更安全、更有帮助的 LLM 行为?
  • RQ3哪些 FL 算法和数据集条件在 LLM 微调中能最好地保留知识与性能?
  • RQ4在联邦 LLM 训练中应用 PEFT 时的实际资源需求与效率提升有哪些?
  • RQ5在哪些领域(金融、医疗、代码等)在某些配置下,FL 训练的 LLM 能超越如 GPT-4 等基线?

主要发现

  • 所有 FL 算法在多个基准测试上均优于本地训练。
  • 通过 FL 的训练可以在单个消费级 GPU 上运行,并且每个客户端大约需要 1–2 小时完成 100 轮。
  • 没有单一 FL 算法在所有情境中占主导;性能因领域和指标而异。
  • 在金融相关任务中,带有领域特定数据的 FL 可以超越 GPT-4,而纯本地训练则不能。
  • 联邦指令微调和联邦价值对齐共同提升指令遵循性和与人类价值观的一致性。
  • 该框架实现了较高的效率,使用 LoRA 时每轮只有大约 0.06% 的参数是可训练/需要传输的。

阅读本论文

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

在 Nubint 中阅读本论文

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