microsoft/BitNet

Official inference framework for 1-bit LLMs

What it solves

bitnet.cpp is an inference framework designed to run 1-bit (ternary) Large Language Models (LLMs) with high efficiency. It addresses the high computational and energy costs of full-precision models, enabling large models (up to 100B parameters) to run on a single CPU with speeds comparable to human reading.

How it works

The framework provides optimized kernels for CPU (x86 and ARM) and GPU, utilizing ternary weights (1.58-bit) to perform fast and lossless inference. It supports various quantization types (such as I2_S and TL1) and can convert .safetensors checkpoints into a GGUF format for execution.

Who it’s for

It is intended for developers and researchers looking to deploy LLMs on edge devices or resource-constrained environments where CPU-only inference or low energy consumption is critical.

Highlights

  • Significant Speedups: Achieves up to 6.17x speedup on x86 CPUs and 5.07x on ARM CPUs compared to full-precision models.
  • Energy Efficiency: Reduces energy consumption by up to 82.2% on x86 and 70.0% on ARM.
  • Broad Hardware Support: Optimized for x86 and ARM CPUs, with official GPU kernels available.
  • 1-bit Embedding Models: Includes support for 1-bit embedding models (0.6B and 270M) that maintain competitive quality with faster CPU inference.

Related

  • Project
  • Project
  • Project
  • Project
  • Project