Train LLMs on private data with federated learning; OpenFedLLM shows FL beats local training and can beat GPT‑4 in finance

February 10, 20248 min

Overview

Decision SnapshotReady For Pilot

The framework and experiments cover many FL algorithms, domains, and metrics and show consistent FL gains; results are robust but mostly limited to 7B models, LoRA PEFT, and the evaluated datasets.

Citations6

Evidence Strength0.80

Confidence0.80

Risk Signals8

Trust Signals

Findings with numeric evidence: 5/5

Findings with evidence refs: 5/5

Results with explicit delta: 3/4

Reproducibility

Status: Code + data available

Open source: Partial

At A Glance

Cost impact: 65%

Production readiness: 60%

Novelty: 55%

Authors

Rui Ye, Wenhao Wang, Jingyi Chai, Dihan Li, Zexi Li, Yinda Xu, Yaxin Du, Yanfeng Wang, Siheng Chen

Links

Abstract / PDF / Code / Data

Why It Matters For Business

Companies with private domain data can jointly fine-tune LLMs privately and get measurable gains over solo training; finance firms, hospitals, and firms with sensitive data can gain domain-leading models without sharing raw data.

Who Should Care

Summary TLDR

This paper builds OpenFedLLM, a research-friendly framework for fine-tuning large language models (LLMs) using federated learning (FL) on private, distributed data. It implements federated instruction tuning and federated value alignment (DPO), seven FL algorithms, LoRA PEFT, int8 quantization, eight training datasets and 30+ evaluations. Key empirical results: FL consistently beats single-client (local) training across domains; on a general setting they report ≥12% relative improvement on MT-Bench; on a finance task FL models trained from Llama2-7B beat GPT-4 on evaluated benchmarks. Training is practical: with LoRA + int8 they run FL on one RTX 3090 and report ~1–2 hours per client for 100

Problem Statement

Public high-quality data for LLMs is becoming scarce, while useful private datasets sit siloed across organizations. Small parties cannot fine-tune strong LLMs on their own. We need a privacy-preserving, practical way to pool private instruction and preference data to improve LLMs without sharing raw data.

Main Contribution

OpenFedLLM framework: integrates federated instruction tuning (FedIT), federated value alignment (FedVA via DPO), 7 FL algorithms, 8 datasets and 30+ metrics.

Comprehensive empirical study across domains (general, finance, medical, code, math) showing FL consistently improves over local training and can exceed GPT-4 in a finance benchmark.

Key Findings

Federated learning consistently improves over single-client local fine-tuning across tasks.

Numbersmultiple tables: e.g., Table 4 MT-Avg FedAvg 3.346 vs Local 2.844 (open-ended)

Practical UseIf you have limited private instruction data, join a FedLLM setup to get a noticeably better instruction-following model than training alone.

Evidence RefTable 4, Tables 5–9

On a general instruction-tuning evaluation (MT-Bench) they report at least a 12% relative improvement.

Numberspaper claim: “≥ 12% improvement on MT-Bench on general dataset”

Practical UseExpect double-digit relative gains on open-ended chat benchmarks from federated instruction tuning versus isolated fine-tuning.

Evidence RefAbstract and Sec.4.2 (summary claim)

Results

MetricValueBaselineDeltaSplit / DatasetEvidenceEvidence Ref
MT-Avg (open-ended)FedAvg 3.346 vs Local 2.844Local training+17.7% relativeAlpaca-GPT4 (general)Table 4 reports MT-Avg FedAvg 3.346 vs Local 2.844Table 4
AccuracyFedAvg Avg:4 Acc 0.791 vs Local 0.699Local training+13.2% absolute (~19% relative)FinGPT sentiment (evaluation set avg)Table 5 shows FedAvg Avg:4 Acc 0.791, Local Avg:4 Acc 0.699Table 5

What To Try In 7 Days

Run OpenFedLLM with FedAvg + LoRA on a small private dataset (1–5k samples) using int8 on a 3090 to validate gains vs local fine-tuning.

Compare 2–3 FL algorithms (e.g., FedAvg, SCAFFOLD, FedAdagrad) on your domain benchmark to pick the best aggregator.

If alignment matters, try FedDPO on a small preference set to improve harmlessness/helpfulness before deployment.

Optimization Features

Token Efficiency
max sequence length 512LoRA
Infra Optimization
single-GPU training feasible for prototyping (3090), A100 used for larger runs
Model Optimization
int8 quantization
System Optimization
memory-saving techniques to fit 7B model on one 3090
Training Optimization
LoRAcosine LR scheduleserver-side adaptive optimizers (FedAdam/FedAdagrad/FedYogi)

Reproducibility

Risks & Boundaries

Limitations

Experiments focus on LoRA-style PEFT and 7B models; conclusions may not hold for full-parameter training or much larger models.

Client sampling and IID splits appear in many experiments; performance under extreme non-IID, cross-device, or massive-client settings is less explored.

When Not To Use

If you need full-model fine-tuning or plan to pretrain from scratch — this framework targets instruction/value fine-tuning.

When clients cannot run the required LoRA/quantized stacks or lack stable compute/communication for repeated rounds.

Failure Modes

Heterogeneous client preferences can degrade global model usefulness for individual clients (need personalization).

Malicious clients with logically correct but harmful examples can poison alignment unless robust defenses are applied.

Core Entities

Models

Llama2-7BGPT-4GPT-3.5VicunaWizard-Vicuna

Metrics

AccuracyF1Pass@1BLEUMT-AvgVicunaMMLU score

Datasets

AlpacaAlpaca-GPT4FinGPT (sentiment)MedAlpacaCode-AlpacaMathInstructUltraFeedbackHH-RLHF

Benchmarks

MT-BenchVicuna-BenchMMLUBBHHumanEvalMBPPGSM8KFPBFiQA-SATFNSNWGI