Well-Read Students Learn Better: On the Importance of Pre-training Compact Models

Iulia Turc, Ming-Wei Chang, Kenton Lee, Kristina Toutanova
8/23/2019
cs.CL

Official code: google-research/bert (40,036 stars, Apache-2.0, TensorFlow, last commit 2024-07-23).

Abstract

Recent developments in natural language representations have been accompanied by large and expensive models that leverage vast amounts of general-domain text through self-supervised pre-training. Due to the cost of applying such models to down-stream tasks, several model compression techniques on pre-trained language representations have been proposed (Sun et al., 2019; Sanh, 2019). However, surprisingly, the simple baseline of just pre-training and fine-tuning compact models has been overlooked. In this paper, we first show that pre-training remains important in the context of smaller architectures, and fine-tuning pre-trained compact models can be competitive to more elaborate methods proposed in concurrent work. Starting with pre-trained compact models, we then explore transferring task knowledge from large fine-tuned models through standard knowledge distillation. The resulting simple, yet effective and general algorithm, Pre-trained Distillation, brings further improvements. Through extensive experiments, we more generally explore the interaction between pre-training and distillation under two variables that have been under-studied: model size and properties of unlabeled task data. One surprising observation is that they have a compound effect even when sequentially applied on the same data. To accelerate future research, we will make our 24 pre-trained miniature BERT models publicly available.

View on arXivView PDF

Code Implementations(1)

TensorFlowApache-2.0

TensorFlow code and pre-trained models for BERT

40,0369,656Python, Jupyter NotebookOct 25, 20182 years agoApache-2.0
googlenatural-language-processingnatural-language-understandingnlptensorflow

Cite this paper

@article{turc2019wellread,
  title  = {Well-Read Students Learn Better: On the Importance of Pre-training Compact Models},
  author = {Iulia Turc and Ming-Wei Chang and Kenton Lee and Kristina Toutanova},
  year   = {2019},
  eprint = {1908.08962},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1908.08962}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1908.08962.svg)](https://codeofpaper.com/paper/1908.08962)

Discussion