GRASP: Replace Redundant Layers with Adaptive Singular Parameters for Efficient Model Compression

Kainan Liu, Yong Zhang, Ning Cheng, Zhitao Li, Shaojun Wang, Jing Xiao

TL;DR

Large language models (LLMs) are computationally expensive. This paper introduces GRASP, a novel method to compress LLMs by intelligently removing redundant layers. GRASP uses gradient-based attribution to identify and retain only the most critical singular components within these layers, achieving significant compression with minimal performance loss and without requiring extensive retraining.

What Problem Does This Paper Address?

Large Language Models (LLMs) have become incredibly powerful, but their massive size makes them computationally expensive and difficult to deploy on resource-limited devices. While techniques like quantization, distillation, and pruning exist to reduce model size, indiscriminate layer pruning often leads to a significant drop in performance. Existing methods that replace pruned layers with lightweight modules typically require substantial retraining, negating some of the efficiency gains. This paper addresses the challenge of efficiently compressing LLMs by removing redundant layers while preserving performance and minimizing the need for retraining.

Methods

GRASP employs a two-step approach:

  1. Redundant Layer Selection: The paper first identifies layers that contribute minimally to the model's transformation of hidden states. This is done by calculating the cosine similarity between the input and output hidden states of each layer. Layers with high cosine similarity are deemed redundant.
  2. Layer Replacement with Adaptive Singular Parameters: Instead of simply removing redundant layers, GRASP leverages the inherent low-rank structure within these layers. It performs Singular Value Decomposition (SVD) on the weight matrices of the redundant layers. Crucially, it doesn't just keep the largest singular values (which might not correlate with performance). Instead, it uses a gradient-based attribution mechanism on a small calibration dataset to identify the singular components (singular values and their corresponding vectors) that are most critical for downstream task performance. Only the top-r% (typically 10%) of these critical singular components are retained, and the redundant layer is reconstructed using these components. This allows for significant parameter reduction with minimal overhead.

Datasets

The paper uses the following datasets:

  • Calibration Datasets: WikiText-2, C4, PTB. These are used to compute gradient-based attribution scores.
  • Evaluation Benchmarks:
    • Commonsense Reasoning: WinoGrande, HellaSwag, OpenBookQA, PIQA, ARC-e, ARC-c, MathQA.
  • Natural Language Understanding (NLU) & Question Answering (QA): CMNLI, CHID, WSC, CommonsenseQA, BoolQ, MMLU, CMMLU, Race, C3.
  • Natural Language Generation (NLG): GSM8K.
  • Long-form Reasoning: LongBench (including datasets like GovReport, QMSum, MultiNews, VCSUM, TREC, TriviaQA, SAMSum, LSHT, PassageCount, PassageRetrieval-en, PassageRetrieval-zh, NarrativeQA, Qasper, MultiFieldQA-en, MultiFieldQA-zh, HotpotQA, 2WikiMultihopQA, MuSiQue, DuReader, LCC, RepoBench-P).

Key Insights and Ideas

  • Redundancy is not uniform: Not all singular values in a redundant layer contribute equally to performance. Magnitude alone is a poor indicator of importance.
  • Gradient-based attribution is key: Using gradients from a small calibration dataset to assess the impact of singular components on task loss is a more effective way to identify critical parameters than simple magnitude-based heuristics.
  • Low-rank structure is exploitable: Redundant layers in LLMs have a strong low-rank structure that can be exploited for compression without catastrophic performance loss.
  • Minimal parameters suffice: Retaining a very small fraction (around 10%) of singular components can recover most of the performance lost by removing a layer.
  • Training-free efficiency: GRASP achieves strong performance without requiring extensive retraining, making it highly efficient.

Key Results

  • Performance: GRASP consistently outperforms existing structured pruning methods. For example, it achieves 90% of the original model's performance under a 20% compression ratio. When post-training compensation is applied, it can achieve up to 94.9% of the original performance at a 25% compression ratio.
  • Efficiency: GRASP significantly improves inference speed (throughput) comparable to direct layer removal, with negligible overhead from the retained parameters.
  • Robustness: GRASP demonstrates robustness across different LLM architectures (LLaMA, Mistral families) and is relatively insensitive to the choice and size of the calibration dataset, performing well even with as few as 64 samples.
  • Compression: Achieves high compression ratios (e.g., 20% of original size) while maintaining strong accuracy.

Limitations and Future Work

  • Redundancy Heuristic: The method relies on cosine similarity of hidden states to identify redundant layers, which might miss more subtle forms of redundancy.
  • Gradient Access: GRASP requires access to gradients and a calibration dataset, which might be a limitation in strictly black-box or privacy-sensitive scenarios.
  • Model Scale and Multilinguality: Current experiments are primarily on models up to 13B parameters and English-language tasks. Extending GRASP to larger models and multilingual tasks is a promising direction.

Summary updated

BibTeX
@inproceedings{liu2025grasp,
  author = {Kainan Liu and Yong Zhang and Ning Cheng and Zhitao Li and Shaojun Wang and Jing Xiao},
  title = {{GRASP: Replace Redundant Layers with Adaptive Singular Parameters for Efficient Model Compression}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2025},
}
Figure