The Era of 1-bit LLMs: All Large Language Models are in 1.58 Bits

Shuming Ma, Hongyu Wang, Lingxiao Ma, Lei Wang, Wenhui Wang, Shaohan Huang, Li Dong, Ruiping Wang, Jilong Xue, Furu WeiarXiv 2024

Abstract

Recent research, such as BitNet, is paving the way for a new era of 1-bit Large Language Models (LLMs). In this work, we introduce a 1-bit LLM variant, namely BitNet b1.58, in which every single parameter (or weight) of the LLM is ternary {-1, 0, 1}. It matches the full-precision (i.e., FP16 or BF16) Transformer LLM with the same model size and training tokens in terms of both perplexity and end-task performance, while being significantly more cost-effective in terms of latency, memory, throughput, and energy consumption. More profoundly, the 1.58-bit LLM defines a new scaling law and recipe for training new generations of LLMs that are both high-performance and cost-effective. Furthermore, it enables a new computation paradigm and opens the door for designing specific hardware optimized for 1-bit LLMs.

The Deployment Wall

As Large Language Models (LLMs) scale to hundreds of billions of parameters, they encounter a significant "deployment wall." Standard high-precision models, typically using 16-bit floating-point (FP16 or BF16) formats, demand immense GPU memory and consume vast amounts of energy. This is largely due to the computational intensity of floating-point matrix multiplications. While post-training quantization techniques can compress these models to 4 bits or lower, they often suffer from noticeable performance degradation.

The researchers behind BitNet b1.58 propose a fundamental shift: moving away from compressing existing models toward training natively efficient 1-bit LLMs from scratch.

BitNet b1.58: Ternary Weights and Feature Filtering

BitNet b1.58 is an evolution of the original 1-bit BitNet architecture. The primary innovation is the use of ternary weights restricted to the set $\{-1, 0, 1\}$. Because there are three possible states, each weight requires approximately $\log_2(3) \approx 1.58$ bits of storage.

Comparison of standard FP16 Transformer LLMs vs. BitNet b1.58 ternary weights and computation.

The inclusion of the value $0$ is critical. It acts as a "feature filtering" mechanism, allowing the model to explicitly ignore irrelevant input features. This architectural choice enables BitNet b1.58 to significantly outperform previous binary (1-bit) models and achieve performance parity with full-precision counterparts. To maintain compatibility with modern LLM ecosystems, the model incorporates standard components like RMSNorm, SwiGLU, and rotary embeddings.

A New Computational Paradigm

By restricting weights to $\{-1, 0, 1\}$, the core operation of the LLM—matrix multiplication—is transformed. Instead of expensive floating-point multiplications followed by additions, the computation simplifies into pure integer addition.

This shift offers a massive theoretical improvement in energy efficiency. On 7nm chips, swapping floating-point multipliers for integer adders is estimated to be over 70x more energy-efficient. Furthermore, this paradigm opens the door for specialized hardware, such as LPUs or custom ASICs, designed specifically for ternary logic rather than general-purpose floating-point math.

Scaling Performance and Efficiency

The true power of BitNet b1.58 becomes apparent at scale. The authors evaluated the model against LLaMA baselines across various sizes, from 1.3B to 70B parameters, using benchmarks like ARC, Hellaswag, and Winogrande.

Latency and memory scaling of BitNet b1.58 compared to LLaMA across model sizes.

Key findings include:

  • Performance Parity: At the 3B parameter scale and above, BitNet b1.58 matches the accuracy and perplexity of full-precision LLaMA models.
  • Memory and Latency: The efficiency gap widens as models grow. A 70B BitNet b1.58 model uses 7.16x less memory for weights and is 4.1x faster in terms of latency compared to its FP16 equivalent.
  • Throughput: Due to reduced memory requirements, the 70B model can support 11x the batch size, leading to an 8.9x increase in throughput.

Future Directions: Hardware and Edge AI

BitNet b1.58 represents a "Pareto improvement" in the LLM landscape, offering better efficiency without sacrificing performance. However, current GPU hardware is still optimized for floating-point operations, meaning the full potential of ternary addition is yet to be realized in silicon.

Future work will likely focus on developing specialized hardware that natively supports ternary arithmetic and addressing the KV cache memory footprint for long-sequence inference. Ultimately, the 1.58-bit paradigm paves the way for deploying powerful LLMs on edge devices like phones and laptops where memory and battery life are strictly limited.

Summary updated

BibTeX
@misc{ma2024era,
  author = {Shuming Ma and Hongyu Wang and Lingxiao Ma and Lei Wang and Wenhui Wang and Shaohan Huang and Li Dong and Ruiping Wang and Jilong Xue and Furu Wei},
  title = {{The Era of 1-bit LLMs: All Large Language Models are in 1.58 Bits}},
  year = {2024},
  eprint = {2402.17764},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.17764},
}
Figure