We gratefully acknowledge support from
the Simons Foundation and member institutions.
Full-text links:

Download:

Current browse context:

cs.CL

Change to browse by:

cs

References & Citations

DBLP - CS Bibliography

Bookmark

(what is this?)
CiteULike logo BibSonomy logo Mendeley logo del.icio.us logo Digg logo Reddit logo

Computer Science > Computation and Language

Title: Latency Adjustable Transformer Encoder for Language Understanding

Abstract: Adjusting the latency, power, and accuracy of natural language understanding models is a desirable objective of an efficient architecture. This paper proposes an efficient Transformer architecture that adjusts the inference computational cost adaptively with a desired inference latency speedup. In fine-tuning phase, the proposed method detects less important hidden sequence elements (word-vectors) and eliminates them in each encoder layer using a proposed Attention Context Contribution (ACC) metric. After the fine-tuning phase, with the novel offline-tuning property, the inference latency of the model can be adjusted in a wide range of inference speedup selections without any further training. The proposed method is applied to the BERT-base and GPT-2 models for evaluation. Extensive experiments show that most of the word-vectors in higher Transformer layers have less contribution to the subsequent layers; hence, they can be eliminated to improve the inference latency. Experimental results on extensive sentiment analysis, classification, text generation tasks and regression benchmarks like GLUE showed that the method is effective in various datasets with minimal impact on global context. The proposed method mathematically and experimentally improves the inference latency of BERT-base and GPT-2 by up to 4.8 and 3.72 times with less than 0.75% accuracy drop and passable perplexity on average. The suggested approach posits that in Large Language Models (LLMs), although the complete network is necessary for training, it can be truncated during the fine-tuning phase.
Subjects: Computation and Language (cs.CL)
Cite as: arXiv:2201.03327 [cs.CL]
  (or arXiv:2201.03327v7 [cs.CL] for this version)

Submission history

From: Sajjad Kachuee [view email]
[v1] Mon, 10 Jan 2022 13:04:39 GMT (413kb,D)
[v2] Fri, 14 Jan 2022 14:45:24 GMT (487kb,D)
[v3] Fri, 11 Feb 2022 07:53:45 GMT (581kb,D)
[v4] Thu, 17 Mar 2022 14:04:59 GMT (578kb,D)
[v5] Tue, 21 Jun 2022 17:27:55 GMT (546kb,D)
[v6] Wed, 7 Sep 2022 13:53:53 GMT (786kb,D)
[v7] Wed, 20 Dec 2023 17:41:51 GMT (2185kb,D)

Link back to: arXiv, form interface, contact.