DB - LLM : Accurate Dual-Binarization for Efficient LLM s (2024)

Abstract: Large language models (LLMs) have significantly advanced the field of natural language processing, while the expensive memory and computation consumption impede their practical deployment. Quantization emerges as one of the most effective methods for improving the computational efficiency of LLMs. However, existing ultra-low-bit quantization always causes severe accuracy drops. In this paper, we empirically investigate the micro and macro characteristics of ultra-low bit quantization and present a novel D ual- B inarization method for LLM s, namely DB-LLM . For the micro-level, we take both the accuracy advantage of 2-bit-width and the efficiency advantage of binarization into account, introducing Flexible Dual Binarization ( FDB ). By splitting 2-bit quantized weights into two independent sets of binaries, FDB ensures the accuracy of representations and introduces flexibility, utilizing the efficient bitwise operations of binarization while retaining the inherent high sparsity of ultra-low bit quantization. For the macro-level, we find the distortion that exists in the prediction of LLM after quantization, which is specified as the deviations related to the ambiguity of samples. We propose the Deviation-Aware Distillation ( DAD ) method, enabling the model to focus differently on various samples. Comprehensive experiments show that our DB-LLM not only significantly surpasses the current State-of-The-Art (SoTA) in ultra-low bit quantization (, perplexity decreased from 9.64 to 7.23), but also achieves an additional 20% reduction in computational consumption compared to the SOTA method under the same bit-width. Our code is available at https://github.com/Hon-Chen/DB-LLM.

## conclusion in this paper, we present db-llm, an accurate dual-binarization approach for efficient large language models (llms). through a detailed analysis of extremely low-bit quantization and binarization, we've outlined the advantages and disadvantages of each method. capitalizing on these insights, we meticulously develop the flexible dual binarization to represent weights efficiently. this method transcends the constraints imposed by data formats. additionally, we examine the macro-level prediction deviations in low-bit quantization and introduce deviation-aware distillation, which directs the model to focus more on ambiguous samples. our experiments show that our method surpasses the current state-of-the-art (sota) in 2-bit quantization accuracy and also greatly reduces computational demands compared to traditional techniques.