Microsoft’s BitNet repository introduces bitnet.cpp, an optimized inference engine for 1.58‑bit (ternary) large language models that runs on CPUs and GPUs. The framework supplies parallel kernels with configurable tiling and I2_S quantization, enabling lossless inference where each weight is stored with two bits. On x86 CPUs using AVX2, bitnet.cpp delivers speedups of 2.37× to 6.17× and cuts energy consumption by 71.9% to 82.2% versus FP16 baselines; on ARM CPUs with NEON, speedups range from 1.37× to 5.07× with energy savings of 55.4% to 70.0%. A 100‑billion‑parameter BitNet b1.58 model can be executed on a single CPU core at 5–7 tokens per second, approaching human reading speed. Specific releases include the official BitNet‑b1.58‑2B‑4T model (2.4 B parameters, trained on 4 trillion tokens) and two 1‑bit embedding models: BitNet‑embedding‑0.6B achieves 1.42× to 2.28× faster prefill than FP16 on eight‑thread x86 systems, while BitNet‑embedding‑270M yields 1.32× to 1.74× speedup under the same conditions. Additionally, VibeASR.cpp demonstrates real‑time multilingual automatic speech recognition using BitNet I2_S quantization, attaining a real‑time factor below one with few threads on both x86 and ARM platforms. All models and kernels are available via Hugging Face, with build instructions requiring Python ≥ 3.10, CMake ≥ 3.22, Clang ≥ 18, and appropriate Windows or Linux toolchains.

Read original