Upload folder using huggingface_hub
Browse files- .trillim-quantize-complete +1 -0
- README.md +56 -32
- qmodel.tensors +1 -1
- rope.cache +1 -1
- tokenizer_config.json +7 -1
- trillim_config.json +4 -3
.trillim-quantize-complete
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
ready
|
README.md
CHANGED
|
@@ -1,38 +1,62 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
|
| 12 |
-
|
|
| 13 |
-
|
|
| 14 |
-
|
|
| 15 |
-
|
|
| 16 |
-
|
|
| 17 |
-
|
|
| 18 |
-
|
|
| 19 |
-
|
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
##
|
| 24 |
-
|
| 25 |
-
```
|
| 26 |
-
pip install
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
python eval_ppl.py --hf_path 1bitLLM/bitnet_b1_58-3B --seqlen 2048
|
| 30 |
-
```
|
| 31 |
```
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
|
|
|
| 38 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- bitnet
|
| 5 |
+
- ternary
|
| 6 |
+
- trillim
|
| 7 |
+
- cpu-inference
|
| 8 |
+
base_model: 1bitLLM/bitnet_b1_58-3B
|
| 9 |
---
|
| 10 |
+
# BitNet-3B-TRNQ
|
| 11 |
|
| 12 |
+
Ternary-quantized version of [1bitLLM/bitnet_b1_58-3B](https://huggingface.co/1bitLLM/bitnet_b1_58-3B), packaged for the [Trillim DarkNet](https://huggingface.co/Trillim) inference engine.
|
| 13 |
+
|
| 14 |
+
This model runs entirely on CPU — no GPU required.
|
| 15 |
+
|
| 16 |
+
## Model Details
|
| 17 |
+
|
| 18 |
+
| | |
|
| 19 |
+
|---|---|
|
| 20 |
+
| **Architecture** | BitNet (BitnetForCausalLM) |
|
| 21 |
+
| **Parameters** | ~3B |
|
| 22 |
+
| **Hidden size** | 3200 |
|
| 23 |
+
| **Layers** | 26 |
|
| 24 |
+
| **Attention heads** | 32 |
|
| 25 |
+
| **Context length** | 2048 |
|
| 26 |
+
| **Quantization** | Ternary ({-1, 0, 1}) |
|
| 27 |
+
| **Source model** | [1bitLLM/bitnet_b1_58-3B](https://huggingface.co/1bitLLM/bitnet_b1_58-3B) |
|
| 28 |
+
| **License** | MIT |
|
| 29 |
+
|
| 30 |
+
## Usage
|
| 31 |
+
|
| 32 |
+
```bash
|
| 33 |
+
pip install trillim
|
| 34 |
+
trillim pull Trillim/BitNet-3B-TRNQ
|
| 35 |
+
trillim serve Trillim/BitNet-3B-TRNQ
|
|
|
|
|
|
|
| 36 |
```
|
| 37 |
+
|
| 38 |
+
This starts an OpenAI-compatible API server at `http://127.0.0.1:8000`.
|
| 39 |
+
|
| 40 |
+
For interactive CLI chat:
|
| 41 |
+
|
| 42 |
+
```bash
|
| 43 |
+
trillim chat Trillim/BitNet-3B-TRNQ
|
| 44 |
```
|
| 45 |
+
|
| 46 |
+
## What's in this repo
|
| 47 |
+
|
| 48 |
+
| File | Description |
|
| 49 |
+
|---|---|
|
| 50 |
+
| `qmodel.tensors` | Ternary-quantized weights in Trillim format |
|
| 51 |
+
| `rope.cache` | Precomputed RoPE embeddings |
|
| 52 |
+
| `config.json` | Model configuration |
|
| 53 |
+
| `tokenizer.json` | Tokenizer |
|
| 54 |
+
| `tokenizer_config.json` | Tokenizer configuration |
|
| 55 |
+
| `tokenizer.model` | SentencePiece model |
|
| 56 |
+
| `tokenization_bitnet.py` | Custom tokenizer class |
|
| 57 |
+
| `trillim_config.json` | Trillim metadata |
|
| 58 |
+
|
| 59 |
+
## License
|
| 60 |
+
|
| 61 |
+
This model is released under the [MIT License](https://opensource.org/licenses/MIT), following the license of the source model.
|
| 62 |
+
|
qmodel.tensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1015142080
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:45fabbe4e311d12d7dd0e98329bdf949884a645d1727f4518d9a6c45ca2a4d77
|
| 3 |
size 1015142080
|
rope.cache
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1638412
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6969d480c4dda9d5fa6091c45c5d213df44ee39fda73a177fbc6f545796cecd6
|
| 3 |
size 1638412
|
tokenizer_config.json
CHANGED
|
@@ -58,5 +58,11 @@
|
|
| 58 |
"spaces_between_special_tokens": false,
|
| 59 |
"tokenizer_class": "BitnetTokenizer",
|
| 60 |
"unk_token": "<unk>",
|
| 61 |
-
"use_default_system_prompt": false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
}
|
|
|
|
| 58 |
"spaces_between_special_tokens": false,
|
| 59 |
"tokenizer_class": "BitnetTokenizer",
|
| 60 |
"unk_token": "<unk>",
|
| 61 |
+
"use_default_system_prompt": false,
|
| 62 |
+
"auto_map": {
|
| 63 |
+
"AutoTokenizer": [
|
| 64 |
+
"tokenization_bitnet.BitnetTokenizer",
|
| 65 |
+
null
|
| 66 |
+
]
|
| 67 |
+
}
|
| 68 |
}
|
trillim_config.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
-
"trillim_version": "0.
|
| 3 |
-
"format_version":
|
| 4 |
"type": "model",
|
| 5 |
"quantization": "ternary",
|
| 6 |
"source_model": "1bitLLM/bitnet_b1_58-3B",
|
|
@@ -9,5 +9,6 @@
|
|
| 9 |
"x86_64",
|
| 10 |
"aarch64"
|
| 11 |
],
|
| 12 |
-
"base_model_config_hash": "
|
|
|
|
| 13 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"trillim_version": "0.6.0",
|
| 3 |
+
"format_version": 4,
|
| 4 |
"type": "model",
|
| 5 |
"quantization": "ternary",
|
| 6 |
"source_model": "1bitLLM/bitnet_b1_58-3B",
|
|
|
|
| 9 |
"x86_64",
|
| 10 |
"aarch64"
|
| 11 |
],
|
| 12 |
+
"base_model_config_hash": "db910c219c28fd9387eeae01a9ef81292b09247b5e5a805f567971a785fab3fd",
|
| 13 |
+
"remote_code": true
|
| 14 |
}
|