DPBERT: Efficient Inference for BERT based on Dynamic Planning
Weixin Wu, Hankz Hankui Zhuo

TL;DR
DPBERT introduces a dynamic planning strategy that selectively skips transformer layers during inference, significantly reducing latency while preserving high accuracy, thus enabling more efficient BERT deployment on resource-constrained devices.
Contribution
It presents a novel fine-tuning approach with a planning module that adaptively skips layers, improving inference efficiency without sacrificing accuracy.
Findings
Reduces BERT inference latency to 75% of original
Maintains 98% of original BERT accuracy
Outperforms existing input-adaptive methods in speed-accuracy trade-off
Abstract
Large-scale pre-trained language models such as BERT have contributed significantly to the development of NLP. However, those models require large computational resources, making it difficult to be applied to mobile devices where computing power is limited. In this paper we aim to address the weakness of existing input-adaptive inference methods which fail to take full advantage of the structure of BERT. We propose Dynamic Planning in BERT, a novel fine-tuning strategy that can accelerate the inference process of BERT through selecting a subsequence of transformer layers list of backbone as a computational path for an input sample. To do this, our approach adds a planning module to the original BERT model to determine whether a layer is included or bypassed during inference. Experimental results on the GLUE benchmark exhibit that our method reduces latency to 75\% while maintaining 98\%…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTopic Modeling · Natural Language Processing Techniques · Machine Learning and Data Classification
MethodsRefunds@Expedia|||How do I get a full refund from Expedia? · Multi-Head Attention · Attention Is All You Need · fail · Linear Layer · Dropout · WordPiece · Attention Dropout · Linear Warmup With Linear Decay · Residual Connection
