Skip to main content
QUICK REVIEW

[Paper Review] Efficient Transformer-based Large Scale Language Representations using Hardware-friendly Block Structured Pruning

Bingbing Li, Zhenglun Kong|arXiv (Cornell University)|Sep 17, 2020
Topic ModelingComputer Science32 references5 citations
TL;DR

This paper proposes a hardware-friendly block-structured pruning method for efficient deployment of large-scale Transformer language models on resource-constrained devices. By integrating reweighted group Lasso regularization into block pruning, the approach achieves up to 5.0× model compression with minimal accuracy degradation across BERT, RoBERTa, and DistilBERT on GLUE benchmarks, and remains orthogonal to knowledge distillation for further compression.

ABSTRACT

Pre-trained large-scale language models have increasingly demonstrated high accuracy on many natural language processing (NLP) tasks. However, the limited weight storage and computational speed on hardware platforms have impeded the popularity of pre-trained models, especially in the era of edge computing. In this work, we propose an efficient transformer-based large-scale language representation using hardware-friendly block structure pruning. We incorporate the reweighted group Lasso into block-structured pruning for optimization. Besides the significantly reduced weight storage and computation, the proposed approach achieves high compression rates. Experimental results on different models (BERT, RoBERTa, and DistilBERT) on the General Language Understanding Evaluation (GLUE) benchmark tasks show that we achieve up to 5.0x with zero or minor accuracy degradation on certain task(s). Our proposed method is also orthogonal to existing compact pre-trained language models such as DistilBERT using knowledge distillation, since a further 1.79x average compression rate can be achieved on top of DistilBERT with zero or minor accuracy degradation. It is suitable to deploy the final compressed model on resource-constrained edge devices.

Motivation & Objective

  • To address the high computational and storage costs of large-scale pre-trained Transformer models on edge devices.
  • To develop a hardware-friendly pruning method that maintains model accuracy while drastically reducing model size and inference cost.
  • To enable high compression rates in NLP models, which are more sensitive to sparsity than computer vision models due to non-uniform syntax and semantics.
  • To ensure compatibility with existing model compression techniques like knowledge distillation, allowing sequential application for further size reduction.

Proposed method

  • Applying block-structured pruning to weight matrices, where entire blocks of weights are pruned together to maintain hardware efficiency.
  • Introducing reweighted group Lasso regularization to dynamically adjust penalty terms per block, enabling flexible and effective sparsity induction.
  • Using a mixed loss function that combines standard training loss with block-wise L2 norm penalties to guide pruning during retraining.
  • Optimizing the pruning process through iterative reweighting of group penalties, allowing higher compression while minimizing accuracy drop.
  • Applying the method to BERT, RoBERTa, and DistilBERT, with ablation studies on block count, retraining epochs, and penalty factors.
  • Validating the approach on the GLUE benchmark to measure accuracy and compression efficiency across multiple NLP tasks.

Experimental results

Research questions

  • RQ1Can block-structured pruning with reweighted group Lasso achieve high compression rates in large-scale Transformer models without significant accuracy degradation?
  • RQ2How does the number of blocks in the pruning structure affect model performance and sparsity flexibility?
  • RQ3What is the optimal penalty factor and retraining epoch count for balancing compression and accuracy?
  • RQ4Is the proposed pruning method compatible with knowledge distillation, allowing further model compression?
  • RQ5Can the method be effectively applied across diverse pre-trained models like BERT, RoBERTa, and DistilBERT?

Key findings

  • The proposed method achieves up to 5.0× model compression on BERT and RoBERTa with zero or minor accuracy degradation across GLUE tasks.
  • On DistilBERT, the method achieves an average 1.79× compression rate with minimal accuracy loss, demonstrating orthogonality to knowledge distillation.
  • Increasing the number of blocks (reducing block size) improves performance, with 768 blocks yielding the highest MCC score of 53.4 on CoLA for DistilBERT.
  • Retraining for 16 epochs improves accuracy over 4 or 8 epochs, with STS-B Spearman correlation rising from 84.2 to 84.6 for BERT BASE.
  • A penalty factor of 3e-4 yields optimal accuracy, with 82.9% accuracy on MNLI for BERT BASE, while higher values (1e-3) cause significant degradation.
  • Results are stable across different random seeds, with minimal variance in performance on SST-2, CoLA, STS-B, and MRPC across five seed runs.

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.