TextBrewer is a PyTorch-based model distillation toolkit for natural language processing.

It includes various distillation techniques from both NLP and CV field and provides an easy-to-use distillation framework, which allows users to quickly experiment with the state-of-the-art distillation methods to compress the model with a relatively small sacrifice in the performance, increasing the inference speed and reducing the memory usage.

Main features

  • Wide-support : it supports various model architectures (especially transformer-based models).

  • Flexibility : design your own distillation scheme by combining different techniques.

  • Easy-to-use : users don’t need to modify the model architectures.

  • Built for NLP : it is suitable for a wide variety of NLP tasks: text classification, machine reading comprehension, sequence labeling, …

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

Indices and tables