DB-LLM: Accurate Dual-Binarization for Efficient LLMs

Hong Chen, Chengtao Lv, Liang Ding, Haotong Qin, Xiabin Zhou, Yifu Ding, Xuebo Liu, Min Zhang, Jinyang Guo, Xianglong Liu, Dacheng Tao

Abstract

DB-LLM (Dual-Binarization for LLMs) is a novel quantization framework designed to compress Large Language Models to ultra-low 2-bit weights while maintaining unprecedented accuracy. By decomposing 2-bit weights into two independent 1-bit sets through Flexible Dual Binarization (FDB) and employing a Deviation-Aware Distillation (DAD) process, DB-LLM achieves state-of-the-art performance. Experimental results demonstrate that a 2-bit 30B model can outperform a full-precision 7B model while utilizing significantly less memory and computational resources.

Introduction

The deployment of Large Language Models (LLMs) such as LLaMA or GPT on consumer-grade hardware is primarily hindered by their massive parameter counts. While quantization—reducing weight precision from 16-bit to 4-bit or lower—is a common mitigation strategy, "ultra-low-bit" quantization (1 or 2 bits) typically results in catastrophic accuracy degradation.

This research identifies two primary bottlenecks:

  1. Micro-level representation: Standard 1-bit binarization lacks sufficient representational capacity, while 2-bit formats are difficult to optimize and often fail to fully exploit bitwise operation efficiencies.
  2. Macro-level prediction distortion: Quantized models often become biased toward frequent "head" words, losing the nuanced "long-tail" distribution of the original teacher model.

Methodology

DB-LLM introduces two core innovations to address these challenges.

Flexible Dual Binarization (FDB)

Instead of standard 2-bit integer quantization, FDB splits each weight into two independent 1-bit (binary) representations, each with a unique scaling factor. This approach allows the model to leverage highly efficient bitwise operations (XNOR and Bitcount) while maintaining the representational power of a 2-bit width. Furthermore, FDB naturally induces high sparsity (over 60%), providing additional avenues for computational speedups.

Deviation-Aware Distillation (DAD)

To correct prediction distortion, the authors utilize Knowledge Distillation (KD). DAD specifically monitors the entropy (uncertainty) of both the teacher and student models to identify "ambiguous" tokens. The loss function is then re-weighted to force the student model to focus on these difficult samples, ensuring the quantized model retains the complex reasoning and vocabulary of the original.

Overview of the DB-LLM framework, illustrating the Flexible Dual Binarization (FDB) process and the Deviation-Aware Distillation (DAD) loss re-weighting mechanism.

Experimental Results

The framework was evaluated on the LLaMA-1 and LLaMA-2 families across various benchmarks, including WikiText2, C4, and zero-shot reasoning tasks like PIQA and HellaSwag.

Performance and Scaling

DB-LLM consistently outperforms existing 2-bit quantization methods such as GPTQ, AWQ, and OmniQuant. For instance, on LLaMA-1-7B, it reduces perplexity to 7.59, compared to 8.91 for OmniQuant. A significant finding is the scaling advantage: a 2-bit LLaMA-1-30B model achieves a perplexity of 5.52, surpassing the full-precision (FP16) LLaMA-1-7B (5.68) while requiring 3.7× less storage.

Perplexity vs. Model Size across different quantization methods. DB-LLM (red stars) demonstrates superior scaling and lower perplexity compared to 2-bit and 3-bit baselines.

Efficiency

The method achieves a theoretical 14.2× reduction in FLOPs compared to FP16 baselines. By using dual binaries, the model reduces computational consumption by 20% relative to previous state-of-the-art 2-bit methods while simultaneously improving accuracy.

Discussion and Insights

Analysis of the optimization process revealed that FDB creates a "flatter" loss landscape compared to standard binarization, making the model easier to fine-tune and less susceptible to poor local minima. Additionally, identifying the "Head Class" bias allowed for the design of the DAD loss to specifically counter statistical drift toward frequent words in ultra-low-bit models.

Conclusion and Future Work

DB-LLM demonstrates that ultra-low-bit quantization is viable for LLMs without sacrificing significant accuracy. Future research will focus on activation quantization to further enhance inference speeds and the development of optimized hardware kernels to fully realize the theoretical speedups of bitwise operations.

Summary updated

BibTeX
@inproceedings{chen2024db,
  author = {Hong Chen and Chengtao Lv and Liang Ding and Haotong Qin and Xiabin Zhou and Yifu Ding and Xuebo Liu and Min Zhang and Jinyang Guo and Xianglong Liu and Dacheng Tao},
  title = {{DB-LLM: Accurate Dual-Binarization for Efficient LLMs}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.findings-acl.516},
}
Figure