English

TextBrewer: An Open-Source Knowledge Distillation Toolkit for Natural Language Processing

Computation and Language 2020-12-14 v2 Machine Learning Neural and Evolutionary Computing

Abstract

In this paper, we introduce TextBrewer, an open-source knowledge distillation toolkit designed for natural language processing. It works with different neural network models and supports various kinds of supervised learning tasks, such as text classification, reading comprehension, sequence labeling. TextBrewer provides a simple and uniform workflow that enables quick setting up of distillation experiments with highly flexible configurations. It offers a set of predefined distillation methods and can be extended with custom code. As a case study, we use TextBrewer to distill BERT on several typical NLP tasks. With simple configurations, we achieve results that are comparable with or even higher than the public distilled BERT models with similar numbers of parameters. Our toolkit is available through: http://textbrewer.hfl-rc.com

Keywords

Cite

@article{arxiv.2002.12620,
  title  = {TextBrewer: An Open-Source Knowledge Distillation Toolkit for Natural Language Processing},
  author = {Ziqing Yang and Yiming Cui and Zhipeng Chen and Wanxiang Che and Ting Liu and Shijin Wang and Guoping Hu},
  journal= {arXiv preprint arXiv:2002.12620},
  year   = {2020}
}

Comments

To appear at ACL 2020 Demo Session

R2 v1 2026-06-23T13:57:23.164Z