Lune

ACL2020Top-tier venue

DeFormer: Decomposing Pre-trained Transformers for Faster Question Answering

Qingqing Cao, Harsh Trivedi, Aruna Balasubramanian, Niranjan Balasubramanian

Abstract

Transformer-based QA models use input-wide self-attention -i.e. across both the question and the input passage -at all layers, causing them to be slow and memory-intensive. It turns out that we can get by without inputwide self-attention at all layers, especially in the lower layers. We introduce DeFormer, a decomposed transformer, which substitutes the full self-attention with question-wide and passage-wide self-attentions in the lower layers. This allows for question-independent processing of the input text representations, which in turn enables pre-computing passage representations reducing runtime compute drastically. Furthermore, because DeFormer is largely similar to the original model, we can initialize DeFormer with the pre-training weights of a standard transformer, and directly fine-tune on the target QA dataset. We show DeFormer versions of BERT and XLNet can be used to speed up QA by over 4.3x and with simple distillation-based losses they incur only a 1% drop in accuracy. We open source the code at https://github.com/ StonyBrookNLP/deformer .

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

12 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Distilled Dual-Encoder Model for Vision-Language Understanding cites TinyBERT: Distilling BERT for Natural Language Understanding
  • Differentially Private Model Compression cites TinyBERT: Distilling BERT for Natural Language Understanding
  • Exploring extreme parameter compression for pre-trained language models cites TinyBERT: Distilling BERT for Natural Language Understanding
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers12

  1. Which *BERT? A Survey Organizing Contextualized EncodersPatrick Xia, Shijie Wu, Benjamin Van DurmeEMNLP 2020 · 44 citations
  2. Block-Skim: Efficient Question Answering for TransformerYue Guan, Zhengyi Li, Zhouhan Lin, Yuhao Zhu et al.AAAI 2022 · 33 citations
  3. Exploring extreme parameter compression for pre-trained language modelsBenyou Wang, Yuxin Ren, Lifeng Shang, Xin Jiang et al.ICLR 2022 · 23 citations
  4. Distilled Dual-Encoder Model for Vision-Language UnderstandingZekun Wang, Wenhui Wang, Haichao Zhu, Ming Liu et al.EMNLP 2022 · 22 citations
  5. Differentially Private Model CompressionFatemehsadat Mireshghallah, Arturs Backurs, Huseyin A. Inan, Lukas Wutschitz et al.NeurIPS 2022 · 18 citations

Builds on1

  1. TinyBERT: Distilling BERT for Natural Language UnderstandingXiaoqi Jiao, Yichun Yin, Lifeng Shang, Xin Jiang et al.EMNLP Findings 2020 · 1,787 citations

Related papers

  1. Transformer-VQ: Linear-Time Transformers via Vector QuantizationLucas D. LingleICLR 2024 · 30 citations
  2. You Only Need One Model for Open-domain Question AnsweringHaejun Lee, Akhil Kedia, Jongwon Lee, Ashwin Paranjape et al.EMNLP 2022
  3. RealFormer: Transformer Likes Residual AttentionRuining He, Anirudh Ravula, Bhargav Kanagal, Joshua AinslieACL Findings 2021 · 104 citations
  4. AQ-DETR: Low-Bit Quantized Detection Transformer with Auxiliary QueriesRunqi Wang, Huixin Sun, Linlin Yang, Shaohui Lin et al.AAAI 2024 · 10 citations
  5. ReadOnce Transformers: Reusable Representations of Text for TransformersShih-Ting Lin, Ashish Sabharwal, Tushar KhotACL 2021
Dusk over the sea between two cliffs drawn in fine vertical lines