NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Federated Fine-tuning of Large Language Models under Heterogeneous Tasks and Client Resources

Jiamu Bai, Daoyuan Chen, Bingchen Qian, Liuyi Yao, Yaliang Li

Introduction

Fine-tuning Large Language Models (LLMs) on decentralized data using Federated Learning (FL) is a highly attractive paradigm for improving models without compromising user privacy. Because LLMs are massive, FL typically relies on Parameter-Efficient Fine-Tuning (PEFT) methods like Low-Rank Adaptation (LoRA), which freeze the main model and only train small, low-rank matrices.

However, real-world FL involves a highly heterogeneous mix of devices—ranging from older smartphones to powerful desktop computers—and a wide variety of user tasks. Traditional FL methods suffer from the "bucket effect": to average the LoRA matrices across all clients, every client must use the exact same matrix size (rank). This forces the entire network to adopt the smallest viable rank dictated by the least-resourced device. Small LoRA ranks tend to overfit to specific local tasks and fail to capture broad, generalized knowledge, leaving the extra compute power of well-resourced devices completely unutilized.

To address this bottleneck, researchers introduce FlexLoRA, a clever aggregation scheme that allows devices to use different LoRA sizes based on their unique hardware capabilities. By synthesizing full-size weights on the server and using Singular Value Decomposition (SVD) to redistribute them, FlexLoRA breaks the bucket effect, allowing powerful devices to contribute more and significantly boosting the global model's ability to generalize.

The FlexLoRA Methodology

To allow clients to train with different LoRA ranks, the authors propose FlexLoRA as a simple but highly effective plug-and-play aggregation scheme.

The process operates in four main steps:

  1. Local Training with Heterogeneous Ranks: Each client is assigned the largest LoRA rank its local memory and compute can handle, allowing it to capture as much task complexity as possible.
  2. Full-Size Synthesis: Instead of trying to directly average differently sized low-rank matrices (which is mathematically impossible), the server first multiplies each client's low-rank matrices together to reconstruct their full-size weight updates.
  3. Global Aggregation: The server averages these full-size weight matrices together to create a single, knowledge-rich global weight matrix.
  4. SVD Redistribution: To send this global knowledge back to the clients, the server applies Singular Value Decomposition (SVD) to the global matrix. It slices the SVD components to perfectly fit each client's specific rank capacity.

This approach allows FlexLoRA to be seamlessly integrated into existing FL algorithms (like FedAvg, FedIT, and SLoRA) without requiring complex hyperparameter tuning.

Experimental Setup

To simulate highly heterogeneous cross-device environments, the authors utilized two primary datasets:

  • Super-NaturalInstructions: A dataset containing over 1,600 distinct NLP tasks. The authors split this so that each of the 1,600+ simulated clients trained on a completely unique task.
  • Dolly-15K: Used for a mixed-task scenario where clients handle a variety of tasks simultaneously.

The primary foundation model used was DataJuicer (1.3B), chosen for its suitability for edge devices. They also ran scalability tests using the more powerful LLaMA-3 (8B).

Key Insights and Results

Overcoming the Bucket Effect

The authors theoretically and empirically prove that forcing a uniform, small LoRA rank across all clients reduces the global model's zero-shot generalization. Larger ranks capture broader, less task-specific features. By allowing clients to "max out" their local resources, the global model learns faster and generalizes better than if the network were artificially standardized.

Furthermore, SVD proved to be a surprisingly lossless compression tool for FL. When the server uses SVD to compress the aggregated global weights back down to lower ranks, the approximation error is remarkably low. For example, compressing the weights down to a rank of 30 retained the vast majority of the full-rank matrix's information.

Performance and Efficiency Gains

When plugged into standard FL baselines, FlexLoRA consistently improved zero-shot generalization on unseen clients.

Test loss of FedIT under different LoRA ranks compared to FlexLoRA.

Key performance highlights include:

  • Overall Boosts: FlexLoRA boosted average Rouge-L scores by 2.14% for FedAvg and 1.94% for SLoRA.
  • Task-Specific Gains: The method showed particularly strong improvements (up to 4%) on complex language understanding tasks that require parsing logical relationships, such as overlap extraction and textual entailment.
  • Massive Efficiency Gains: Because larger local ranks help the model converge in fewer communication rounds, FlexLoRA actually reduces the overall time and system cost of training. Depending on the distribution of devices, FlexLoRA reduced total FL costs by 49.4% to 66.9% compared to standard homogeneous training.
  • State-of-the-Art Performance: FlexLoRA consistently outperformed HETLORA, a concurrent state-of-the-art method that attempts to solve the same problem using zero-padding and truncation instead of SVD.

Limitations and Future Work

Due to the massive computational cost of simulating thousands of clients, the authors were only able to test the highly heterogeneous 1,600-client setup on the smaller 1.3B parameter model. The cutting-edge LLaMA-3 (8B) model was only tested in a smaller 200-client environment.

The authors suggest that future research should focus on scaling these thousands-of-clients scenarios to even larger foundation models, further pushing the boundaries of data-efficient and privacy-preserving LLM enhancement across diverse edge devices.

Summary updated

BibTeX
@inproceedings{bai2024federated,
  author = {Jiamu Bai and Daoyuan Chen and Bingchen Qian and Liuyi Yao and Yaliang Li},
  title = {{Federated Fine-tuning of Large Language Models under Heterogeneous Tasks and Client Resources}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=gkOzoHBXUw},
}
Figure