ERNIE 3.0 Tiny: Frustratingly Simple Method to Improve Task-Agnostic Distillation Generalization

Weixin Liu, Xuyi Chen, Jiaxiang Liu, Shikun Feng, Yu Sun +2 more
1/9/2023
cs.CL

No official code found. Best implementation: PaddlePaddle/PaddleNLP (12,965 stars, Apache-2.0, last commit 2025-12-17).

Abstract

Task-agnostic knowledge distillation attempts to address the problem of deploying large pretrained language model in resource-constrained scenarios by compressing a large pretrained model called teacher into a smaller one called student such that the student can be directly finetuned on downstream tasks and retains comparable performance. However, we empirically find that there is a generalization gap between the student and the teacher in existing methods. In this work, we show that we can leverage multi-task learning in task-agnostic distillation to advance the generalization of the resulted student. In particular, we propose Multi-task Infused Task-agnostic Knowledge Distillation (MITKD). We first enhance the teacher by multi-task training it on multiple downstream tasks and then perform distillation to produce the student. Experimental results demonstrate that our method yields a student with much better generalization, significantly outperforms existing baselines, and establishes a new state-of-the-art result on in-domain, out-domain, and low-resource datasets in the setting of task-agnostic distillation. Moreover, our method even exceeds an 8x larger BERT$_{\text{Base}}$ on SQuAD and four GLUE tasks. In addition, by combining ERNIE 3.0, our method achieves state-of-the-art results on 10 Chinese datasets.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Easy-to-use and powerful LLM and SLM library with awesome model zoo.

12,9653,035C, C++Feb 5, 202110 months agoApache-2.0
bertcompressiondistributed-trainingdocument-intelligenceembedding+14 more

Similar Papers

Cite this paper

@article{liu2023ernie,
  title  = {ERNIE 3.0 Tiny: Frustratingly Simple Method to Improve Task-Agnostic Distillation Generalization},
  author = {Weixin Liu and Xuyi Chen and Jiaxiang Liu and Shikun Feng and Yu Sun and Hao Tian and Hua Wu},
  year   = {2023},
  eprint = {2301.03416},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2301.03416v1}
}

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

Discussion