BitNet, or bitnet.cpp, is Microsoft's official inference framework for 1.58-bit language models: models whose weights are only -1, 0 or 1. Because the arithmetic is so simple, they run fast on a CPU without a graphics card. Microsoft reports speedups of 2.37x to 6.17x on x86 processors and 1.37x to 5.07x on ARM compared with full-precision models, with energy use cut by more than half.
It is on this list because it is the practical way to try the idea. The repository builds on llama.cpp, ships kernels for x86 and ARM plus a GPU kernel, and runs Microsoft's own BitNet b1.58 2B model, two 1-bit embedding models released in 2026, and community models such as the Falcon3 1.58-bit series.
The limits are real: only models trained as 1-bit models work, and there are few of them so far, mostly small. Setup means building from source with Python, CMake and Clang 18, and there are no tagged releases.
- Repository: github.com/microsoft/BitNet
- Licence: MIT (MIT License)
- Language: C++. Stars: 41.2K. Forks: 3,837. Last push: Jul 27, 2026.
- Scan: safe, Oct 26, 2026, commit 0b341e5
Who it is for
Developers and researchers curious about running language models on laptops, servers or edge devices without a GPU, and people following low-bit model research.
Getting started
1. Clone with submodules and install the Python requirements (needs Python 3.10+, CMake 3.22+ and Clang 18+)
git clone --recursive https://github.com/microsoft/BitNet.git && cd BitNet && pip install -r requirements.txt2. Download the official 2B model and build for it
huggingface-cli download microsoft/BitNet-b1.58-2B-4T-gguf --local-dir models/BitNet-b1.58-2B-4T && python setup_env.py -md models/BitNet-b1.58-2B-4T -q i2_s3. Chat with it
python run_inference.py -m models/BitNet-b1.58-2B-4T/ggml-model-i2_s.gguf -p "You are a helpful assistant" -cnvSafety scan
We cloned microsoft/BitNet at commit 0b341e5 on Oct 26, 2026 and ran the checks described on the GitHub Tools page: credential patterns, decode-and-execute code, install-time scripts, committed binaries, risky CI workflows, every host the code talks to, known vulnerabilities in pinned dependencies, and project hygiene. A person read every hit. This is what we found.
- No secrets, no suspicious patterns, no committed binaries and no bare-IP URLs in about 22,000 lines of Python and C++.
- One build hook: gpu/bitnet_kernels/setup.py uses a custom build command to compile the optional GPU kernels. It only runs if you build that part.
- The only external hosts in the code are huggingface.co, where models are downloaded, and github.com.
- No lockfile, so no dependency advisories were queried; the Python requirements are a short pip list.
- No GitHub workflows at all and no Dependabot or CodeQL, so nothing automated checks changes. Security policy and code of conduct present, as usual for Microsoft repositories.
What the scanner counted
| Check | Result |
|---|---|
| Secrets | None found. |
| Suspicious code | None found. |
| Install-time code | 1 setup.py with custom install logic |
| Committed binaries | None. |
| CI workflows | No GitHub Actions workflows. |
| Network hosts | 2 distinct hosts referenced from source; most often huggingface.co, github.com. No URLs to bare IP addresses. |
| Known vulnerabilities | No lockfile to check: dependencies are declared as ranges, so what gets installed is whatever is current on the day. |
| Project hygiene | Has security policy, licence file. Missing automated dependency updates, CodeQL, contributing guide. |
| OpenSSF Scorecard | Not scored: the project is not in Scorecard's weekly index. |
By the numbers
| Stars | 41.2K |
|---|---|
| Forks | 3,837 |
| Contributors | 23 |
| Commits | 110 |
| Open issues | 216 |
| Open pull requests | 159 |
| Releases | 0 |
| Latest release | none tagged |
| Licence | MIT |
| Main language | C++ |
| Project age | 2 years |
| Last push | Jul 27, 2026 |
| Tracked files | 81 |
| Lines of code | 21.7K |
| Checkout size | 8 MB |
Lines by language: Python 11.1K, C/C++ header 7,156, Markdown 1,379, C++ 1,249, Shell 730, CUDA 37.
Questions
Is BitNet free?
Yes. bitnet.cpp is MIT-licensed, and Microsoft's BitNet models on Hugging Face are free to download under their own licences.
Can BitNet run any model, like Llama or Qwen?
No. It runs models trained from the start with 1.58-bit weights, such as BitNet b1.58 2B and the Falcon3 1.58-bit models. Ordinary models need Ollama or llama.cpp instead.
Do I need a GPU for BitNet?
No. CPUs are the main target, on both x86 and ARM, including Apple Silicon. A GPU kernel exists for those who want it.
This post is part of GitHub Tools, where every repository is cloned and scanned before it is written up. The scan is a snapshot of one commit on one day; the repository has moved on since, so check it before you install.
