Krafla 0.8.0 (0b527a0)
Browse files- README.md +12 -7
- SHA256SUMS +2 -2
- SmolLM2-360M-Instruct-Q4_0.mlb +1 -1
- SmolLM2-360M-Instruct-Q8_0.mlb +1 -1
README.md
CHANGED
|
@@ -25,22 +25,27 @@ INT4 and INT8 conversions of [HuggingFaceTB/SmolLM2-360M-Instruct](https://huggi
|
|
| 25 |
|
| 26 |
| File | Weights | Size | Perplexity | Prefill | Decode | SHA-256 |
|
| 27 |
|------|---------|-----:|-----------:|--------:|-------:|---------|
|
| 28 |
-
| `SmolLM2-360M-Instruct-Q4_0.mlb` | Q4_0, every matrix 4-bit | 194 MiB | 21.73 |
|
| 29 |
-
| `SmolLM2-360M-Instruct-Q8_0.mlb` | Q8_0, every matrix 8-bit | 367 MiB | 17.45 | 510 tok/s |
|
| 30 |
| `tokenizer.mlt` | tokenizer | 1138 KiB | | | | `02f356d659655d21`… |
|
| 31 |
|
| 32 |
-
Measured on a GitHub runner (AMD EPYC 9V45 96-Core Processor, 4 threads) with Krafla's `avx2` build. Perplexity is measured on the wikitext-2 test set, 4 chunks of 512 tokens (`tools/perplexity.py --ctx 512 --chunks 4`). Lower is better, and it is only comparable between files of the same model. Speed comes from `ml_bench -n 128` (128 prompt tokens, then 128 decoded tokens). The
|
| 33 |
|
| 34 |
## Run
|
| 35 |
|
| 36 |
-
Download a [release](https://github.com/JonPark0/krafla/releases) of Krafla (version 0.
|
| 37 |
|
| 38 |
```sh
|
| 39 |
curl -LO https://huggingface.co/jonpark0/SmolLM2-360M-Instruct-krafla/resolve/main/SmolLM2-360M-Instruct-Q4_0.mlb
|
| 40 |
curl -LO https://huggingface.co/jonpark0/SmolLM2-360M-Instruct-krafla/resolve/main/tokenizer.mlt
|
| 41 |
./ml_run SmolLM2-360M-Instruct-Q4_0.mlb -z tokenizer.mlt --chat smollm -t 4
|
|
|
|
|
|
|
|
|
|
| 42 |
```
|
| 43 |
|
|
|
|
|
|
|
| 44 |
The release's `ml_run` runs the most capable build your CPU supports. A greedy one-turn reply from `SmolLM2-360M-Instruct-Q4_0.mlb` to "What is the capital of France? Answer in one sentence.":
|
| 45 |
|
| 46 |
```text
|
|
@@ -49,12 +54,12 @@ The capital of France is Paris.
|
|
| 49 |
|
| 50 |
## How these files were made
|
| 51 |
|
| 52 |
-
With Krafla 0.
|
| 53 |
|
| 54 |
```sh
|
| 55 |
python3 tools/convert_tokenizer.py SmolLM2-360M-Instruct/tokenizer.json tokenizer.mlt
|
| 56 |
-
python3 tools/convert.py hf SmolLM2-360M-Instruct SmolLM2-360M-Instruct-Q4_0.mlb --wtype q4
|
| 57 |
-
python3 tools/convert.py hf SmolLM2-360M-Instruct SmolLM2-360M-Instruct-Q8_0.mlb --wtype q8
|
| 58 |
```
|
| 59 |
|
| 60 |
Q4_0 and Q8_0 keep one scale per block of 32 weights (f16 scales: 4.5 and 8.5 bits per weight). See the [user guide](https://github.com/JonPark0/krafla/blob/main/docs/user-guide.md#q8-q4-or-mixed) for the formats and [the comparison with llama.cpp](https://github.com/JonPark0/krafla/blob/main/docs/benchmarks.md).
|
|
|
|
| 25 |
|
| 26 |
| File | Weights | Size | Perplexity | Prefill | Decode | SHA-256 |
|
| 27 |
|------|---------|-----:|-----------:|--------:|-------:|---------|
|
| 28 |
+
| `SmolLM2-360M-Instruct-Q4_0.mlb` | Q4_0, every matrix 4-bit | 194 MiB | 21.73 | 758 tok/s | 173.6 tok/s | `1b6c4f2992bfa579`… |
|
| 29 |
+
| `SmolLM2-360M-Instruct-Q8_0.mlb` | Q8_0, every matrix 8-bit | 367 MiB | 17.45 | 510 tok/s | 90.2 tok/s | `410bd0a3daade795`… |
|
| 30 |
| `tokenizer.mlt` | tokenizer | 1138 KiB | | | | `02f356d659655d21`… |
|
| 31 |
|
| 32 |
+
Measured on a GitHub runner (AMD EPYC 9V45 96-Core Processor, 4 threads) with Krafla's `avx2` build. Perplexity is measured on the wikitext-2 test set, 4 chunks of 512 tokens (`tools/perplexity.py --ctx 512 --chunks 4`). Lower is better, and it is only comparable between files of the same model. Speed comes from `ml_bench -n 128` (128 prompt tokens, then 128 decoded tokens). The full hashes are in `SHA256SUMS`.
|
| 33 |
|
| 34 |
## Run
|
| 35 |
|
| 36 |
+
Download a [release](https://github.com/JonPark0/krafla/releases) of Krafla (version 0.8.0 or later; Linux x86-64, AArch64 and ARMv7, Windows x86-64) and two files from here:
|
| 37 |
|
| 38 |
```sh
|
| 39 |
curl -LO https://huggingface.co/jonpark0/SmolLM2-360M-Instruct-krafla/resolve/main/SmolLM2-360M-Instruct-Q4_0.mlb
|
| 40 |
curl -LO https://huggingface.co/jonpark0/SmolLM2-360M-Instruct-krafla/resolve/main/tokenizer.mlt
|
| 41 |
./ml_run SmolLM2-360M-Instruct-Q4_0.mlb -z tokenizer.mlt --chat smollm -t 4
|
| 42 |
+
|
| 43 |
+
# or serve it with the OpenAI API at http://127.0.0.1:8080/v1
|
| 44 |
+
./ml_server SmolLM2-360M-Instruct-Q4_0.mlb -z tokenizer.mlt --chat smollm -t 4
|
| 45 |
```
|
| 46 |
|
| 47 |
+
The files record the model's 8192-position context. `ml_run` and `ml_server` use 4096 positions of it unless you pass `--ctx N`, which sets the size of the KV cache.
|
| 48 |
+
|
| 49 |
The release's `ml_run` runs the most capable build your CPU supports. A greedy one-turn reply from `SmolLM2-360M-Instruct-Q4_0.mlb` to "What is the capital of France? Answer in one sentence.":
|
| 50 |
|
| 51 |
```text
|
|
|
|
| 54 |
|
| 55 |
## How these files were made
|
| 56 |
|
| 57 |
+
With Krafla 0.8.0 (commit [`0b527a0`](https://github.com/JonPark0/krafla/commit/0b527a04aebd4234ed3c2197bfbb0248a1628ac7)) on 2026-11-03, from the safetensors of [HuggingFaceTB/SmolLM2-360M-Instruct](https://huggingface.co/HuggingFaceTB/SmolLM2-360M-Instruct):
|
| 58 |
|
| 59 |
```sh
|
| 60 |
python3 tools/convert_tokenizer.py SmolLM2-360M-Instruct/tokenizer.json tokenizer.mlt
|
| 61 |
+
python3 tools/convert.py hf SmolLM2-360M-Instruct SmolLM2-360M-Instruct-Q4_0.mlb --wtype q4
|
| 62 |
+
python3 tools/convert.py hf SmolLM2-360M-Instruct SmolLM2-360M-Instruct-Q8_0.mlb --wtype q8
|
| 63 |
```
|
| 64 |
|
| 65 |
Q4_0 and Q8_0 keep one scale per block of 32 weights (f16 scales: 4.5 and 8.5 bits per weight). See the [user guide](https://github.com/JonPark0/krafla/blob/main/docs/user-guide.md#q8-q4-or-mixed) for the formats and [the comparison with llama.cpp](https://github.com/JonPark0/krafla/blob/main/docs/benchmarks.md).
|
SHA256SUMS
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
02f356d659655d214e96ceb64af2f6adc1df3a1c51c04b8543e2e15957736c1b tokenizer.mlt
|
|
|
|
| 1 |
+
1b6c4f2992bfa579a2419b7d3a9b8710d7a3f81a73667889aba1393d31d97d4c SmolLM2-360M-Instruct-Q4_0.mlb
|
| 2 |
+
410bd0a3daade7957ec2fe11460bdb6c1fb57caf3e3b1bf4540ad0214ea1b2ef SmolLM2-360M-Instruct-Q8_0.mlb
|
| 3 |
02f356d659655d214e96ceb64af2f6adc1df3a1c51c04b8543e2e15957736c1b tokenizer.mlt
|
SmolLM2-360M-Instruct-Q4_0.mlb
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 203739136
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1b6c4f2992bfa579a2419b7d3a9b8710d7a3f81a73667889aba1393d31d97d4c
|
| 3 |
size 203739136
|
SmolLM2-360M-Instruct-Q8_0.mlb
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 384618496
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:410bd0a3daade7957ec2fe11460bdb6c1fb57caf3e3b1bf4540ad0214ea1b2ef
|
| 3 |
size 384618496
|