TinyLlama-1.1B-Chat-v1.0 for Krafla
INT4 and INT8 conversions of TinyLlama/TinyLlama-1.1B-Chat-v1.0 for Krafla, a dependency-free C11 runtime for CPU-only inference on x86-64 (SSE2 up to AVX-512 VNNI) and ARM (ARMv7 NEON up to i8mm and SVE).
Files
| File | Weights | Size | Perplexity | Prefill | Decode | SHA-256 |
|---|---|---|---|---|---|---|
TinyLlama-1.1B-Chat-v1.0-Q4_0.mlb |
Q4_0, every matrix 4-bit | 590 MiB | 10.56 | 192 tok/s | 52.4 tok/s | ef3f05a958e6144c… |
TinyLlama-1.1B-Chat-v1.0-Q4_0-mixed.mlb |
Q4_0 with v,o,down in Q8_0 |
761 MiB | 10.36 | 157 tok/s | 44.8 tok/s | 6a413251e8a86f20… |
TinyLlama-1.1B-Chat-v1.0-Q8_0.mlb |
Q8_0, every matrix 8-bit | 1115 MiB | 10.31 | 117 tok/s | 31.8 tok/s | 4b9a51a513811f8d… |
tokenizer.mlt |
tokenizer | 1079 KiB | a7b4a92b635df2a1… |
Measured on a GitHub runner (AMD EPYC 9V74 80-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.
Run
Download a release of Krafla (version 0.9.1 or later; Linux x86-64, AArch64 and ARMv7, Windows x86-64) and two files from here:
curl -LO https://huggingface.co/jonpark0/TinyLlama-1.1B-Chat-v1.0-krafla/resolve/main/TinyLlama-1.1B-Chat-v1.0-Q4_0.mlb
curl -LO https://huggingface.co/jonpark0/TinyLlama-1.1B-Chat-v1.0-krafla/resolve/main/tokenizer.mlt
./ml_run TinyLlama-1.1B-Chat-v1.0-Q4_0.mlb -z tokenizer.mlt --chat zephyr -t 4
# or serve it with the OpenAI API at http://127.0.0.1:8080/v1
./ml_server TinyLlama-1.1B-Chat-v1.0-Q4_0.mlb -z tokenizer.mlt --chat zephyr -t 4
The files record the model's 2048-position context.
The release's ml_run runs the most capable build your CPU supports. A greedy one-turn reply from TinyLlama-1.1B-Chat-v1.0-Q4_0.mlb to "What is the capital of France? Answer in one sentence.":
The capital of France is Paris.
How these files were made
With Krafla 0.9.1 (commit 767d005) on 2026-11-09, from the safetensors of TinyLlama/TinyLlama-1.1B-Chat-v1.0:
python3 tools/convert_tokenizer.py TinyLlama-1.1B-Chat-v1.0/tokenizer.json tokenizer.mlt
python3 tools/convert.py hf TinyLlama-1.1B-Chat-v1.0 TinyLlama-1.1B-Chat-v1.0-Q4_0.mlb --wtype q4
python3 tools/convert.py hf TinyLlama-1.1B-Chat-v1.0 TinyLlama-1.1B-Chat-v1.0-Q4_0-mixed.mlb --wtype q4 --q8 v,o,down
python3 tools/convert.py hf TinyLlama-1.1B-Chat-v1.0 TinyLlama-1.1B-Chat-v1.0-Q8_0.mlb --wtype q8
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 for the formats and the comparison with llama.cpp.
License
The license of the original model, apache-2.0, applies (copied in this repository).
Model tree for jonpark0/TinyLlama-1.1B-Chat-v1.0-krafla
Base model
TinyLlama/TinyLlama-1.1B-Chat-v1.0