AdapLeR: Speeding up Inference by Adaptive Length Reduction
Not on the map. Why?
Abstract (arXiv)
Pre-trained language models have shown stellar performance in various downstream tasks. But, this usually comes at the cost of high latency and computation, hindering their usage in resource-limited settings. In this work, we propose a novel approach for reducing the computational cost of BERT with minimal loss in downstream performance. Our method dynamically eliminates less contributing tokens through layers, resulting in shorter lengths and consequently lower computational cost. To determine the importance of each token representation, we train a Contribution Predictor for each layer using a gradient-based saliency method. Our experiments on several diverse classification tasks show speedups up to 22x during inference time without much sacrifice in performance. We also validate the quality of the selected tokens in our method using human annotations in the ERASER benchmark. In comparison to other widely used strategies for selecting important tokens, such as saliency and attention, our proposed method has a significantly lower false positive rate in generating rationales. Our code is freely available at https://github.com/amodaresi/AdapLeR .
Key facts. Cited by 19 papers in the map (data through 7 Oct 2026). Builds on 47 of its 69 references that are in the map. First posted on arXiv 16 Mar 2022.
Builds on
47 of 69 references.
References · 47
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2015Distilling the Knowledge in a Neural Networkcited by 10,076
- 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,854
- 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,243
- 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,115
- 2017Axiomatic Attribution for Deep Networkscited by 3,350
- 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,665
- 2013Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Mapscited by 2,348
- 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
- 2015Deep Compression: Compressing Deep Neural Networks with Pruning, Trained Quantization and Huffman Codingcited by 2,291
- 2019TinyBERT: Distilling BERT for Natural Language Understandingcited by 1,153
35 more
- 2017SmoothGrad: removing noise by adding noisecited by 1,097
- 2019Attention is not Explanationcited by 916
- 2019Are Sixteen Heads Really Better than One?cited by 803
- 2019How Contextual are Contextualized Word Representations? Comparing the Geometry of BERT, ELMo, and GPT-2 Embeddingscited by 770
- 2020Quantifying Attention Flow in Transformerscited by 759
- 2017Channel Pruning for Accelerating Very Deep Neural Networkscited by 697
- 2019Green AIcited by 620
- 2019ERASER: A Benchmark to Evaluate Rationalized NLP Modelscited by 523
- 2019Patient Knowledge Distillation for BERT Model Compressioncited by 502
- 2020MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devicescited by 476
- 2020HateXplain: A Benchmark Dataset for Explainable Hate Speech Detectioncited by 403
- 2020Movement Pruning: Adaptive Sparsity by Fine-Tuningcited by 398
- 2019Is Attention Interpretable?cited by 387
- 2019Q-BERT: Hessian Based Ultra Low Precision Quantization of BERTcited by 355
- 2020DeeBERT: Dynamic Early Exiting for Accelerating BERT Inferencecited by 322
- 2020BERT Loses Patience: Fast and Robust Inference with Early Exitcited by 267
- 2020SpAtten: Efficient Sparse Attention Architecture with Cascade Token and Head Pruningcited by 228
- 2020FastBERT: a Self-distilling BERT with Adaptive Inference Timecited by 224
- 2015Visualizing and Understanding Neural Models in NLPcited by 199
- 2014Compressing Deep Convolutional Networks using Vector Quantizationcited by 189
- 2020A Diagnostic Study of Explainability Techniques for Text Classificationcited by 158
- 2020Generating Fact Checking Explanationscited by 132
- 2020The Right Tool for the Job: Matching Model and Instance Complexitiescited by 125
- 2020The elephant in the interpretability room: Why use attention as explanation when we have saliency methods?cited by 122
- 2020Learning to Faithfully Rationalize by Constructioncited by 113
- 2020BERT-of-Theseus: Compressing BERT by Progressive Module Replacingcited by 112
- 2020Length-Adaptive Transformer: Train Once with Length Drop, Use Anytime with Searchcited by 76
- 2020EdgeBERT: Sentence-Level Energy Optimizations for Latency-Aware Multi-Task NLP Inferencecited by 69
- 2021TR-BERT: Dynamic Token Reduction for Accelerating BERT Inferencecited by 40
- 2021Exploring the Role of BERT Token Representations to Explain Sentence Probing Resultscited by 29
- 2020Spying on your neighbors: Fine-grained probing of contextual embeddings for information about surrounding wordscited by 28
- 2021Early Exiting with Ensemble Internal Classifierscited by 19
- 2021Enjoy the Salience: Towards Better Transformer-based Faithful Explanations with Word Saliencecited by 16
- 2020Telling BERT's full story: from Local Attention to Global Aggregationcited by 15
- 2021DACT-BERT: Differentiable Adaptive Computation Time for an Efficient BERT Inferencecited by 9
Built on by
Citing papers per year: 2022: 3; 2023: 7; 2024: 9.
19 papers.
Sort:
By area:
- 2023LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compressioncited by 443
- 2023LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Modelscited by 279
- 2024C3oT: Generating Shorter Chain-of-Thought without Compromising Effectivenesscited by 117
- 2023Towards Efficient Generative Large Language Model Serving: A Survey from Algorithms to Systemscited by 101
- 2022Model Cascading: Towards Jointly Improving Efficiency and Accuracy of NLP Systemscited by 43
- 2024The What, Why, and How of Context Length Extension Techniques in Large Language Models -- A Detailed Surveycited by 32
- 2023AD-KD: Attribution-Driven Knowledge Distillation for Language Model Compressioncited by 26
- 2022Efficiently Controlling Multiple Risks with Pareto Testingcited by 21
- 2023Efficient Prompting via Dynamic In-Context Learningcited by 18
- 2024Rethinking Token Reduction for State Space Modelscited by 14
- 2022Can Open-Domain QA Reader Utilize External Knowledge Efficiently like Humans?cited by 10
- 2023Rethinking Multimodal Content Moderation from an Asymmetric Angle with Mixed-modalitycited by 9
7 more
- 2024Selection-p: Self-Supervised Task-Agnostic Prompt Compression for Faithfulness and Transferabilitycited by 9
- 2024Language Model Guided Interpretable Video Action Reasoningcited by 8
- 2023SmartTrim: Adaptive Tokens and Attention Pruning for Efficient Vision-Language Modelscited by 7
- 2024LibraGrad: Balancing Gradient Flow for Universally Better Vision Transformer Attributionscited by 5
- 2024Deploying Foundation Model Powered Agent Services: A Surveycited by 4
- 2024Elastic On-Device LLM Servicecited by 3
- 2024Finch: Prompt-guided Key-Value Cache Compressioncited by 2
- 2024Deploying Foundation Model Powered Agent Services: A Survey18 Dec 2024
- 2024C3oT: Generating Shorter Chain-of-Thought without Compromising Effectiveness16 Dec 2024
- 2024LibraGrad: Balancing Gradient Flow for Universally Better Vision Transformer Attributions24 Nov 2024
- 2024Rethinking Token Reduction for State Space Models16 Oct 2024
- 2024Selection-p: Self-Supervised Task-Agnostic Prompt Compression for Faithfulness and Transferability15 Oct 2024
- 2024Elastic On-Device LLM Service8 Sep 2024
- 2024Finch: Prompt-guided Key-Value Cache Compression31 Jul 2024
- 2024Language Model Guided Interpretable Video Action Reasoning2 Apr 2024
- 2024The What, Why, and How of Context Length Extension Techniques in Large Language Models -- A Detailed Survey15 Jan 2024
- 2023Towards Efficient Generative Large Language Model Serving: A Survey from Algorithms to Systems23 Dec 2023
- 2023LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compression10 Oct 2023
- 2023LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Models9 Oct 2023
7 more
- 2023SmartTrim: Adaptive Tokens and Attention Pruning for Efficient Vision-Language Models24 May 2023
- 2023Efficient Prompting via Dynamic In-Context Learning18 May 2023
- 2023Rethinking Multimodal Content Moderation from an Asymmetric Angle with Mixed-modality17 May 2023
- 2023AD-KD: Attribution-Driven Knowledge Distillation for Language Model Compression17 May 2023
- 2022Can Open-Domain QA Reader Utilize External Knowledge Efficiently like Humans?23 Nov 2022
- 2022Efficiently Controlling Multiple Risks with Pareto Testing14 Oct 2022
- 2022Model Cascading: Towards Jointly Improving Efficiency and Accuracy of NLP Systems11 Oct 2022
- 2023LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compressioncited by 443
- 2023Towards Efficient Generative Large Language Model Serving: A Survey from Algorithms to Systemscited by 101
- 2024Selection-p: Self-Supervised Task-Agnostic Prompt Compression for Faithfulness and Transferabilitycited by 9
- 2024Selection-p: Self-Supervised Task-Agnostic Prompt Compression for Faithfulness and Transferability15 Oct 2024
- 2023Towards Efficient Generative Large Language Model Serving: A Survey from Algorithms to Systems23 Dec 2023
- 2023LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compression10 Oct 2023
- 2024Deploying Foundation Model Powered Agent Services: A Survey18 Dec 2024
- 2024Finch: Prompt-guided Key-Value Cache Compressioncited by 2
- 2024Finch: Prompt-guided Key-Value Cache Compression31 Jul 2024
- 2023LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Modelscited by 279
- 2022Model Cascading: Towards Jointly Improving Efficiency and Accuracy of NLP Systemscited by 43
- 2024The What, Why, and How of Context Length Extension Techniques in Large Language Models -- A Detailed Surveycited by 32
- 2023AD-KD: Attribution-Driven Knowledge Distillation for Language Model Compressioncited by 26
- 2022Efficiently Controlling Multiple Risks with Pareto Testingcited by 21
- 2023Efficient Prompting via Dynamic In-Context Learningcited by 18
- 2022Can Open-Domain QA Reader Utilize External Knowledge Efficiently like Humans?cited by 10
- 2023Rethinking Multimodal Content Moderation from an Asymmetric Angle with Mixed-modalitycited by 9
- 2024LibraGrad: Balancing Gradient Flow for Universally Better Vision Transformer Attributionscited by 5
- 2024Elastic On-Device LLM Servicecited by 3
- 2024LibraGrad: Balancing Gradient Flow for Universally Better Vision Transformer Attributions24 Nov 2024
- 2024Elastic On-Device LLM Service8 Sep 2024
- 2024The What, Why, and How of Context Length Extension Techniques in Large Language Models -- A Detailed Survey15 Jan 2024
- 2023LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Models9 Oct 2023
- 2023Efficient Prompting via Dynamic In-Context Learning18 May 2023
- 2023Rethinking Multimodal Content Moderation from an Asymmetric Angle with Mixed-modality17 May 2023
- 2023AD-KD: Attribution-Driven Knowledge Distillation for Language Model Compression17 May 2023
- 2022Can Open-Domain QA Reader Utilize External Knowledge Efficiently like Humans?23 Nov 2022
- 2022Efficiently Controlling Multiple Risks with Pareto Testing14 Oct 2022
- 2022Model Cascading: Towards Jointly Improving Efficiency and Accuracy of NLP Systems11 Oct 2022