OpenSource-Hub

BitNet

フレームワーク

microsoft/BitNet

1-bit 大規模モデルの公式推論フレームワーク。CPU/GPU での高効率なロスレス推論をサポート。

概要

bitnet.cpp はマイクロソフト公式の 1-bit 大規模モデル推論フレームワークであり、BitNet b1.58 などの三値モデルの CPU および GPU 上での高速かつロスレスな推論をサポートする。その最適化カーネルは x86 および ARM プラットフォームで大幅な高速化とエネルギー消費の削減をもたらし、単一の CPU 上でも千億パラメータ規模のモデルを実行でき、ローカルデバイスへの大規模モデルのデプロイを推進する。

README プレビュー

\n\n# bitnet.cpp\n\n[](https://opensource.org/licenses/MIT)\n\n[](https://huggingface.co/collections/microsoft/bitnet)\n[](https://arxiv.org/abs/2502.11880)\n[](https://demo-bitnet-h0h8hcfqeqhrf5gf.canadacentral-01.azurewebsites.net/)\n[](https://github.com/microsoft/BitNet/blob/main/gpu/README.md)\n\n\n\n\n\n📰 News\n\n07/23/2026: 📣 We released VibeASR.cpp — a real-time multilingual ASR inference engine on CPU using BitNet I2_S quantization, achieving RTF Code] [Models] [Report] \n\n07/20/2026: 📣 We released BitNet-embedding-0.6B and BitNet-embedding-270M on Hugging Face — the first 1-bit embedding models that deliver competitive embedding quality with significantly faster inference on CPUs.\n- **1.42x to 2.28x speedup** over F16 on BitNet-embedding-0.6B prefill (8 threads)\n- **1.32x to 1.74x speedup** over F16 on BitNet-embedding-270M prefill (8 threads)\n- Supports I2_S conversion with optimized kernels on x86 CPUs\n- Lossless inference with 2 bits per weight\n\n07/16/2026: 📣 Released [BitNet Embeddings 0.6B/270M: I2_S Conversion and Inference Optimization](docs/bitnet-embeddings-i2s-guide.md) — detailed guide for converting and running BitNet embedding models with optimized I2_S kernels.\n\n01/15/2026: 📣 Released [BitNet CPU Inference Optimization](https://github.com/microsoft/BitNet/blob/main/src/README.md) — parallel kernel implementations with configurable tiling and embedding quantization support, achieving **1.15x to 2.1x** additional speedup over the original implementation.\n\n05/20/2025: 📣 Released [BitNet Official GPU inference kernel](https://github.com/microsoft/BitNet/blob/main/gpu/README.md) — extending 1-bit inference beyond CPUs.\n\n04/14/2025: 📣 Released [BitNet Official 2B Parameter Model](https://huggingface.co/microsoft/BitNet-b1.58-2B-4T) on Hugging Face — the first official BitNet b1.58 model trained with 4T tokens.\n\n02/18/2025: 📑 [Bitnet.cpp: Efficient Edge Inference for Ternary LLMs](https://arxiv.org/abs/2502.11880) — system-lev

FAQ (1)

トラブル対応
WindowsでBitNetをビルドした後にllama-cli.exeが見つからない(FileNotFoundError WinError 2)エラーを修正する方法

ビルドは成功しますが、llama.cppがGitサブモジュールとして含まれているため、CMakeがデフォルトでLLAMA_BUILD_EXAMPLES=OFFを設定し(CLIは'example'ターゲットとして扱われます)、llama-cli.exeが生成されません。

修正方法:ビルドする前に、フラグを有効にしてCMakeの構成ステップを再実行します:

cmake -B build -DLLAMA_BUILD_EXAMPLES=ON .
cmake --build build --config Release

あるいは、CLIターゲットのみを明示的にビルドします:cmake --build build --config Release --target llama-cli。再ビルド後、llama-cli.exeはbuild/bin/Releaseに生成され、python run_inference.py -m models/BitNet-b1.58-2B-4T/ggml-model-i2_s.gguf -p "Test" -cnvが動作するようになります。setup_env.pyに対する恒久的な修正はPR #477で提出されました。

参照 Issue #461