BitNet: Scaling 1-bit Transformers for Large Language Models

Hongyu Wang, Shuming Ma, Li Dong, Shaohan Huang, Huaijie Wang +5 more
10/17/2023
291 citations
cs.CL
transformer-attention

No official code found. Best implementation: Beomi/BitNet-Transformers (319 stars, Python, last commit 2024-03-17). 1 more below.

Abstract

The increasing size of large language models has posed challenges for deployment and raised concerns about environmental impact due to high energy consumption. In this work, we introduce BitNet, a scalable and stable 1-bit Transformer architecture designed for large language models.

Show full abstract

Specifically, we introduce BitLinear as a drop-in replacement of the nn.Linear layer in order to train 1-bit weights from scratch. Experimental results on language modeling show that BitNet achieves competitive performance while substantially reducing memory footprint and energy consumption, compared to state-of-the-art 8-bit quantization methods and FP16 Transformer baselines. Furthermore, BitNet exhibits a scaling law akin to full-precision Transformers, suggesting its potential for effective scaling to even larger language models while maintaining efficiency and performance benefits.

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
Beomi/BitNet-TransformersCommunity319Python–2024-03-17
LaundryLabs/bitlinear-reCommunity0PythonMIT2025-06-25

0️⃣1️⃣🤗 BitNet-Transformers: Huggingface Transformers Implementation of "BitNet: Scaling 1-bit Transformers for Large Language Models" in pytorch with Llama(2) Architecture

31936Python, Jupyter NotebookOct 19, 20232 years ago
llmquantizationquantization-aware-trainingtransformers
MIT

Recreating BitLinear from the reference paper: https://arxiv.org/pdf/2310.11453

00PythonJun 24, 20251 years agoMIT

Similar Papers

Cite this paper

@article{wang2023bitnet,
  title  = {BitNet: Scaling 1-bit Transformers for Large Language Models},
  author = {Hongyu Wang and Shuming Ma and Li Dong and Shaohan Huang and Huaijie Wang and Lingxiao Ma and Fan Yang and Ruiping Wang and Yi Wu and Furu Wei},
  year   = {2023},
  eprint = {2310.11453},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.11453v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2310.11453.svg)](https://codeofpaper.com/paper/2310.11453)

Discussion