Sakura — K2-Horizon-0.9B (GGUF, three sizes)
K2-Horizon-0.9B is the smallest member of IFM's open K2-Horizon family: a tiny decoder-only reasoning and agent model with a long context window (Apache-2.0, fully open training data and recipe). This repository holds three GGUF files of different size made from the BF16 weights with our measured mixed-codec method. Pick one on the Files page; the table below says what each file is.
Independent community quantization, not an official IFM (MBZUAI Institute of Foundation Models) release. Part of the Sakura Mini line.
Needs the IFM K2-Horizon llama.cpp fork for now. The K2Horizon architecture is not in mainline llama.cpp yet (feature request #29424, pull request #29535 still open); use branch model/K2Horizon of MBZUAI-IFM/llama.cpp, same as IFM's own GGUF files. This card will be updated when upstream support lands.
Quality at a glance
Same method, same texts, same machine for every file; lower KL divergence means closer to the BF16 original:
Sakura-K2-Horizon-0.9B-0.40GiB.gguf vs llama.cpp default IQ3_XXS (0.42 GiB): KL divergence to the BF16 original 14 % higher on average over all 3 texts (0.02 GiB smaller).
Sakura-K2-Horizon-0.9B-0.58GiB.gguf vs llama.cpp default IQ4_XS (0.57 GiB): KL divergence to the BF16 original 29 % higher on average over all 3 texts (0.01 GiB larger).
Sakura-K2-Horizon-0.9B-0.63GiB.gguf vs IFM official Q4_K_M (0.62 GiB): KL divergence to the BF16 original 61 % lower on average over all 3 texts (0.01 GiB larger).
Why: the bit budget per tensor is allocated from measured sensitivity (see How it was made), not from fixed rules. Full table below.
Which file should I take?
| File |
For |
Sakura-K2-Horizon-0.9B-0.40GiB.gguf (0.40 GiB, 3.21 bpw) |
smallest: for tight memory budgets; expect visible quality loss |
Sakura-K2-Horizon-0.9B-0.58GiB.gguf (0.57 GiB, 4.58 bpw) |
middle: best balance of size and quality for most machines |
Sakura-K2-Horizon-0.9B-0.63GiB.gguf (0.63 GiB, 5.00 bpw) |
largest: closest to the BF16 original of the three |
The three files
| File |
Size |
bits/weight |
KLD en |
KLD dev |
KLD wiki |
same top token (avg) |
Tensor types by size |
Sakura-K2-Horizon-0.9B-0.40GiB.gguf |
0.40 GiB |
3.21 |
0.2340 |
0.1780 |
0.3978 |
78.3 % |
IQ3_XXS 57%, IQ2_S 14%, Q8_0 11%, Q3_K 10%, Q2_K 6% |
Sakura-K2-Horizon-0.9B-0.58GiB.gguf |
0.57 GiB |
4.58 |
0.0397 |
0.0292 |
0.0667 |
91.0 % |
IQ4_XS 64%, Q4_K 15%, Q5_K 11%, Q8_0 8% |
Sakura-K2-Horizon-0.9B-0.63GiB.gguf |
0.63 GiB |
5.00 |
0.0299 |
0.0220 |
0.0547 |
91.9 % |
IQ4_XS 42%, Q5_K 32%, Q6_K 13%, Q8_0 7%, Q4_K 6% |
"Tensor types by size" lists the share of the file's bytes per ggml type (all are standard llama.cpp types, so the files run in stock llama.cpp). Quality columns: mean KL divergence of the quantized model's next-token distribution against the BF16 source on held-out text (lower is better) and how often the most likely token is unchanged (higher is better).
Comparison at similar size
Same texts, same context, same chunks, measured by us with llama-perplexity (BF16 source = reference; PPL of the BF16 model: en: 2.029, dev: 1.893, wiki: 15.449). The reference quants are: llama.cpp default recipe, same importance matrix (ours), measured the same way. Sorted by size.
| Quant |
Source |
Size |
KLD en |
KLD dev |
KLD wiki |
PPL en |
same top token (avg) |
Sakura-K2-Horizon-0.9B-0.40GiB.gguf |
this repository |
0.40 GiB |
0.2340 |
0.1780 |
0.3978 |
2.519 |
78.3 % |
| IQ3_XXS |
llama.cpp default recipe, same importance matrix (ours) |
0.42 GiB |
0.2215 |
0.1670 |
0.3065 |
2.519 |
81.2 % |
| IQ4_XS |
llama.cpp default recipe, same importance matrix (ours) |
0.57 GiB |
0.0293 |
0.0256 |
0.0483 |
2.067 |
92.4 % |
Sakura-K2-Horizon-0.9B-0.58GiB.gguf |
this repository |
0.58 GiB |
0.0397 |
0.0292 |
0.0667 |
2.085 |
91.0 % |
| IFM official Q4_K_M |
IFM (official) |
0.62 GiB |
0.0847 |
0.0732 |
0.1077 |
2.166 |
88.1 % |
Sakura-K2-Horizon-0.9B-0.63GiB.gguf |
this repository |
0.63 GiB |
0.0299 |
0.0220 |
0.0547 |
2.069 |
91.9 % |
| IFM official Q5_K_M |
IFM (official) |
0.72 GiB |
0.0219 |
0.0202 |
0.0288 |
2.078 |
93.0 % |
Method: 12 chunks of 512 tokens per text; texts: English held-out text, developer-text held-out set, English encyclopedia held-out text (not used in any calibration). Single measurement on one machine; small KLD differences at similar size are not a quality ranking.
How it was made
- The BF16 GGUF is IFM's official file from IFM/K2-Horizon-0.9B-GGUF (unchanged); the importance matrix was computed by us (
llama-imatrix).
- Every large weight matrix was quantized once per candidate type (Q2_K, IQ2_S, IQ3_XXS, IQ3_S, Q3_K, IQ4_XS, Q4_K, Q5_K, Q6_K, Q8_0) with
llama-quantize and the importance matrix; the error of each choice was estimated per matrix (importance-weighted) and scaled by a sensitivity factor measured with real KL divergence: every group of tensors (for example the FFN down projections, the attention value projections, the first and last layers) was moved alone to a lower-bit type, and the KL divergence it caused was compared with its quantization error.
- An exact budget allocation (multiple-choice knapsack over bytes) picked one type per matrix for each target size; the final model was assembled from the stored tensors without re-quantizing.
The per-tensor choices are public, see Tensor allocation below. Norms, small tensors and the multi-token-prediction layers stay at high precision.
Tensor allocation
The type of every tensor is public: allocation.json lists type and size per tensor and file (the GGUF headers show the same). Summary per tensor group (number of tensors per ggml type):
| Tensor group |
K2-Horizon-0.9B-0.40GiB |
K2-Horizon-0.9B-0.58GiB |
K2-Horizon-0.9B-0.63GiB |
token_embd |
IQ2_S ×1 |
IQ4_XS ×1 |
IQ4_XS ×1 |
output |
Q3_K ×1 |
Q5_K ×1 |
Q5_K ×1 |
attn_q |
Q2_K ×25, IQ2_S ×3 |
Q4_K ×28 |
Q4_K ×22, Q6_K ×6 |
attn_k |
Q8_0 ×28 |
Q8_0 ×28 |
Q8_0 ×28 |
attn_v |
Q8_0 ×28 |
Q8_0 ×28 |
Q8_0 ×28 |
attn_output |
IQ2_S ×24, Q4_K ×4 |
Q4_K ×24, Q6_K ×4 |
Q6_K ×27, Q4_K ×1 |
ffn_gate |
IQ3_XXS ×28 |
IQ4_XS ×28 |
IQ4_XS ×28 |
ffn_up |
IQ3_XXS ×28 |
IQ4_XS ×28 |
IQ4_XS ×17, Q5_K ×11 |
ffn_down |
IQ3_XXS ×26, IQ2_XXS ×2 |
IQ4_XS ×26, IQ2_XXS ×1, Q2_K ×1 |
Q5_K ×16, IQ4_XS ×10, IQ2_XXS ×1, Q2_K ×1 |
calibration.json holds the measured sensitivity factors (or the rules) that the allocation used.
Limits
- Measured only with KL divergence and perplexity on short held-out texts and not with downstream benchmarks; do not read it as a task-quality claim.
- Quantization always costs some quality; the smallest file costs the most.
- Requires the IFM K2-Horizon llama.cpp fork until upstream support lands: the
K2Horizon architecture is not yet in mainline llama.cpp (see feature request #29424 and pull request #29535); use the branch model/K2Horizon of MBZUAI-IFM/llama.cpp. All numbers on this card were measured with that fork (Vulkan backend; CPU and Vulkan agree to 0.2 % perplexity on our check).
- The model uses the
<|ifm|im_start|> chat format with a thinking block; the chat template is embedded in the GGUF.
Credits