paper-with-me

홈 › Papers

Block-Skim: Efficient Question Answering for Transformer

2021-12-16 · Yue Guan, Zhengyi Li, Jingwen Leng, Zhouhan Lin, Minyi Guo, Yuhao Zhu

Transformer models have achieved promising results on natural language processing (NLP) tasks including extractive question answering (QA). Common Transformer encoders used in NLP tasks process the hidden states of all input tokens in the context paragraph throughout all layers. However, different from other tasks such as sequence classification, answering the raised question does not necessarily need all the tokens in the context paragraph. Following this motivation, we propose Block-skim, which learns to skim unnecessary context in higher hidden layers to improve and accelerate the Transformer performance. The key idea of Block-Skim is to identify the context that must be further processed and those that could be safely discarded early on during inference. Critically, we find that such information could be sufficiently derived from the self-attention weights inside the Transformer model. We further prune the hidden states corresponding to the unnecessary positions early in lower layers, achieving significant inference-time speedup. To our surprise, we observe that models pruned in this way outperform their full-size counterparts. Block-Skim improves QA models' accuracy on different datasets and achieves 3 times speedup on BERT-base model.

📄 PDF Abstract BibTeX arXiv:2112.08560

Code (1)

chandlerguan/blockskim 공식 구현 pytorch

Tasks

Extractive Question-AnsweringQuestion Answering

Methods 이 논문이 사용한 방법론

Multi-Head Attention 설명 없음
Attention 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Label Smoothing Label Smoothing is a regularization technique that introduces noise for the labels. This accounts for the fact that datasets may have mistakes in them, so maximizing the…
Absolute Position Encodings Absolute Position Encodings are a type of position embeddings for [Transformer-based models] where positional encodings are…
Residual Connection 설명 없음
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Adam 설명 없음

Similar Papers 제목 키워드 기반

Block Skim Transformer for Efficient Question Answering

2021-01-01 · Yue Guan, Jingwen Leng, Yuhao Zhu, Minyi Guo

Transformer based encoder models have achieved promising results on natural language processing (NLP) task including question answering (QA). Different from sequence classification or language modeling tasks, hidden s…

Language ModelingLanguage ModellingModel CompressionQuestion Answering

Transkimmer: Transformer Learns to Layer-wise Skim

2022-05-15 · ACL 2022 5 · Yue Guan, Zhengyi Li, Jingwen Leng, Zhouhan Lin 외

Transformer architecture has become the de-facto model for many machine learning tasks from natural language processing and computer vision. As such, improving its computational efficiency becomes paramount. One of the m…

Computational Efficiency

Read As Human: Compressing Context via Parallelizable Close Reading and Skimming

2026-02-02 · Jiwei Tang, Shilei Liu, Zhicheng Zhang, Qingsong Lv 외 arxiv

Large Language Models (LLMs) demonstrate exceptional capability across diverse tasks. However, their deployment in long-context scenarios is hindered by two challenges: computational inefficiency and redundant informatio…

Contrastive LearningQuestion Answering

Skim-Attention: Learning to Focus via Document Layout

2021-09-02 · Findings (EMNLP) 2021 11 · Laura Nguyen, Thomas Scialom, Jacopo Staiano, Benjamin Piwowarski

Transformer-based pre-training techniques of text and layout have proven effective in a number of document understanding tasks. Despite this success, multimodal pre-training models suffer from very high computational and…

document understandingLanguage ModelingLanguage Modelling

QuALITY: Question Answering with Long Input Texts, Yes!

2021-12-16 · NAACL 2022 7 · Richard Yuanzhe Pang, Alicia Parrish, Nitish Joshi, Nikita Nangia 외

To enable building and testing models on long-document comprehension, we introduce QuALITY, a multiple-choice QA dataset with context passages in English that have an average length of about 5,000 tokens, much longer tha…

Multiple-choiceMultiple Choice Question Answering (MCQA)Question Answering