LoRAShear: Efficient Large Language Model Structured Pruning and Knowledge Recovery

Tianyi Chen, Tianyu Ding, Badal Yadav, Ilya Zharkov, Luming LiangarXiv 2023 · DOI

Introduction

Large Language Models (LLMs) like LLaMA have set new benchmarks in artificial intelligence, yet their immense scale presents significant deployment challenges. Structured pruning—removing entire groups of parameters such as neurons or layers—offers a path toward more efficient models. However, traditional pruning methods are often computationally expensive and lead to substantial knowledge loss. LoRAShear addresses these challenges by enabling efficient structured pruning on a single GPU while maintaining high performance through a novel knowledge-recovery mechanism.

Methodology: The LoRAShear Pipeline

LoRAShear introduces a three-stage pipeline designed for resource-constrained environments, focusing on maintaining structural integrity and transferring knowledge during the compression process.

The LoRAShear pipeline: from structure discovery to knowledge recovery.

1. Minimally Removal Structure Discovery

LLMs utilize complex architectures where parameters are often interdependent. LoRAShear uses dependency graphs to identify "node groups"—sets of parameters that must be pruned together to preserve the model's structural integrity. This ensures that the resulting pruned model remains mathematically sound and functional.

2. LoRA Half-Space Projected Gradient (LHSPG)

The core innovation of LoRAShear is the LHSPG algorithm. Unlike standard pruning that simply deletes weights, LHSPG progressively "transfers" information from redundant structures to the remaining important ones. It employs a specialized gradient descent approach to project redundant groups toward zero while simultaneously optimizing the surviving weights to compensate for the loss.

3. Dynamic Knowledge Recovery

Post-pruning, models often suffer from performance degradation. LoRAShear mitigates this by analyzing which specific knowledge domains (e.g., logic vs. factual retrieval) were most affected. It then adaptively constructs a targeted dataset from pre-training and instruction data to help the model re-learn these specific capabilities efficiently.

Key Insights: Non-Uniform Knowledge Distribution

A critical finding of the LoRAShear research is that knowledge is not spread uniformly across an LLM's architecture. Some node groups are significantly more vital for performance than others.

Knowledge distribution analysis identifying critical model components.

By identifying these critical components early, LoRAShear prevents "performance collapse" during the pruning process. Furthermore, by performing analysis over Low-Rank Adaptors (LoRA) instead of full weight matrices, the framework significantly reduces memory overhead, allowing the entire process to run on a single A100 GPU.

Experimental Results

The framework was evaluated using LLaMA-7B across several common-sense reasoning and knowledge benchmarks, including BoolQ, PIQA, and ARC.

  • Efficiency: LoRAShear can prune 20% of a model's parameters with only a 1.0% drop in average performance across seven benchmarks.
  • Scalability: At 50% pruning, the model still preserves 82% of its original capabilities.
  • Benchmarking: LoRAShear consistently outperforms state-of-the-art methods like LLM-Pruner and Wanda. For instance, at 20% pruning, LoRAShear achieved a score of ~62.2%, surpassing the next best competitor's ~60.0%.
  • Accessibility: The entire pipeline completes within a few days on a single GPU, making high-quality model compression accessible to researchers without massive compute clusters.

Conclusion

LoRAShear demonstrates that high-performance LLM pruning does not require massive resources. By combining structural dependency analysis with information-transfer pruning and dynamic recovery, it provides a robust framework for creating efficient, specialized models. Future work will explore the application of LoRAShear to larger model scales and more recent architectures.

Summary updated

BibTeX
@misc{chen2023lorashear,
  author = {Tianyi Chen and Tianyu Ding and Badal Yadav and Ilya Zharkov and Luming Liang},
  title = {{LoRAShear: Efficient Large Language Model Structured Pruning and Knowledge Recovery}},
  year = {2023},
  eprint = {2310.18356},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2310.18356},
}
Figure