BitNet b1.58 and bitnet.cpp: CPU inference explained

Learn how BitNet b1.58 uses ternary weights and bitnet.cpp for CPU inference, with an Apple M2 example and a discussion of training limits.

Player not loading? Watch on YouTube

BitNet b1.58 is the subject of this explanation of ternary weights and CPU inference. The speaker describes weights restricted to -1, 0, or +1: a weighted input becomes a subtraction, a skipped contribution, or an addition. The name refers to log base two of three, approximately 1.58 bits, for the three possible states.

The video discusses Microsoft's April 2025 release of a two billion parameter model trained on four trillion tokens, with open weights and inference code. The speaker says it matches full precision models of the same size on standard benchmarks, but does not name the benchmarks or provide scores. A comparison with FP16 suggests roughly tenfold savings in weight storage; the video does not give a complete memory budget for a specific deployment.

For viewers looking to run models locally, the practical focus is bitnet.cpp, an inference engine for ternary models on CPUs. The speaker cites an Apple M2 running a billion parameter language model at usable speed, without reporting tokens per second. This is a conceptual overview rather than an installation guide.

Training remains a separate issue. The speaker says it still needs GPUs and explains the straight-through estimator, with full precision weights during training and ternary values in the forward pass. The closing discussion raises possible scaling limits and speculates about effects on NVIDIA and inference costs.