Meta-KD: A Meta Knowledge Distillation Framework for Language Model Compression across Domains

Haojie Pan, Chengyu Wang, Minghui Qiu, Yichang Zhang, Yaliang Li +1 more
12/2/2020
cs.CL
distillationquantization-pruning

Official code: alibaba/EasyNLP (2,189 stars, Python, Apache-2.0, PyTorch, last commit 2024-11-27).

Abstract

Pre-trained language models have been applied to various NLP tasks with considerable performance gains. However, the large model sizes, together with the long inference time, limit the deployment of such models in real-time applications.

Show full abstract

One line of model compression approaches considers knowledge distillation to distill large teacher models into small student models. Most of these studies focus on single-domain only, which ignores the transferable knowledge from other domains. We notice that training a teacher with transferable knowledge digested across domains can achieve better generalization capability to help knowledge distillation. Hence we propose a Meta-Knowledge Distillation (Meta-KD) framework to build a meta-teacher model that captures transferable knowledge across domains and passes such knowledge to students. Specifically, we explicitly force the meta-teacher to capture transferable knowledge at both instance-level and feature-level from multiple domains, and then propose a meta-distillation algorithm to learn single-domain student models with guidance from the meta-teacher. Experiments on public multi-domain NLP tasks show the effectiveness and superiority of the proposed Meta-KD framework. Further, we also demonstrate the capability of Meta-KD in the settings where the training data is scarce.

View on arXivView PDF

Code Implementations(1)

alibaba/EasyNLPOfficial100%
PyTorchApache-2.0

EasyNLP: A Comprehensive and Easy-to-use NLP Toolkit

2,189256Python, Jupyter NotebookApr 6, 20222 years agoApache-2.0
bertdeep-learningfewshot-learningknowledge-distillationknowledge-pretraining+9 more

Similar Papers

Cite this paper

@article{pan2020metakd,
  title  = {Meta-KD: A Meta Knowledge Distillation Framework for Language Model Compression across Domains},
  author = {Haojie Pan and Chengyu Wang and Minghui Qiu and Yichang Zhang and Yaliang Li and Jun Huang},
  year   = {2020},
  eprint = {2012.01266},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2012.01266}
}

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/2012.01266.svg)](https://codeofpaper.com/paper/2012.01266)

Discussion