The Right Tool for the Job: Matching Model and Instance Complexities
Roy Schwartz, Gabriel Stanovsky, Swabha Swayamdipta, Jesse Dodge, Noah A. Smith
摘要
As NLP models become larger, executing a trained model requires significant computational resources incurring monetary and environmental costs. To better respect a given inference budget, we propose a modification to contextual representation fine-tuning which, during inference, allows for an early (and fast) "exit" from neural network calculations for simple instances, and late (and accurate) exit for hard instances. To achieve this, we add classifiers to different layers of BERT and use their calibrated confidence scores to make early exit decisions. We test our proposed modification on five different datasets in two tasks: three text classification datasets and two natural language inference benchmarks. Our method presents a favorable speed/accuracy tradeoff in almost all cases, producing models which are up to five times faster than the state of the art, while preserving their accuracy. Our method also requires almost no additional training resources (in either time or parameters) compared to the baseline BERT model. Finally, our method alleviates the need for costly retraining of multiple models at different levels of efficiency; we allow users to control the inference speed/accuracy tradeoff using a single trained model, by setting a single variable at inference time. We publicly release our code. 1 * Research completed during an internship at AI2.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 53 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- TinyBERT: Distilling BERT for Natural Language Understanding 引用了 Depth-Adaptive Transformer
- TinyBERT: Distilling BERT for Natural Language Understanding 引用了 Q-BERT: Hessian Based Ultra Low Precision Quantization of BERT
- TinyBERT: Distilling BERT for Natural Language Understanding 引用了 Reducing Transformer Depth on Demand with Structured Dropout
- BERT Loses Patience: Fast and Robust Inference with Early Exit 引用了 Reducing Transformer Depth on Demand with Structured Dropout
- Think before you speak: Training Language Models With Pause Tokens 引用了 Confident Adaptive Language Modeling
- A-ViT: Adaptive Tokens for Efficient Vision Transformer 引用了 TinyBERT: Distilling BERT for Natural Language Understanding
- A-ViT: Adaptive Tokens for Efficient Vision Transformer 引用了 BERT Loses Patience: Fast and Robust Inference with Early Exit
- A-ViT: Adaptive Tokens for Efficient Vision Transformer 引用了 Depth-Adaptive Transformer
- Confident Adaptive Language Modeling 引用了 BERT Loses Patience: Fast and Robust Inference with Early Exit
- Confident Adaptive Language Modeling 引用了 Depth-Adaptive Transformer
- Confident Adaptive Language Modeling 引用了 Q-BERT: Hessian Based Ultra Low Precision Quantization of BERT
- Confident Adaptive Language Modeling 引用了 Reducing Transformer Depth on Demand with Structured Dropout
- Fast Inference from Transformers via Speculative Decoding 引用了 Depth-Adaptive Transformer
引用它的顶会 Paper53
- Fast Inference from Transformers via Speculative DecodingYaniv Leviathan, Matan Kalman, Yossi MatiasICML 2023 · 1,472 次引用
- BERT Loses Patience: Fast and Robust Inference with Early ExitWangchunshu Zhou, Canwen Xu, Tao Ge, Julian J. McAuley 等NeurIPS 2020 · 473 次引用
- Confident Adaptive Language ModelingTal Schuster, Adam Fisch, Jai Gupta, Mostafa Dehghani 等NeurIPS 2022 · 394 次引用
- A-ViT: Adaptive Tokens for Efficient Vision TransformerHongxu Yin, Arash Vahdat, José M. Álvarez, Arun Mallya 等CVPR 2022 · 288 次引用
- Think before you speak: Training Language Models With Pause TokensSachin Goyal, Ziwei Ji, Ankit Singh Rawat, Aditya Krishna Menon 等ICLR 2024 · 240 次引用
它引用的 Paper6
- WinoGrande: An Adversarial Winograd Schema Challenge at ScaleKeisuke Sakaguchi, Ronan Le Bras, Chandra Bhagavatula, Yejin ChoiAAAI 2020 · 3,037 次引用
- TinyBERT: Distilling BERT for Natural Language UnderstandingXiaoqi Jiao, Yichun Yin, Lifeng Shang, Xin Jiang 等EMNLP Findings 2020 · 1,787 次引用
- Reducing Transformer Depth on Demand with Structured DropoutAngela Fan, Edouard Grave, Armand JoulinICLR 2020 · 695 次引用
- Q-BERT: Hessian Based Ultra Low Precision Quantization of BERTSheng Shen, Zhen Dong, Jiayu Ye, Linjian Ma 等AAAI 2020 · 656 次引用
- Depth-Adaptive TransformerMaha Elbayad, Jiatao Gu, Edouard Grave, Michael AuliICLR 2020 · 264 次引用
相关 Paper
- Finding the SWEET Spot: Analysis and Improvement of Adaptive Inference in Low Resource SettingsDaniel Rotem, Michael Hassid, Jonathan Mamou, Roy SchwartzACL 2023 · 1 次引用
- SkipBERT: Efficient Inference with Shallow Layer SkippingJue Wang, Ke Chen, Gang Chen, Lidan Shou 等ACL 2022
- CascadeBERT: Accelerating Inference of Pre-trained Language Models via Calibrated Complete Models CascadeLei Li, Yankai Lin, Deli Chen, Shuhuai Ren 等EMNLP Findings 2021 · 33 次引用
- LeeBERT: Learned Early Exit for BERT with cross-level optimizationWei ZhuACL 2021
- CeeBERT: Cross-Domain Inference in Early Exit BERTDivya Jyoti Bajpai, Manjesh K. HanawalACL Findings 2024 · 11 次引用
