FlowerTune: A Cross-Domain Benchmark for Federated Fine-Tuning of Large Language Models

Yan Gao, Massimo Roberto Scamarcia, Javier Fernandez-Marques, Mohammad Naseri, Chong Shen Ng, Dimitris Stripelis, Zexi Li, Tao Shen, Jiamu Bai, Daoyuan Chen, Zikai Zhang, Rui Hu, InSeo Song, Lee KangYoon, Hong Jia, Ting Dang, Junyan Wang, Zheyuan Liu, Daniel Janes Beutel, Lingjuan Lyu, Nicholas D. Lane · DOI

TL;DR

This paper introduces FlowerTune, a novel benchmark for evaluating Large Language Models (LLMs) fine-tuned using Federated Learning (FL) across diverse domains like finance, medicine, and coding. It addresses the challenge of adapting LLMs to sensitive, domain-specific data without compromising privacy, providing a comprehensive comparison of 26 LLMs and various FL strategies.

What Problem Does This Paper Address?

The development of powerful Large Language Models (LLMs) typically relies on massive amounts of publicly available data. However, this approach faces limitations: the supply of high-quality public data is finite, and many critical applications require LLMs to understand domain-specific, often sensitive, information (e.g., medical records, financial data). Accessing this sensitive data directly is problematic due to privacy and security concerns. Federated Learning (FL) offers a promising solution by enabling decentralized model training without sharing raw data. Yet, the compatibility and performance of existing pre-trained LLMs within FL settings, especially across diverse domains, remain largely unexplored. This gap hinders the development of privacy-preserving, domain-specialized LLMs for real-world applications.

Methods

The core of this work is the FlowerTune LLM Leaderboard, a benchmarking initiative built on the Flower platform. It provides a standardized framework for evaluating LLMs under federated fine-tuning. Key methodological aspects include:

  • Cross-Domain Challenges: Four distinct challenges are established: General NLP, Finance, Medical, and Coding. Each challenge utilizes domain-specific instruction-tuning datasets.
  • Federated Fine-Tuning: The framework supports various pre-trained LLMs and FL strategies. Parameter-Efficient Fine-Tuning (PEFT) techniques, specifically LoRA (Low-Rank Adaptation) and DoRA (Weight-Decomposed Low-Rank Adaptation), are employed to reduce computational requirements.
  • Aggregation Strategies: The study investigates four popular FL aggregation algorithms: FedAvg, FedProx, FedAvgM, and FlexLoRA.
  • System Metrics: Beyond performance, the framework monitors crucial FL system metrics like communication cost and VRAM usage, essential for practical deployment.
  • Comprehensive Benchmarking: The authors conduct a large-scale experiment benchmarking 26 base LLMs under a unified FL setting.

Datasets

The FlowerTune LLM Leaderboard utilizes the following datasets for federated fine-tuning and evaluation:

Federated Fine-tuning Datasets: * General NLP: alpaca-gpt4 * Finance: fingpt-sentiment-train * Medical: medical-flashcards * Code: code-alpaca-20k

Downstream Evaluation Datasets: * General NLP: MMLU (Massive Multitask Language Understanding) * Finance: FPB, FIQA, TFNS * Medical: PubMedQA, MedMCQA, MedQA, CareQA * Code: MBPP, HumanEval, MultiPL-E

Key Insights and Ideas

  • Instruct-tuned LLMs Outperform: Across all domains, LLMs that have undergone instruction tuning (pre-trained with instruction-response pairs) consistently show higher performance compared to their non-instruct counterparts. This highlights the importance of instruction tuning for better adaptation in FL settings.
  • Base Model Selection is Crucial: The choice of the base LLM has a significantly larger impact on performance than the specific aggregation strategy or fine-tuning technique. This underscores the need for careful model selection based on the target domain and task.
  • Domain-Specific Models Show Promise: While general-purpose LLMs are evaluated, the paper hints at the potential of domain-specific pre-trained models, which are expected to perform better due to prior exposure to relevant data.
  • PEFT Techniques are Essential: The use of parameter-efficient fine-tuning methods like LoRA and DoRA is critical for making LLM fine-tuning feasible within the resource constraints typical of FL environments.
  • Trade-offs Exist: There's a clear trade-off between model performance and system resource usage (communication and VRAM). Larger models generally perform better but require more resources.

Key Results

  • General NLP: Qwen2.5-7B-Instruct achieved the highest average accuracy, outperforming larger models. Phi-4-Mini-Instruct also showed strong performance despite its smaller size.
  • Finance: Gemma2-9B-Instruct achieved the best average performance (84.21%), benefiting from its larger parameter count. Smaller models like Llama3.2-1B and Qwen2-0.5B performed well on this classification task.
  • Medical: Gemma2-9B-Instruct again led with an average accuracy of 62.25%. The Qwen model family consistently outperformed Llama models of comparable size.
  • Coding: Gemma2-9B-Instruct achieved the highest performance (53.29%), followed closely by Llama3.1-8B-Instruct. Larger models generally performed better, suggesting code generation tasks benefit from greater model capacity.
  • System Performance: The use of DoRA strategy resulted in modest communication and VRAM usage, with most models fitting within an A100/H100 GPU. Smaller models like the SmolLM2 family achieved acceptable performance with significantly lower resource requirements.

Limitations and Future Work

  • Limited Hyperparameter Tuning: The experiments were conducted with a unified set of hyperparameters. Further optimization for each model-dataset pair could potentially improve performance.
  • Marginal Differences in Aggregation: Off-the-shelf FL aggregation algorithms showed only minor performance differences. Future work should focus on developing specialized aggregation algorithms tailored for LLM adapter tuning.
  • Cross-Silo Focus: The study primarily focused on cross-silo FL settings. Future work could explore more resource-constrained environments and heterogeneous data distributions.
  • On-Device Fine-Tuning: While the paper focuses on cross-silo, it acknowledges that recent advances in on-device fine-tuning could offer further privacy and efficiency benefits, which are left for future exploration.
  • Computational Speed on Edge Devices: While VRAM is manageable, the computational speed on actual edge devices is a critical factor that requires further investigation.

Summary updated

BibTeX
@misc{gao2025flowertune,
  author = {Yan Gao and Massimo Roberto Scamarcia and Javier Fernandez-Marques and Mohammad Naseri and Chong Shen Ng and Dimitris Stripelis and Zexi Li and Tao Shen and Jiamu Bai and Daoyuan Chen and Zikai Zhang and Rui Hu and InSeo Song and Lee KangYoon and Hong Jia and Ting Dang and Junyan Wang and Zheyuan Liu and Daniel Janes Beutel and Lingjuan Lyu and Nicholas D. Lane},
  title = {{FlowerTune: A Cross-Domain Benchmark for Federated Fine-Tuning of Large Language Models}},
  year = {2025},
  eprint = {2506.02961},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.02961},
}
Figure