Spaces:
Running
Running
Upload README.md
Browse files
README.md
CHANGED
|
@@ -1,12 +1,56 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 6.14.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: "𧬠BitNet b1.58 2B4T β CPU-Only Inference Explorer"
|
| 3 |
+
emoji: π§¬
|
| 4 |
+
colorFrom: indigo
|
| 5 |
+
colorTo: blue
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 6.14.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
+
models:
|
| 11 |
+
- microsoft/bitnet-b1.58-2B-4T
|
| 12 |
+
tags:
|
| 13 |
+
- bitnet
|
| 14 |
+
- 1-bit
|
| 15 |
+
- cpu-inference
|
| 16 |
+
- ternary-weights
|
| 17 |
+
- efficient-inference
|
| 18 |
+
short_description: "Chat with Microsoft's 1-bit LLM on CPU β no GPU needed"
|
| 19 |
---
|
| 20 |
|
| 21 |
+
# 𧬠BitNet b1.58 2B4T β CPU-Only Inference Explorer
|
| 22 |
+
|
| 23 |
+
An interactive demo of **Microsoft Research's first open-source native 1-bit Large Language Model**.
|
| 24 |
+
|
| 25 |
+
## What makes this special?
|
| 26 |
+
|
| 27 |
+
| Feature | Detail |
|
| 28 |
+
|---|---|
|
| 29 |
+
| **Weights** | Ternary {-1, 0, +1} β just 1.58 bits per weight |
|
| 30 |
+
| **Memory** | 0.4 GB (non-embedding) β **5-13Γ less** than comparable models |
|
| 31 |
+
| **Energy** | 0.028J per token β **6-9Γ less** than FP16 models |
|
| 32 |
+
| **Quality** | 54.2% avg benchmark β competitive with Qwen2.5 1.5B (55.2%) |
|
| 33 |
+
| **Training** | Trained from scratch on 4T tokens (not post-training quantized) |
|
| 34 |
+
|
| 35 |
+
## Key insight
|
| 36 |
+
|
| 37 |
+
Since weights are only -1, 0, or +1, matrix multiplication becomes pure **addition/subtraction**. No floating-point multiplies needed β this is why CPUs can run BitNet efficiently.
|
| 38 |
+
|
| 39 |
+
## Demo features
|
| 40 |
+
|
| 41 |
+
- π¬ **Chat** β Streaming conversation with live tokens/sec stats
|
| 42 |
+
- π **Benchmark** β Single-shot generation with memory & speed metrics
|
| 43 |
+
- π **Paper Results** β Published benchmark comparison table
|
| 44 |
+
- ποΈ **Architecture** β Visual explainer of how BitNet b1.58 differs from standard Transformers
|
| 45 |
+
- βοΈ **System** β Live hardware & memory stats
|
| 46 |
+
|
| 47 |
+
## β οΈ Performance note
|
| 48 |
+
|
| 49 |
+
This demo uses the `transformers` library, which does **not** include the specialized `bitnet.cpp` kernels. For the paper's reported CPU latency (29ms/token), use [bitnet.cpp](https://github.com/microsoft/BitNet) with the [GGUF weights](https://huggingface.co/microsoft/bitnet-b1.58-2B-4T-gguf).
|
| 50 |
+
|
| 51 |
+
## References
|
| 52 |
+
|
| 53 |
+
- π [Technical Report](https://arxiv.org/abs/2504.12285)
|
| 54 |
+
- π€ [Model Weights](https://huggingface.co/microsoft/bitnet-b1.58-2B-4T)
|
| 55 |
+
- π» [bitnet.cpp](https://github.com/microsoft/BitNet) (38K+ β)
|
| 56 |
+
- π¦ [GGUF Weights](https://huggingface.co/microsoft/bitnet-b1.58-2B-4T-gguf)
|