Exploring Federated Pruning for Large Language Models

Pengxin Guo, Yinong Wang, Wei Li, Mengting Liu, Ming Li, Jinkai Zheng, Liangqiong Qu · DOI

Abstract

Pruning massive Large Language Models (LLMs) typically requires centralized access to calibration data, posing a significant privacy risk. This paper introduces FedPrLLM, a framework for federated unstructured pruning that enables collaborative model compression without sharing raw data. Through extensive benchmarking across the LLaMA family, we demonstrate that a simple one-shot pruning strategy using layer-wide parameter comparison achieves performance parity with centralized methods, while more complex iterative or weight-scaling approaches offer diminishing returns.

Introduction

As Large Language Models (LLMs) continue to grow in scale, pruning has become a vital technique for deployment on resource-constrained hardware. However, state-of-the-art pruning methods like Wanda require "calibration data" to identify redundant weights. In sectors such as healthcare and finance, this data is strictly private. While Federated Learning (FL) addresses data privacy during training, its application to model pruning remains under-explored. This research investigates three critical dimensions of federated pruning: the optimal comparison scope for weight importance, the utility of weight scaling, and the trade-off between iterative and one-shot pruning strategies.

The FedPrLLM Framework

FedPrLLM provides a comprehensive workflow for federated unstructured pruning. The process is designed to minimize communication overhead while maximizing the "consensus" of decentralized clients.

  1. Local Masking: Each client utilizes its private data to compute a local pruning mask (a binary matrix) using importance metrics like Wanda.
  2. Aggregation: Clients transmit only these binary masks to a central server, preserving data privacy. The server aggregates these masks to create a global consensus matrix $\hat{M}$, where each entry represents the frequency with which clients voted to prune a specific weight.
  3. Global Pruning: The server applies a comparison strategy (layer, row, or column-wise) to select the top-$k$ weights for removal based on the aggregated consensus.
  4. Broadcasting: The final pruned global model is distributed back to the clients.
The FedPrLLM framework workflow, illustrating local mask calculation, server aggregation, and the various comparison strategies explored.

Experimental Setup

We evaluated FedPrLLM across six open-source LLMs, including the LLaMA, LLaMA-2, and LLaMA-3 families. Performance was measured using perplexity (where lower is better) on three standard benchmarks:

  • WikiText2: High-quality Wikipedia articles.
  • C4 (Colossal Clean Crawled Corpus): Diverse web-crawled text.
  • PTB (Penn Treebank): A classic corpus for linguistic evaluation.

Key Insights and Results

1. The Superiority of Layer-Wide Comparison

One of the most significant findings is that the scope of weight comparison matters immensely. While local pruning metrics often operate on a row-wise basis, global aggregation performs best when weights are compared across the entire layer. As shown in our results, using column-wise comparison leads to catastrophic performance degradation (extremely high perplexity), while layer-wise comparison consistently yields the best results.

2. "Less is More": One-Shot vs. Iterative Pruning

Contrary to expectations that iterative, layer-by-layer pruning would yield higher accuracy, our results indicate that one-shot pruning—calculating all masks simultaneously—achieves nearly identical performance. This is a crucial finding for federated environments, as one-shot pruning avoids the prohibitive communication costs associated with multiple rounds of iterative updates.

3. Weight Scaling and Performance Parity

We tested whether scaling down weights with "weak consensus" (those only some clients wanted to prune) would improve results. Surprisingly, simple binary pruning outperformed scaling. Overall, FedPrLLM achieved performance remarkably close to the "Centralized" baseline, which represents the theoretical upper bound where all data is pooled.

WikiText2 perplexity results showing FedPrLLM's performance across different LLaMA models and pruning configurations.

As illustrated in the table above, for LLaMA-7B on WikiText2 at 50% sparsity, FedPrLLM (Layer, One-shot) achieved a perplexity of 7.32, nearly matching the centralized result of 7.25 and significantly outperforming the 7.44 achieved by clients pruning in isolation (Local-only).

Conclusion and Future Work

FedPrLLM demonstrates that effective LLM pruning is possible in decentralized, privacy-sensitive environments. The "less is more" philosophy—favoring one-shot, layer-wide pruning without complex scaling—provides a robust and communication-efficient path forward. Future research will explore extending this framework to structured pruning (removing entire neurons or blocks) to facilitate direct hardware acceleration on standard commodity devices.

Summary updated

BibTeX
@misc{guo2025exploring,
  author = {Pengxin Guo and Yinong Wang and Wei Li and Mengting Liu and Ming Li and Jinkai Zheng and Liangqiong Qu},
  title = {{Exploring Federated Pruning for Large Language Models}},
  year = {2025},
  eprint = {2505.13547},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.13547},
}
Figure