arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2110.08536cs.CLcs.LG
收藏

稀疏蒸馏:使用更大的学生模型加速文本分类

Sparse Distillation: Speeding Up Text Classification by Using Bigger Student Models

Meta AI;University of Southern California(南加州大学)

Qinyuan Ye, Madian Khabsa, Mike Lewis, Sinong Wang, Xiang Ren, Aaron Jaech

摘要:

将最先进的Transformer模型提炼为轻量级学生模型是减少推理时计算成本的有效方法。学生模型通常是具有较少参数的紧凑型Transformers,而诸如自我注意等昂贵的操作仍然存在。因此,改进的推理速度对于实时或高容量用例可能仍然不令人满意。在本文中,我们的目标是通过将教师模型提取为更大,更稀疏的学生模型来进一步推动推理速度的极限-更大的是它们可以扩展到数十亿个参数;更稀疏的是大多数模型参数都是n-gram嵌入。我们在六个单句文本分类任务上的实验表明,这些学生模型平均保留了97%的Roberta-Large教师性能,同时在GPU和CPU上实现了高达600倍的推理速度。进一步的研究表明,我们的管道也是有帮助的双对分类任务,并在领域泛化设置。

英文摘要:

Distilling state-of-the-art transformer models into lightweight student models is an effective way to reduce computation cost at inference time. The student models are typically compact transformers with fewer parameters, while expensive operations such as self-attention persist. Therefore, the improved inference speed may still be unsatisfactory for real-time or high-volume use cases. In this paper, we aim to further push the limit of inference speed by distilling teacher models into bigger, sparser student models -- bigger in that they scale up to billions of parameters; sparser in that most of the model parameters are n-gram embeddings. Our experiments on six single-sentence text classification tasks show that these student models retain 97% of the RoBERTa-Large teacher performance on average, and meanwhile achieve up to 600x speed-up on both GPUs and CPUs at inference time. Further investigation reveals that our pipeline is also helpful for sentence-pair classification tasks, and in domain generalization settings.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑