Paper notes

BitNet b1.58: Ternary weights turn matrix multiplication into addition and subtraction

BitNet b1.58 trains Transformer weights in {-1,0,1}, about 1.58 bits each, with 8-bit activations. It approaches LLaMA-quality results at 3B scale while targeting weight bandwidth and multiplication cost.

Published Updated 2 min read

On this page
  1. How it works
  2. What the evidence shows
  3. A reproducible check
  4. Limitations and common misreadings
  5. The key takeaway
  6. Further reading
  7. FAQ

BitNet b1.58 studies Transformers whose linear weights take only -1, 0 or 1. The 1.58 figure is log2(3); this is quantization-aware training from scratch, not rounding an existing FP16 checkpoint, and activations remain 8-bit.

How it works

BitLinear normalizes activations, quantizes weights to ternary values and restores scale with a learned or computed factor. Forward matrix products can avoid general multiplications, while gradients still use higher precision. Group quantization and specialized kernels are part of the design.

What the evidence shows

Against LLaMA-style models trained on the same tokens, quality approaches parity around 3B, and the 3.9B model surpasses the report’s 3B baseline. Estimated energy savings are substantial, but real speed depends on kernels and hardware rather than the bit ratio alone.

A reproducible check

This snippet checks a public formula or configuration; it does not reproduce full training.

import math
bits = math.log2(3)
for params_b in (3, 70):
    ternary_gb = params_b * bits / 8
    fp16_gb = params_b * 2
    print(f"{params_b}B: ternary={ternary_gb:.2f} GB, FP16={fp16_gb:.0f} GB")
print("bits per ternary weight =", bits)
3B: ternary=0.59 GB, FP16=6 GB
70B: ternary=13.87 GB, FP16=140 GB
bits per ternary weight = 1.584962500721156

The arithmetic is reproducible, but model quality still depends on the full experiments in the paper.

Limitations and common misreadings

The 1.58-bit figure excludes activations, KV cache, normalization and optimizer state. It is not a free conversion of old checkpoints, and compressed storage does not guarantee acceleration without an appropriate ternary kernel.

The key takeaway

The main idea is co-design of quantization, architecture and training. Evaluate the full runtime, not just weight size.

Further reading

FAQ

Why 1.58 bits?
Three possible weight values require log2(3), approximately 1.585 bits, in an ideal representation.
Are activations ternary too?
No. The paper uses 8-bit activations; ternarization primarily targets linear-layer weights.
Can Llama simply be converted to BitNet?
No. The reported models train from scratch with quantization awareness; direct conversion is a different problem.