Skip to main content
QUICK REVIEW

[Paper Review] MLPruning: A Multilevel Structured Pruning Framework for Transformer-based Models

Zhewei Yao, Linjian Ma|arXiv (Cornell University)|May 30, 2021
Topic ModelingComputer Science39 references7 citations
TL;DR

MLPruning proposes a multilevel structured pruning framework for Transformer-based models that combines head, row, and block-wise sparse pruning using a learnable Top-k threshold for adaptive regularization. It achieves up to 3.69x inference speedup with ~20% of the original model's weights and minimal accuracy drop on GLUE benchmarks.

ABSTRACT

Pruning is an effective method to reduce the memory footprint and computational cost associated with large natural language processing models. However, current approaches either only explore head pruning, which has a limited pruning ratio, or only focus on unstructured pruning, which has negligible effects on the real inference time and/or power consumption. To address these challenges, we develop a novel MultiLevel structured Pruning (MLPruning) framework, which uses three different levels of structured pruning: head pruning, row pruning, and block-wise sparse pruning. We propose using a learnable Top-k threshold, which employs an adaptive regularization to adjust the regularization magnitude adaptively, to select appropriate pruning ratios for different weight matrices. We also propose a two-step pipeline to combine block-wise pruning with head/row pruning to achieve high structured pruning ratios with minimum accuracy degradation. Our empirical results show that for \bertbase, with extapprox20\% of remaining weights, \OURS can achieve an accuracy that is comparable to the full model on QQP/MNLI/\squad, with up to extapprox3.69x speedup. Our framework has been open sourced~\cite{codebase}.

Motivation & Objective

  • To address the limitations of existing pruning methods that either focus only on head pruning with low pruning ratios or unstructured pruning with minimal real-world efficiency gains.
  • To develop a structured pruning framework that enables high compression ratios while preserving model accuracy.
  • To integrate multiple pruning levels—head, row, and block-wise—into a unified, efficient pipeline for Transformer models.
  • To design an adaptive regularization mechanism using a learnable Top-k threshold that dynamically adjusts pruning magnitude across different weight matrices.

Proposed method

  • The framework employs three levels of structured pruning: head pruning to remove attention heads, row pruning to eliminate entire rows in feed-forward layers, and block-wise sparse pruning to enforce sparsity across weight matrices in a structured manner.
  • A learnable Top-k threshold is introduced to adaptively control the regularization magnitude during training, enabling dynamic selection of optimal pruning ratios per weight matrix.
  • A two-step pruning pipeline is designed: first applying head and row pruning, then combining them with block-wise pruning to maximize sparsity while minimizing accuracy degradation.
  • The framework uses adaptive regularization that scales based on the importance of each weight matrix, ensuring stable training and effective pruning.

Experimental results

Research questions

  • RQ1Can a multilevel structured pruning framework achieve higher pruning ratios than head-only or unstructured pruning methods while maintaining model accuracy?
  • RQ2How effective is the learnable Top-k threshold in adapting regularization to different weight matrices for optimal pruning performance?
  • RQ3What is the impact of combining head, row, and block-wise pruning in a two-step pipeline on inference speed and accuracy?
  • RQ4To what extent can structured pruning reduce model size and inference time without significant accuracy degradation on NLP benchmarks?

Key findings

  • MLPruning achieves up to 3.69x inference speedup on BERT-base with only 20% of the original model's parameters remaining.
  • On the QQP, MNLI, and SQuAD benchmarks, the pruned model maintains accuracy comparable to the full model despite significant parameter reduction.
  • The use of a learnable Top-k threshold enables adaptive regularization, improving pruning efficiency and model stability during training.
  • The two-step pipeline effectively combines head/row pruning with block-wise sparsity, enabling high-structured pruning ratios with minimal accuracy drop.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.