BiBERT: Accurate Fully Binarized BERT
Haotong Qin, Yifu Ding, Mingyuan Zhang, Qinghua Yan, Aishan Liu, Qingqing Dang, Ziwei Liu, Xianglong Liu
摘要
The large pre-trained BERT has achieved remarkable performance on Natural Language Processing (NLP) tasks but is also computation and memory expensive. As one of the powerful compression approaches, binarization extremely reduces the computation and memory consumption by utilizing 1-bit parameters and bitwise operations. Unfortunately, the full binarization of BERT (i.e., 1-bit weight, embedding, and activation) usually suffer a significant performance drop, and there is rare study addressing this problem. In this paper, with the theoretical justification and empirical analysis, we identify that the severe performance drop can be mainly attributed to the information degradation and optimization direction mismatch respectively in the forward and backward propagation, and propose BiBERT, an accurate fully binarized BERT, to eliminate the performance bottlenecks. Specifically, BiBERT introduces an efficient Bi-Attention structure for maximizing representation information statistically and a Direction-Matching Distillation (DMD) scheme to optimize the full binarized BERT accurately. Extensive experiments show that BiBERT outperforms both the straightforward baseline and existing state-of-the-art quantized BERTs with ultra-low bit activations by convincing margins on the NLP benchmark. As the first fully binarized BERT, our method yields impressive 56.3 times and 31.2 times saving on FLOPs and model size, demonstrating the vast advantages and potential of the fully binarized BERT model in real-world resource-constrained scenarios.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 40 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- TinyBERT: Distilling BERT for Natural Language Understanding 引用了 Q-BERT: Hessian Based Ultra Low Precision Quantization of BERT
- BiViT: Extremely Compressed Binary Vision Transformers 引用了 Q-ViT: Accurate and Fully Quantized Low-bit Vision Transformer
- Q-ViT: Accurate and Fully Quantized Low-bit Vision Transformer 引用了 Similarity-Preserving Knowledge Distillation
- TernaryBERT: Distillation-aware Ultra-low Bit BERT 引用了 TinyBERT: Distilling BERT for Natural Language Understanding
- TernaryBERT: Distillation-aware Ultra-low Bit BERT 引用了 Q-BERT: Hessian Based Ultra Low Precision Quantization of BERT
- Q-DM: An Efficient Low-bit Quantized Diffusion Model 引用了 Q-ViT: Accurate and Fully Quantized Low-bit Vision Transformer
- PB-LLM: Partially Binarized Large Language Models 引用了 BiT: Robustly Binarized Multi-distilled Transformer
- BiT: Robustly Binarized Multi-distilled Transformer 引用了 TernaryBERT: Distillation-aware Ultra-low Bit BERT
- BiT: Robustly Binarized Multi-distilled Transformer 引用了 Training binary neural networks with real-to-binary convolutions
- BiT: Robustly Binarized Multi-distilled Transformer 引用了 Q-BERT: Hessian Based Ultra Low Precision Quantization of BERT
引用它的顶会 Paper40
- Q-ViT: Accurate and Fully Quantized Low-bit Vision TransformerYanjing Li, Sheng Xu, Baochang Zhang, Xianbin Cao 等NeurIPS 2022 · 185 次引用
- BiT: Robustly Binarized Multi-distilled TransformerZechun Liu, Barlas Oguz, Aasish Pappu, Lin Xiao 等NeurIPS 2022 · 93 次引用
- PB-LLM: Partially Binarized Large Language ModelsZhihang Yuan, Yuzhang Shang, Zhen DongICLR 2024 · 91 次引用
- Q-DM: An Efficient Low-bit Quantized Diffusion ModelYanjing Li, Sheng Xu, Xianbin Cao, Xiao Sun 等NeurIPS 2023 · 70 次引用
- BiViT: Extremely Compressed Binary Vision TransformersYefei He, Zhenyu Lou, Luoming Zhang, Jing Liu 等ICCV 2023 · 44 次引用
它引用的 Paper9
- TinyBERT: Distilling BERT for Natural Language UnderstandingXiaoqi Jiao, Yichun Yin, Lifeng Shang, Xin Jiang 等EMNLP Findings 2020 · 1,787 次引用
- Similarity-Preserving Knowledge DistillationFrederick Tung, Greg MoriICCV 2019 · 1,214 次引用
- Q-BERT: Hessian Based Ultra Low Precision Quantization of BERTSheng Shen, Zhen Dong, Jiayu Ye, Linjian Ma 等AAAI 2020 · 656 次引用
- Training binary neural networks with real-to-binary convolutionsBrais Martínez, Jing Yang, Adrian Bulat, Georgios TzimiropoulosICLR 2020 · 251 次引用
- TernaryBERT: Distillation-aware Ultra-low Bit BERTWei Zhang, Lu Hou, Yichun Yin, Lifeng Shang 等EMNLP 2020 · 147 次引用
相关 Paper
- Partially-Random Initialization: A Smoking Gun for Binarization Hypothesis of BERTArash ArdakaniEMNLP Findings 2022 · 1 次引用
- BinaryBERT: Pushing the Limit of BERT QuantizationHaoli Bai, Wei Zhang, Lu Hou, Lifeng Shang 等ACL 2021
- BiLLM: Pushing the Limit of Post-Training Quantization for LLMsWei Huang, Yangdong Liu, Haotong Qin, Ying Li 等ICML 2024 · 161 次引用
- BiDM: Pushing the Limit of Quantization for Diffusion ModelsXingyu Zheng, Xianglong Liu, Yichen Bian, Xudong Ma 等NeurIPS 2024 · 12 次引用
- BinaryAttention: One-Bit QK-Attention for Vision and Diffusion TransformersChaodong XIAO, Zhengqiang ZHANG, Lei ZhangCVPR 2026 · 1 次引用
