知识蒸馏,可以将一个网络的知识转移到另一个网络,两个网络可以是同构或者异构。做法是先训练一个teacher网络,然后使用这个teacher网络的输出和数据的真实标签去训练student网络。知识蒸馏,可以用来将网络从大网络转化成一个小网络,并保留接近于大网络的性能;也可以将多个网络的学到的知识转移到一个网络中,使得单个网络的性能接近emsemble的结果。
参考资料:
知识蒸馏(Knowledge Distillation)简述(一)
BERT模型蒸馏论文:
Extreme Language Model Compression withOptimal Subwords and Shared Projections
DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter
FastBERT: a Self-distilling BERT with Adaptive Inference Time
TinyBERT: Distilling BERT for Natural Language Understanding