让无结构文本自动变指令数据,实现安全高效的联邦大模型调优
Leveraging Unstructured Text Data for Federated Instruction Tuning of Large Language Models
- 用少量示例和检索机制,将客户端无结构文本转为指令-响应对
- 在医疗、知识、数学三领域实验中,均显著提升基础大模型表现
- 适合无标注数据但有文本资源的场景,扩展联邦微调应用范围
联邦指令微调使多个客户端协作优化共享的大语言模型(LLM),使其能遵循人类指令,而无需直接共享原始数据。然而,现有方法不切实际地要求所有客户端都具备指令微调数据(即结构化的指令-响应对),这需要大量人工标注,因为客户端数据通常是无结构文本。为此,我们提出一种新颖且灵活的框架 FedIT-U2S,可自动将无结构语料转化为用于联邦指令微调的结构化数据。该框架包含两个关键步骤:(1) 少样本指令微调数据生成,将每个无结构数据项与若干示例结合,通过提示一个 LLM 生成指令-响应对。为增强灵活性,提出基于检索的示例选择技术,根据客户端数据与示例池的相关性自动选取示例,避免预先确定示例的需要。(2) 基于生成数据的典型联邦指令微调过程。总体而言,只要客户端拥有有价值的文本语料,FedIT-U2S 即可适用,拓宽了联邦指令微调的应用范围。我们在三个领域(医学、知识、数学)进行了一系列实验,结果表明,所提出的 FedIT-U2S 能持续且显著提升基线 LLM 性能。
原文摘要 · Abstract (English)
Federated instruction tuning enables multiple clients to collaboratively fine-tune a shared large language model (LLM) that can follow humans' instructions without directly sharing raw data. However, existing literature impractically requires that all the clients readily hold instruction-tuning data (i.e., structured instruction-response pairs), which necessitates massive human annotations since clients' data is usually unstructured text instead. Addressing this, we propose a novel and flexible framework FedIT-U2S, which can automatically transform unstructured corpus into structured data for federated instruction tuning. FedIT-U2S consists two key steps: (1) few-shot instruction-tuning data generation, where each unstructured data piece together with several examples is combined to prompt an LLM in generating an instruction-response pair. To further enhance the flexibility, a retrieval-based example selection technique is proposed, where the examples are automatically selected based on the relatedness between the client's data piece and example pool, bypassing the need of determining examples in advance. (2) A typical federated instruction tuning process based on the generated data. Overall, FedIT-U2S can be applied to diverse scenarios as long as the client holds valuable text corpus, broadening the application scope of federated instruction tuning. We conduct a series of experiments on three domains (medicine, knowledge, and math), showing that our proposed FedIT-U2S can consistently and significantly brings improvement over the base LLM.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。