Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

BEExformer: A Fast Inferencing Binarized Transformer with Early Exits

About

Large Language Models (LLMs) based on transformers achieve cutting-edge results on a variety of applications. However, their enormous size and processing requirements hinder deployment on constrained resources. To enhance efficiency, binarization and Early Exit (EE) have proved to be effective solutions. However, binarization may lead to performance loss as reduced precision affects gradient estimation and parameter updates. Besides, research on EE mechanisms is still in its early stages. To address these challenges, we introduce Binarized Early Exit Transformer (BEExformer), a first-of-its-kind selective learning-based transformer integrating Binarization-Aware Training (BAT) with EE for efficient and fast textual inference. Each transformer block has an integrated Selective-Learn Forget Network (SLFN) to enhance contextual retention while eliminating irrelevant information. The BAT employs a differentiable second-order approximation to the sign function, enabling gradient computation that captures both the sign and magnitude of the weights. This aids in 21.30 times reduction in model size. The EE mechanism hinges on fractional reduction in entropy among intermediate transformer blocks with soft-routing loss estimation. This accelerates inference by reducing FLOPs by 52.27% and even improves accuracy by 3.22% by resolving the "overthinking" problem inherent in deep networks. Extensive evaluation through comparison with the SOTA methods and various ablations across nine datasets covering multiple NLP tasks demonstrates its Pareto-optimal performance-efficiency trade-off.

Wazib Ansar, Saptarsi Goswami, Amlan Chakrabarti• 2024

Related benchmarks

TaskDatasetResultRank
Natural Language UnderstandingGLUE
SST-292.32
551
Natural Language UnderstandingGLUE (test)
QNLI89.18
64
Natural Language UnderstandingGLUE
SST-2 Accuracy92.32
13
Showing 3 of 3 rows

Other info

Follow for update