Abstract
1-bit Large Language Model (LLM) quantization offers significant advantages in reducing storage and computational costs. However, existing methods typically train 1-bit LLMs from scratch, failing to fully leverage pre-trained models. This results in high training costs and notable accuracy degradation. The BinaryLLM framework introduces a novel paradigm for creating high-performance 1-bit LLMs by fine-tuning pre-trained models rather than training them from scratch. By employing a smooth, progressive transition from full-precision to binary weights, this approach achieves state-of-the-art accuracy with a fraction of the training cost, offering a 10x reduction in memory and a 10x theoretical speedup.
1. Introduction: The "Violent" Binarization Gap
As Large Language Models grow in size, their computational and storage requirements become prohibitive for edge devices and resource-constrained environments. 1-bit quantization—where weights are represented by just two values (typically -1 and +1)—is the "holy grail" of model compression, potentially reducing memory usage by 16x compared to FP16.
However, current state-of-the-art 1-bit models (like BitNet) are usually trained from scratch on trillions of tokens, which is incredibly expensive. Attempts to "inherit" weights from existing pre-trained models usually fail because the jump from high-precision decimals to binary values is too extreme. This "naive binarization" destroys the delicate internal representations of the model, leading to massive initial training loss and poor final accuracy. The core challenge addressed by BinaryLLM is how to successfully migrate the rich knowledge of a pre-trained 16-bit model into a 1-bit architecture without suffering this catastrophic loss.
2. Methodology: The BinaryLLM Framework
The authors propose the BinaryLLM framework, which bridges the quantization gap through three core innovations:
2.1 Consistent Progressive Training
Instead of using a hard sign() function immediately, the authors use a smooth approximation: $F(x, t) = \tanh(tx)/\tanh(t)$.
- At the start of training ($t \to 0$), the function is nearly linear, preserving the original pre-trained weight distribution.
- As training progresses, an exponential scheduler increases $t$, and the function gradually morphs into the
sign()function. - Crucially, this approximation is used in both the forward and backward passes. Previous "progressive" methods often only used smooth functions for the gradient (backward pass) while keeping the
sign()function for the forward pass. BinaryLLM argues that this mismatch creates an optimization gap that hinders convergence. Consistent progressive training ensures the model "eases" into its binary state without a sudden shock to the system.
2.2 Binary-aware Initialization
Before training begins, the weights are pre-processed. The authors use an autoregressive search to find channel-wise scaling factors that minimize error accumulation across layers. This ensures the starting point for the progressive training is "binary-friendly."
2.3 Dual-scaling Compensation
To further reduce quantization error, two scaling factors are employed:
- An analytical factor ($S_a$) that minimizes the $L_2$ distance between full-precision and binary weights.
- A learnable factor ($S_l$) that adapts during training to recover accuracy. During inference, these two are merged into a single factor, adding zero computational overhead.
3. Experimental Setup
The framework was evaluated across several model scales and datasets:
- Base Models: SmolLM-135M, LLaMA3-1B, LLaMA3-3B, and LLaMA2-7B.
- Training: Models were fine-tuned using subsets of the RedPajama dataset (e.g., 20 billion tokens for the 135M model).
- Evaluation: Perplexity was measured on Wiki2, C4, and PTB. Zero-shot accuracy was evaluated across seven downstream tasks: BoolQ, PIQA, HellaSwag (HS), WinoGrande (WG), ARC-e, ARC-c, and OpenbookQA (OBQA).
4. Key Results
BinaryLLM demonstrates that high-performance 1-bit LLMs can be achieved using pre-trained models, eliminating the need for expensive training from scratch.
- Superior Accuracy: On the LLaMA3-3B scale, BinaryLLM (1.01 bit) achieved an average zero-shot accuracy of 57.0%, significantly outperforming BitNet (1.58 bit) at 50.2% and FBI-LLM (1.01 bit) at 52.9%.
- Efficiency Gains: The 7B model achieved a 10.06x memory compression and a 10.12x theoretical speedup compared to the full-precision LLaMA2-7B.
- Cost-Effectiveness: While models like FBI-LLM require 1.26 trillion tokens to train from scratch, BinaryLLM achieves better results using only 20 billion tokens by leveraging pre-trained weights.
- Balanced Performance: Unlike models trained from scratch, which often struggle with specific tasks (like the PTB dataset), BinaryLLM maintains a more balanced performance across all benchmarks, inheriting the "generalist" nature of the pre-trained base.
5. Limitations and Future Work
While BinaryLLM represents a significant leap forward, a few limitations remain:
- Scaling Limits: Due to computational constraints, the authors only tested up to the 7B parameter scale. Whether these techniques hold for "frontier" models (70B+) remains to be seen.
- The "Reasoning Gap": While BinaryLLM narrows the gap to full-precision models, a performance delta still exists, particularly in complex reasoning tasks.
- Hardware Optimization: While the theoretical speedup is 10x, real-world latency gains on current CPUs (using frameworks like T-MAC) are currently more modest (around 2-4x). This is because current hardware is not yet fully optimized for "true" 1-bit operations compared to 2-bit or 4-bit. Future hardware-software co-design is the next frontier for realizing the full potential of 1-bit LLMs.
Summary updated