Making transformers fit on your phone: Binary weights meet intelligent early stopping.
BEExformer introduces a transformer architecture that combines binarization with early exit mechanisms, reducing model size by 18.44x while maintaining comparable performance to full-precision models. It enables efficient deployment on resource-constrained devices through innovative weight quantization and dynamic computation paths.
-----
https://arxiv.org/abs/2412.05225
π― Original Problem:
LLMs face deployment challenges on resource-constrained devices due to their enormous size and processing requirements. Current solutions like binarization and early exit mechanisms have limitations in gradient computation and threshold-based exits.
-----
π§ Solution in this Paper:
β BEExformer implements a differentiable second-order approximation to the impulse function for binarization, enabling gradient computation for both sign and magnitude of weights.
β The architecture uses entropy-based early exit criterion that monitors fractional reduction between transformer blocks.
β A binarized Selective Learn-Forget Network replaces traditional feed-forward layers to enhance context understanding.
β The model trains from scratch without knowledge distillation from full-precision LLMs.
-----
π‘ Key Insights:
β Binarization with magnitude-aware gradients maintains model accuracy while reducing size
β Entropy-based exits eliminate need for absolute thresholds and solve overthinking
β Selective learning improves long-range dependency capture
-----
π Results:
β 18.44x reduction in model size through binarization
β 54.85% reduction in FLOPs during inference
β 5.98% accuracy improvement by resolving overthinking
β Comparable performance to full-precision models while being 46x smaller










