arrow
返回

Accelerating BERT inference with GPU-efficient exit prediction

delete2024-01-22
delete4
PRE
AI
L
Lei Li
C
Chengyu Wang
M
Minghui Qiu
C
Cen Chen *
M
Ming Gao
周
周傲英 (Aoying Zhou)
DOI:10.1007/s11704-022-2341-9delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
BERT is a representative pre-trained language model that has drawn extensive attention for significant improvements in downstream Natural Language Processing (NLP) tasks. The complex architecture and massive parameters bring BERT competitive performance but also result in slow speed at model inference time. To speed up BERT inference, FastBERT realizes adaptive inference with an acceptable drop in accuracy based on knowledge distillation and the early-exit technique. However, many factors may limit the performance of FastBERT, such as the teacher classifier that is not knowledgeable enough, the batch size shrinkage and the redundant computation of student classifiers. To overcome these limitations, we propose a new BERT inference method with GPU-Efficient Exit Prediction (GEEP). GEEP leverages the shared exit loss to simplify the training process of FastBERT from two steps into only one step and makes the teacher classifier more knowledgeable by feeding diverse Transformer outputs to the teacher classifier. In addition, the exit layer prediction technique is proposed to utilize a GPU hash table to handle the token-level exit layer distribution and to sort test samples by predicted exit layers. In this way, GEEP can avoid batch size shrinkage and redundant computation of student classifiers. Experimental results on twelve public English and Chinese NLP datasets prove the effectiveness of the proposed approach. The source codes of GEEP will be released to the public upon paper acceptance.
Keyword:
BERT
FastBERT
inference acceleration
model distillation
early exit
text classification

期刊

Frontiers of Computer Science 封面图
Frontiers of Computer Science
IF:
4.6
论文数:
1.6K
被引数:
2.8K

机构

A
alibaba group
学者数:
1.1K
论文数: 789
被引数: 0
E
east china normal university
学者数:
3.1W
论文数: 2.1W
被引数: 25
引用论文

引用论文

Knowledge Distillation: A Survey知识蒸馏: 一项调查
err2021-03-22
err1.5K
PREAI
errGou, Jianping; Yu, Baosheng; Maybank, Stephen J.; Tao, Dacheng
err分享
err收藏
err分享
err收藏
err
IF0
err
err0
PREAI
err
err分享
err收藏
Liver Abscess Due to Pyridoxal-Dependent Streptococcus mitis
err1995-07-01
err0
PREAI
errK. W. Shea; P. E. Schoch; N. C. Klein; B. A. Cunha
err分享
err收藏
err分享
err收藏
Defining a meaningful reduction of donor sites—Not as easy as it seems
err2021-06-01
err0
PREAI
errChristian Smolle; Sebastian P. Nischwitz; Lars-Peter Kamolz
err分享
err收藏
学者 查看更多内容