DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter
Victor Sanh, Lysandre Debut, Julien Chaumond, Thomas Wolf

TL;DR
DistilBERT is a smaller, faster, and cheaper version of BERT created through knowledge distillation during pre-training, achieving near-original performance with reduced size and improved efficiency for NLP tasks.
Contribution
The paper introduces a novel pre-training distillation method to produce a compact BERT model, DistilBERT, that retains most of BERT's capabilities while being significantly more efficient.
Findings
DistilBERT reduces model size by 40%.
It retains 97% of BERT's language understanding.
It is 60% faster in inference.
Abstract
As Transfer Learning from large-scale pre-trained models becomes more prevalent in Natural Language Processing (NLP), operating these large models in on-the-edge and/or under constrained computational training or inference budgets remains challenging. In this work, we propose a method to pre-train a smaller general-purpose language representation model, called DistilBERT, which can then be fine-tuned with good performances on a wide range of tasks like its larger counterparts. While most prior work investigated the use of distillation for building task-specific models, we leverage knowledge distillation during the pre-training phase and show that it is possible to reduce the size of a BERT model by 40%, while retaining 97% of its language understanding capabilities and being 60% faster. To leverage the inductive biases learned by larger models during pre-training, we introduce a triple…
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
- 🤗distilbert/distilbert-base-uncasedmodel· 6.9M dl· ♡ 8526.9M dl♡ 852
- 🤗distilbert/distilbert-base-cased-distilled-squadmodel· 222k dl· ♡ 266222k dl♡ 266
- 🤗distilbert/distilgpt2model· 2.6M dl· ♡ 6212.6M dl♡ 621
- 🤗distilbert/distilroberta-basemodel· 1.2M dl· ♡ 1751.2M dl♡ 175
- 🤗bhadresh-savani/distilbert-base-uncased-emotionmodel· 711k dl· ♡ 160711k dl♡ 160
- 🤗dslim/distilbert-NERmodel· 187k dl· ♡ 50187k dl♡ 50
- 🤗distilbert/distilbert-base-casedmodel· 171k dl· ♡ 60171k dl♡ 60
- 🤗distilbert/distilbert-base-multilingual-casedmodel· 879k dl· ♡ 236879k dl♡ 236
- 🤗distilbert/distilbert-base-uncased-distilled-squadmodel· 44k dl· ♡ 11944k dl♡ 119
- 🤗distilbert/distilbert-base-uncased-finetuned-sst-2-englishmodel· 2.9M dl· ♡ 8872.9M dl♡ 887
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
MethodsLinear Layer · Knowledge Distillation · DistilBERT · 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
