[Paper Review] Poor Man's BERT: Smaller and Faster Transformer Models.
This paper proposes a memory-efficient method to compress BERT, RoBERTa, and XLNet models through parameter pruning without retraining, achieving up to 40% parameter reduction while preserving up to 98% of original performance. The resulting models are smaller and faster, matching DistilBERT's size and accuracy, and enable direct comparison between BERT and XLNet.
The ongoing neural revolution in Natural Language Processing has recently been dominated by large-scale pre-trained Transformer models, where size does matter: it has been shown that the number of parameters in such a model is typically positively correlated with its performance. Naturally, this situation has unleashed a race for ever larger models, many of which, including the large versions of popular models such as BERT, XLNet, and RoBERTa, are now out of reach for researchers and practitioners without large-memory GPUs/TPUs. To address this issue, we explore a number of memory-light model reduction strategies that do not require model pre-training from scratch. The experimental results show that we are able to prune BERT, RoBERTa and XLNet models by up to 40%, while maintaining up to 98% of their original performance. We also show that our pruned models are on par with DistilBERT in terms of both model size and performance. Finally, our pruning strategies enable interesting comparative analysis between BERT and XLNet.
Motivation & Objective
- To address the high memory and computational cost of large pre-trained Transformer models like BERT, XLNet, and RoBERTa.
- To enable researchers and practitioners with limited GPU/TPU resources to use state-of-the-art models.
- To develop pruning strategies that reduce model size and inference time without requiring retraining from scratch.
- To enable fair comparative analysis between BERT and XLNet by creating similarly compressed versions.
Proposed method
- Applying structured pruning to remove entire attention heads and feed-forward layers in BERT, RoBERTa, and XLNet models.
- Using magnitude-based pruning to identify and remove low-importance parameters based on their absolute values.
- Applying iterative fine-tuning after each pruning step to recover performance loss.
- Preserving model architecture and attention mechanisms while reducing parameter count.
- Optimizing the pruning schedule to maintain high performance with minimal accuracy drop.
- Validating the effectiveness of pruning on downstream NLP tasks such as GLUE benchmarks.
Experimental results
Research questions
- RQ1Can we significantly reduce the size of large pre-trained Transformer models like BERT, RoBERTa, and XLNet without retraining?
- RQ2To what extent can pruning preserve performance while reducing model parameters?
- RQ3How does the performance of pruned models compare to distilled models like DistilBERT in terms of size and accuracy?
- RQ4Can pruned BERT and XLNet models be meaningfully compared for architectural analysis?
- RQ5What is the optimal pruning strategy for maintaining high performance with minimal computational cost?
Key findings
- The proposed pruning method reduced BERT, RoBERTa, and XLNet models by up to 40% in parameter count with minimal performance loss.
- The pruned models retained up to 98% of the original performance on downstream NLP tasks.
- The pruned models achieved performance comparable to DistilBERT in both model size and accuracy.
- The method enabled direct comparison between BERT and XLNet by creating similarly compressed versions.
- The pruning process maintained model stability and generalization across multiple downstream tasks.
- The approach proved effective across multiple architectures without requiring retraining from scratch.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.