English

Less is More: Task-aware Layer-wise Distillation for Language Model Compression

Computation and Language 2023-06-07 v3 Artificial Intelligence Machine Learning

Abstract

Layer-wise distillation is a powerful tool to compress large models (i.e. teacher models) into small ones (i.e., student models). The student distills knowledge from the teacher by mimicking the hidden representations of the teacher at every intermediate layer. However, layer-wise distillation is difficult. Since the student has a smaller model capacity than the teacher, it is often under-fitted. Furthermore, the hidden representations of the teacher contain redundant information that the student does not necessarily need for the target task's learning. To address these challenges, we propose a novel Task-aware layEr-wise Distillation (TED). TED designs task-aware filters to align the hidden representations of the student and the teacher at each layer. The filters select the knowledge that is useful for the target task from the hidden representations. As such, TED reduces the knowledge gap between the two models and helps the student to fit better on the target task. We evaluate TED in two scenarios: continual pre-training and fine-tuning. TED demonstrates significant and consistent improvements over existing distillation methods in both scenarios. Code is available at https://github.com/cliang1453/task-aware-distillation.

Keywords

Cite

@article{arxiv.2210.01351,
  title  = {Less is More: Task-aware Layer-wise Distillation for Language Model Compression},
  author = {Chen Liang and Simiao Zuo and Qingru Zhang and Pengcheng He and Weizhu Chen and Tuo Zhao},
  journal= {arXiv preprint arXiv:2210.01351},
  year   = {2023}
}

Comments

Proceedings of ICML 2023

R2 v1 2026-06-28T02:44:35.369Z