BERT-of-Theseus: Compressing BERT by Progressive Module Replacing
Canwen Xu, Wangchunshu Zhou, Tao Ge, Furu Wei, Ming Zhou

TL;DR
This paper introduces a novel BERT compression method called progressive module replacing, which replaces original modules with compact substitutes during training, outperforming previous distillation techniques without extra loss functions.
Contribution
It proposes a new progressive module replacing approach for BERT compression that enhances interaction between original and compact models without additional loss functions.
Findings
Outperforms existing knowledge distillation methods on GLUE benchmark
Does not require additional loss functions for training
Enables deeper interaction between original and compressed modules
Abstract
In this paper, we propose a novel model compression approach to effectively compress BERT by progressive module replacing. Our approach first divides the original BERT into several modules and builds their compact substitutes. Then, we randomly replace the original modules with their substitutes to train the compact modules to mimic the behavior of the original modules. We progressively increase the probability of replacement through the training. In this way, our approach brings a deeper level of interaction between the original and compact models. Compared to the previous knowledge distillation approaches for BERT compression, our approach does not introduce any additional loss function. Our approach outperforms existing knowledge distillation approaches on GLUE benchmark, showing a new perspective of model compression.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
- 🤗canwenxu/BERT-of-Theseus-MNLImodel· 5 dl· ♡ 15 dl♡ 1
- 🤗rmihaylov/gpt2-small-theseus-bgmodel· 6 dl6 dl
- 🤗rmihaylov/bert-base-pos-theseus-bgmodel· 1 dl· ♡ 11 dl♡ 1
- 🤗rmihaylov/bert-base-ner-theseus-bgmodel· 8 dl· ♡ 18 dl♡ 1
- 🤗rmihaylov/bert-base-squad-theseus-bgmodel· 2 dl· ♡ 12 dl♡ 1
- 🤗rmihaylov/bert-base-theseus-bgmodel· 14 dl14 dl
- 🤗rmihaylov/bert-base-nli-theseus-bgmodel· 244 dl· ♡ 1244 dl♡ 1
- 🤗rmihaylov/roberta-base-nli-stsb-theseus-bgmodel· 15 dl· ♡ 215 dl♡ 2
- 🤗rmihaylov/roberta-base-use-qa-theseus-bgmodel· 8 dl· ♡ 18 dl♡ 1
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTopic Modeling · Multimodal Machine Learning Applications · Natural Language Processing Techniques
MethodsLinear Layer · Knowledge Distillation · Residual Connection · Attention Dropout · Linear Warmup With Linear Decay · Weight Decay · Refunds@Expedia|||How do I get a full refund from Expedia? · Dense Connections · Adam · WordPiece
