knoxel/bitnet-cpp-explorer
0
⚡ BitNet b1.58 2B4T — CPU Inference with bitnet.cpp
The fast version. This Space compiles Microsoft's bitnet.cpp from source and runs the official GGUF model with the I2_S lossless kernel — achieving 4-10× speedup over the transformers-based version.
Architecture
┌─────────────────────────────────────────────────┐
│ Gradio UI (Python) │
│ ↕ OpenAI-compatible streaming API │
│ llama-server (bitnet.cpp, port 8080) │
│ ↕ I2_S ternary kernel (additions only) │
│ ggml-model-i2_s.gguf (1.1 GB, lossless) │
└─────────────────────────────────────────────────┘Why bitnet.cpp?
Features
- 💬 Streaming Chat — Real-time conversation with live tok/s stats
- 📊 Benchmark — Greedy generation with detailed performance metrics
- 📈 Paper Results — Published comparison table from the technical report
- 🏗️ Architecture — How ternary weights enable multiplication-free inference
- ⚙️ System Info — Live CPU/memory stats
How it works
- Docker build compiles bitnet.cpp with I2_S kernel optimizations
- Container startup launches
llama-serveron localhost:8080 - Gradio app connects via OpenAI-compatible streaming API
- All inference happens on CPU with addition-only matrix operations
References
- 📄 Technical Report
- 📄 bitnet.cpp Paper
- 🤗 Model Weights
- 🤗 GGUF Weights
- 💻 bitnet.cpp (38K+ ⭐)
