Frustratingly Easy Task-aware Pruning for Large Language Models

Yuanhe Tian, Junjie Liu, Xican Yang, Haishan Ye, Yan SongarXiv 2025 · DOI

Introduction

As Large Language Models (LLMs) scale to hundreds of billions of parameters, pruning—the selective removal of redundant weights—has become a critical technique for deployment in resource-constrained environments. However, standard "one-shot" pruning methods like Wanda or SparseGPT typically rely on general-domain calibration data (e.g., Wikipedia or C4). This approach risks inadvertently deleting parameters essential for specialized tasks such as medical reasoning or scientific problem-solving. While the resulting models may remain linguistically fluent, their performance on domain-specific tasks often degrades significantly because the calibration data failed to activate specialized neural circuits during the importance-ranking phase.

Methodology: Task-Aware Pruning Framework

This paper introduces a "frustratingly easy" framework that integrates task-awareness into existing pruning algorithms. The core of the approach is a dual-source pruning paradigm that utilizes both general and task-specific calibration data to identify critical weights.

The proposed task-aware pruning framework computes importance scores using dual-source calibration data to protect weights critical for specific domains.

The framework operates through three primary stages:

  1. Dual Calibration: Importance scores are computed using a general-domain dataset ($D_G$) and a task-specific dataset ($D_T$).
  2. Channel Partitioning: Channels are categorized based on the difference in activation norms between the two domains. Using a hyperparameter $\alpha$, channels are grouped into Shared (active in both), General-only, or Task-only.
  3. Score Fusion: A final "mixed importance" score is calculated. Shared channels receive a fused score ($s^G + s^T$), effectively doubling their perceived importance and ensuring the model's "backbone" remains intact. Exclusive channels are ranked based on their respective domain scores.

Experimental Setup

The researchers evaluated the framework using the Qwen-3 (32B) model across several high-stakes benchmarks:

  • WikiText-2: Measures general language fluency (Perplexity).
  • MMLU: Covers 57 subjects in a massive multitask setting.
  • MedQA: USMLE-style medical questions.
  • ARC: Grade-school science reasoning.

Calibration was performed using English C4 for the general domain and small samples (128 examples) from the training splits of MMLU, MedQA, and ARC for task-specific data.

Results and Discussion

The proposed method was compared against the state-of-the-art Wanda baseline at various sparsity levels.

Performance comparison of the proposed task-aware pruning vs. Wanda on Qwen-3 (32B) across different compression rates (CR).

Performance at Scale

At 50% sparsity, the task-aware approach achieved an average accuracy of 68.36%, outperforming Wanda's 67.34%. This advantage persists even at extreme sparsity levels; at 90% compression, the method maintains a lead (25.55% vs. 24.80% average accuracy), demonstrating superior robustness when the majority of weights are removed. The method also works seamlessly with hardware-friendly N:M structured pruning patterns (like 2:4 or 4:8), consistently outperforming the baseline in these constrained settings.

Insights into Model Specialization

Analysis of channel distribution reveals that lower Transformer layers are dominated by "Shared" parameters responsible for syntax and basic grammar. In contrast, deeper layers exhibit greater specialization, where "General-only" and "Task-only" parameters diverge to handle high-level reasoning. The hyperparameter $\alpha$ plays a crucial role in this partitioning; a value of approximately 0.2 was found to provide the optimal balance between general fluency and task-specific performance.

Conclusion

The task-aware pruning framework provides a simple yet effective way to preserve specialized capabilities in compressed LLMs. By prioritizing "shared" parameters that serve as the model's logical backbone, the method consistently outperforms general-purpose baselines. Future work will explore combining this logic with other compression techniques like quantization and extending it to broader instruction-following scenarios.

Summary updated

BibTeX
@misc{tian2025frustratingly,
  author = {Yuanhe Tian and Junjie Liu and Xican Yang and Haishan Ye and Yan Song},
  title = {{Frustratingly Easy Task-aware Pruning for Large Language Models}},
  year = {2025},
  eprint = {2510.22489},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.22489},
}
Figure