llama.cpp. See #30715Quantization test results for K2-Horizon-7B (dense) and LFM2.5-8B-A1B (MoE), comparing standard llama.cpp quantization against a fork that adds five new non-linear super-block types: JQ2_K to JQ6_K.
For reference, an additional comparison is included against Iwan Kawrakow's ik_llama.cpp, who created many quantization types, including the IQ*_K family on which JQ*_K is built.
On both models, four of the five new types perform materially better than their counterpart on all four distribution metrics (mean and 99% KLD, Δp RMS, top-1 agreement). JQ2_K is the exception. The size of the gain depends on the model: on the dense K2-Horizon-7B, JQ3_K and JQ6_K cut the mean KLD by more than half, while on the MoE LFM2.5-8B-A1B the improvements range from 14.7% to 29.6%.
| Standard → fork | File size | Mean KLD | 99% KLD | Δp RMS | Top-1 agree |
|---|---|---|---|---|---|
| Q2_K → JQ2_K | −4.9% | +26.2% | +14.7% | +10.6% | −2.86 pp |
| Q3_K → JQ3_K | same | −57.6% | −50.9% | −34.5% | +6.74 pp |
| Q4_K → JQ4_K | same | −22.5% | −19.9% | −11.3% | +0.80 pp |
| Q5_K → JQ5_K | same | −21.6% | −15.4% | −10.8% | +0.44 pp |
| Q6_K → JQ6_K | +0.7% | −60.2% | −52.9% | −36.3% | +1.33 pp |
| Standard → fork | File size | Mean KLD | 99% KLD | Δp RMS | Top-1 agree |
|---|---|---|---|---|---|
| Q2_K → JQ2_K | −8.6% | +5.0% | +2.8% | +2.5% | −0.74 pp |
| Q3_K → JQ3_K | same | −22.7% | −16.6% | −11.4% | +3.09 pp |
| Q4_K → JQ4_K | same | −14.7% | −15.5% | −10.0% | +1.57 pp |
| Q5_K → JQ5_K | same | −16.3% | −14.9% | −9.1% | +1.27 pp |
| Q6_K → JQ6_K | +0.9% | −29.6% | −33.2% | −15.5% | +1.80 pp |
The five new types are non-linear (NL) super-block (K) types. Each new type spends exactly the same index payload as its K-quant counterpart:
| Type | Block | Bits/weight | Bytes per 256 weights | Payload + metadata | Codebook levels | K-quant counterpart |
|---|---|---|---|---|---|---|
| JQ2_K | 256 | 2.3750 | 76 | 64 + 12 | 4 | Q2_K: 84 bytes (64 + 20) |
| JQ3_K | 256 | 3.4375 | 110 | 96 + 14 | 8 | Q3_K: 110 bytes (96 + 14) |
| JQ4_K | 256 | 4.5000 | 144 | 128 + 16 | 16 | Q4_K: 144 bytes (128 + 16) |
| JQ5_K | 256 | 5.5000 | 176 | 160 + 16 | 32 | Q5_K: 176 bytes (160 + 16) |
| JQ6_K | 256 | 6.6250 | 212 | 192 + 20 | 64 | Q6_K: 210 bytes (192 + 18) |
JQ3_K, JQ4_K and JQ5_K files are therefore exactly as large as their K-quant counterparts.
JQ3_K, JQ4_K and JQ5_KThese three are direct replacements of their K counterparts: same super-block, same bytes per block, same file. With the quant recipe, imatrix and quantization parameters all fixed and equal, the quality difference comes solely from the quant format. The new types are superior on all four distribution metrics at all three levels on both models and also have lower PPL at all levels except JQ5_K on K2-Horizon-7B and JQ4_K on LFM2.5-8B-A1B:
| Metric | Q3_K | JQ3_K | Q4_K | JQ4_K | Q5_K | JQ5_K |
|---|---|---|---|---|---|---|
| Size (GiB) | 4.81 | 4.81 | 5.67 | 5.67 | 6.48 | 6.48 |
| PPL Δ% vs F16 | +17.17% | +6.13% | +1.62% | +1.57% | +0.39% | +0.49% |
| Mean KLD | 0.179783 | 0.076225 (−57.6%) | 0.023664 | 0.018340 (−22.5%) | 0.007991 | 0.006262 (−21.6%) |
| 99% KLD | 1.228516 | 0.603327 (−50.9%) | 0.189978 | 0.152199 (−19.9%) | 0.070236 | 0.059408 (−15.4%) |
| Δp RMS | 10.888% | 7.132% (−34.5%) | 3.895% | 3.456% (−11.3%) | 2.290% | 2.043% (−10.8%) |
| Top-1 agree | 80.049% | 86.786% (+6.74 pp) | 92.714% | 93.509% (+0.80 pp) | 95.910% | 96.351% (+0.44 pp) |
| Metric | Q3_K | JQ3_K | Q4_K | JQ4_K | Q5_K | JQ5_K |
|---|---|---|---|---|---|---|
| Size (GiB) | 3.55 | 3.55 | 4.56 | 4.56 | 5.52 | 5.52 |
| PPL Δ% vs F16 | +15.45% | +9.16% | +2.94% | +3.14% | +3.39% | +0.52% |
| Mean KLD | 0.459857 | 0.355572 (−22.7%) | 0.179660 | 0.153322 (−14.7%) | 0.100963 | 0.084535 (−16.3%) |
| 99% KLD | 2.428714 | 2.025684 (−16.6%) | 1.116902 | 0.944142 (−15.5%) | 0.682244 | 0.580662 (−14.9%) |
| Δp RMS | 13.015% | 11.528% (−11.4%) | 8.270% | 7.443% (−10.0%) | 6.131% | 5.575% (−9.1%) |
| Top-1 agree | 68.059% | 71.146% (+3.09 pp) | 78.821% | 80.386% (+1.57 pp) | 84.104% | 85.370% (+1.27 pp) |
On K2-Horizon-7B, JQ3_K is the standout. At the same 4.81 GiB it cuts the mean KLD of Q3_K from 0.1798 to 0.0762 (−57.6%) and the PPL penalty from +17.17% to +6.13%. That reduction is now larger than the whole step from Q2_K to Q3_K (−52.1% mean KLD), which costs 673 MiB. JQ3_K is also faster on Metal in generation and the combined test: tg128 67.01 vs 50.74 t/s (+32.1%) and pp1024+tg1024 104.61 vs 88.77 t/s (+17.8%), while pp512 is marginally slower at 641.92 vs 660.66 t/s (−2.8%).
JQ4_K and JQ5_K gain less, but still improve the KLD metrics consistently: −22.5% and −21.6% mean KLD, −19.9% and −15.4% at the 99th percentile, and 11% fewer top-1 changes for both.
On LFM2.5-8B-A1B the gains are smaller but still material, with JQ3_K again ahead on mean KLD: −22.7%, −14.7% and −16.3% mean KLD, −16.6%, −15.5% and −14.9% at the 99th percentile, and 10%, 7% and 8% fewer top-1 changes for JQ3_K, JQ4_K and JQ5_K. JQ3_K and JQ5_K also lower the PPL penalty, JQ5_K most of all (+0.52% vs +3.39%); JQ4_K is marginally higher (+3.14% vs +2.94%).
JQ6_K: two extra bytes, much lower KLDAmong the five JQ types, JQ6_K is the only one that is larger than its counterpart: 212 against 210 bytes per super-block. That is +0.95% on the block tensors but only +0.69% (+51.75 MiB) on the K2-Horizon-7B file and +0.91% (+61.13 MiB) on the LFM2.5-8B-A1B file, but in exchange:
| Metric | Q6_K | JQ6_K | Change |
|---|---|---|---|
| Size (MiB) | 7515.27 | 7567.02 | +0.69% |
| Mean PPL(Q) | 8.986763 | 8.949834 | −0.41% |
| Mean KLD | 0.004711 | 0.001876 | −60.2% |
| 99% KLD | 0.040452 | 0.019065 | −52.9% |
| Δp RMS | 1.746% | 1.113% | −36.3% |
| Top-1 agree | 96.778% | 98.110% | +1.33 pp |
| Metric | Q6_K | JQ6_K | Change |
|---|---|---|---|
| Size (MiB) | 6690.06 | 6751.19 | +0.91% |
| Mean PPL(Q) | 32.267404 | 32.396592 | +0.40% |
| Mean KLD | 0.063226 | 0.044528 | −29.6% |
| 99% KLD | 0.487119 | 0.325636 | −33.2% |
| Δp RMS | 4.880% | 4.124% | −15.5% |
| Top-1 agree | 87.589% | 89.390% | +1.80 pp |
JQ3_K more than halves the error of Q3_K at the same size on K2-Horizon-7B. Both are 4.81 GiB; mean KLD is 0.0762 vs 0.1798 (−57.6%), PPL +6.13% vs +17.17% over F16, top-1 agreement 86.79% vs 80.05%, and it is faster on Metal for generation and the combined test (tg128 +32.1%, pp1024+tg1024 +17.8%), with pp512 marginally slower (−2.8%). On LFM2.5-8B-A1B the improvement is −22.7%, with a lower PPL as well (+9.16% vs +15.45%).JQ4_K and JQ5_K improve on both models. Same file sizes as Q4_K and Q5_K, −22.5% and −21.6% mean KLD on K2-Horizon-7B, −14.7% and −16.3% on LFM2.5-8B-A1B, and better on the other distribution metrics (99% KLD, Δp RMS and top-1 agreement).JQ6_K achieves a large KLD reduction for 2 extra bytes per super-block. On K2-Horizon-7B, +52 MiB (+0.7%) gets −60.2% mean KLD, more than the 880 MiB step from Q5_K to Q6_K (−41.0%). On LFM2.5-8B-A1B, +61 MiB (+0.9%) gets −29.6%, the largest cut of the five types there, against −37.4% for the 1,039 MiB step from Q5_K to Q6_K.JQ2_K is the exception. It is 4.9% smaller than Q2_K on K2-Horizon-7B and 8.6% smaller on LFM2.5-8B-A1B, but its mean KLD is 26.2% and 5.0% higher, and it runs 2.1–11.0% slower on K2-Horizon-7B and 0.8–3.9% slower on LFM2.5-8B-A1B.K2-Horizon-7B) and one 8.5B MoE checkpoint (LFM2.5-8B-A1B, 32 experts, 4 active per token), one imatrix calibration corpus (combined_eur_medium), one KLD corpus (275 and 287 chunks of 1024 tokens respectively) and one benchmark machine. The new types win on both architectures, but the size of the gain varies widely between them (JQ3_K: −57.6% vs −22.7% mean KLD). Whilst further testing remains necessary, these enhancements are expected to generalise effectively across all architectures.JQ2_K loses to Q2_K. It is the only JQ*_K type with a higher KLD than its Q*_K counterpart. On K2-Horizon-7B the gap is clear: mean KLD 0.4734 vs 0.3752 (+26.2%), PPL +50.89% vs +37.85% over F16 and top-1 agreement 2.86 pp lower, and its 99% KLD is also worse (3.26 vs 2.84). On LFM2.5-8B-A1B it is also clear-cut on KLD: mean KLD 1.1060 vs 1.0538 (+5.0%), 99% KLD 4.95 vs 4.81 and top-1 agreement 52.25% vs 53.00%, although its PPL is now better (+106.12% vs +111.51%). It is also smaller (76 vs 84 bytes per super-block), so the comparison is not like-for-like.llama-bench; Q/JQ rows on MTL,BLAS, 12 threads): only 8 of the 30 Q-vs-JQ test pairs are faster. On K2-Horizon-7B, JQ3_K is the only type that gains on more than one test: tg128 +32.1% and pp1024+tg1024 +17.8%, with pp512 marginally slower (−2.8%). JQ4_K is faster on pp512 (+3.2%) but 14.9–21.0% slower on the other two. JQ2_K is 2.1–11.0% slower (pp512 −2.1%, tg128 −6.6%, pp1024+tg1024 −11.0%), JQ6_K 12.1–17.8% slower (pp512 −12.1%, tg128 −17.8%, pp1024+tg1024 −14.6%), and JQ5_K is mixed (pp512 −7.2%, tg128 −1.3%, pp1024+tg1024 +2.1%). On LFM2.5-8B-A1B, JQ3_K is faster on all three tests (pp512 +8.9%, tg128 +20.7%, pp1024+tg1024 +12.9%), while JQ5_K is mixed (pp512 −16.2%, tg128 −4.1%, pp1024+tg1024 +11.3%). JQ2_K is 0.8–3.9% slower, JQ4_K 0.3–9.6% and JQ6_K 5.2–15.5% across the three tests. The IQ rows use a different runtime configuration (Metal backend, 999 threads) from the Q/JQ rows (MTL,BLAS, 12 threads), so IQ timings are not directly comparable and are excluded from this Q-vs-JQ comparison.Lower is better for every quality metric except Top-1; in the throughput benchmarks, higher t/s is better.
Columns prefixed S· describe the standard (naive) llama.cpp build, IK· describe the ik_llama.cpp implementation of the original IQ*_K types, and F· describe the fork build. IK is Iwan Kawrakow's original IQ*_K implementation from ik_llama.cpp, distinct from the standard Q*_K types and the fork's JQ*_K types.
The IQ rows use the separate ik_llama.cpp imatrix (imatrix-<MODEL>-ik-medium.dat), not the medium.gguf imatrix used for the Q*_K and JQ*_K rows; quality metrics use the same evaluation corpus and settings, but a three-way comparison is not a controlled same-imatrix comparison. IQ .md dumps do not include Total BPW, so † marks BPW estimated from the tensor-data and total element count; the IQ tensor geometry is identical to the corresponding JQ files.
| S·Type | S·BPW | S·GiB | S·PPL | S·PPL Δ% | S·KLD | F·Type | F·BPW | F·GiB | F·PPL | F·PPL Δ% | F·KLD |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Q2_K | 3.9663 | 4.16 | 12.3359 | +37.85% | 0.375191 | JQ2_K | 3.7734 | 3.95 | 13.5032 | +50.89% | 0.473375 |
| Q3_K | 4.5934 | 4.81 | 10.4854 | +17.17% | 0.179783 | JQ3_K | 4.5934 | 4.81 | 9.4972 | +6.13% | 0.076225 |
| Q4_K | 5.4135 | 5.67 | 9.0934 | +1.62% | 0.023664 | JQ4_K | 5.4135 | 5.67 | 9.0896 | +1.57% | 0.018340 |
| Q5_K | 6.1853 | 6.48 | 8.9841 | +0.39% | 0.007991 | JQ5_K | 6.1853 | 6.48 | 8.9927 | +0.49% | 0.006262 |
| Q6_K | 7.0054 | 7.34 | 8.9868 | +0.42% | 0.004711 | JQ6_K | 7.0536 | 7.39 | 8.9498 | +0.01% | 0.001876 |
IK (ik_llama.cpp) compact comparison:
| IK·Type | IK·BPW† | IK·GiB | IK·PPL | IK·PPL Δ% | IK·KLD |
|---|---|---|---|---|---|
| IQ2_K | 3.7734† | 3.95 | 22.6709 | +153.34% | 1.017524 |
| IQ3_K | 4.5934† | 4.81 | 13.8316 | +54.56% | 0.489512 |
| IQ4_K | 5.4135† | 5.67 | 12.2366 | +36.74% | 0.362861 |
| IQ5_K | 6.1853† | 6.48 | 11.9611 | +33.66% | 0.339210 |
| IQ6_K | 7.0536† | 7.39 | 11.9688 | +33.75% | 0.339336 |
| S·Type | S·BPW | S·GiB | S·PPL | S·PPL Δ% | S·KLD | F·Type | F·BPW | F·GiB | F·PPL | F·PPL Δ% | F·KLD |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Q2_K | 2.8126 | 2.77 | 68.4498 | +111.51% | 1.053805 | JQ2_K | 2.5704 | 2.53 | 66.7061 | +106.12% | 1.105977 |
| Q3_K | 3.5998 | 3.55 | 37.3621 | +15.45% | 0.459857 | JQ3_K | 3.5998 | 3.55 | 35.3257 | +9.16% | 0.355572 |
| Q4_K | 4.6292 | 4.56 | 33.3155 | +2.94% | 0.179660 | JQ4_K | 4.6292 | 4.56 | 33.3791 | +3.14% | 0.153322 |
| Q5_K | 5.5980 | 5.52 | 33.4581 | +3.39% | 0.100963 | JQ5_K | 5.5980 | 5.52 | 32.5311 | +0.52% | 0.084535 |
| Q6_K | 6.6274 | 6.53 | 32.2674 | −0.29% | 0.063226 | JQ6_K | 6.6880 | 6.59 | 32.3966 | +0.11% | 0.044528 |
IK (ik_llama.cpp) compact comparison:
| IK·Type | IK·BPW† | IK·GiB | IK·PPL | IK·PPL Δ% | IK·KLD |
|---|---|---|---|---|---|
| IQ2_K | 2.5704† | 2.53 | 68.6059 | +111.99% | 1.124348 |
| IQ3_K | 3.5998† | 3.55 | 35.6893 | +10.28% | 0.358280 |
| IQ4_K | 4.6292† | 4.56 | 32.4356 | +0.23% | 0.157572 |
| IQ5_K | 5.5980† | 5.52 | 32.8191 | +1.41% | 0.088242 |
| IQ6_K | 6.6880† | 6.59 | 32.4290 | +0.21% | 0.051450 |
Bold marks the better value of each standard/fork pair in the compact S/F table, and the best value within each bit-level group (standard, ik_llama.cpp and fork) in the extended metrics below. The IK compact table is informational and is not bolded. The Summary and section 1. Advantage's tables remain Q*_K-vs-JQ*_K comparisons. The Q3_K, Q4_K and Q5_K groups compare files of identical size.
| Impl | Type | BPW | Size (GiB) | % of F16 | Mean PPL(Q) | Mean KLD | 99% KLD | Δp RMS | Top-1 agree |
|---|---|---|---|---|---|---|---|---|---|
| - | F16 | 16.0005 | 16.76 | 100.0% | 8.948840 ± 0.060298 | - | - | - | - |
| naive | Q2_K | 3.9663 | 4.16 | 24.8% | 12.335921 ± 0.087249 | 0.375191 ± 0.001469 | 2.838279 | 16.599% | 72.615% |
| ik_llama | IQ2_K | 3.7734† | 3.95 | 23.6% | 22.670910 ± 0.175995 | 1.017524 ± 0.002852 | 5.316588 | 26.853% | 55.787% |
| fork | JQ2_K | 3.7734 | 3.95 | 23.6% | 13.503178 ± 0.098170 | 0.473375 ± 0.001686 | 3.256867 | 18.355% | 69.755% |
| naive | Q3_K | 4.5934 | 4.81 | 28.7% | 10.485448 ± 0.072574 | 0.179783 ± 0.000712 | 1.228516 | 10.888% | 80.049% |
| ik_llama | IQ3_K | 4.5934† | 4.81 | 28.7% | 13.831612 ± 0.098944 | 0.489512 ± 0.001635 | 3.024201 | 18.921% | 67.972% |
| fork | JQ3_K | 4.5934 | 4.81 | 28.7% | 9.497192 ± 0.064853 | 0.076225 ± 0.000367 | 0.603327 | 7.132% | 86.786% |
| naive | Q4_K | 5.4135 | 5.67 | 33.8% | 9.093417 ± 0.061560 | 0.023664 ± 0.000143 | 0.189978 | 3.895% | 92.714% |
| ik_llama | IQ4_K | 5.4135† | 5.67 | 33.8% | 12.236603 ± 0.085990 | 0.362861 ± 0.001343 | 2.506904 | 16.197% | 72.482% |
| fork | JQ4_K | 5.4135 | 5.67 | 33.8% | 9.089596 ± 0.061587 | 0.018340 ± 0.000106 | 0.152199 | 3.456% | 93.509% |
| naive | Q5_K | 6.1853 | 6.48 | 38.7% | 8.984055 ± 0.060647 | 0.007991 ± 0.000102 | 0.070236 | 2.290% | 95.910% |
| ik_llama | IQ5_K | 6.1853† | 6.48 | 38.7% | 11.961096 ± 0.083401 | 0.339210 ± 0.001271 | 2.358847 | 15.700% | 73.282% |
| fork | JQ5_K | 6.1853 | 6.48 | 38.7% | 8.992700 ± 0.060732 | 0.006262 ± 0.000076 | 0.059408 | 2.043% | 96.351% |
| naive | Q6_K | 7.0054 | 7.34 | 43.8% | 8.986763 ± 0.060700 | 0.004711 ± 0.000071 | 0.040452 | 1.746% | 96.778% |
| ik_llama | IQ6_K | 7.0536† | 7.39 | 44.1% | 11.968832 ± 0.083822 | 0.339336 ± 0.001287 | 2.373700 | 15.555% | 73.398% |
| fork | JQ6_K | 7.0536 | 7.39 | 44.1% | 8.949834 ± 0.060341 | 0.001876 ± 0.000053 | 0.019065 | 1.113% | 98.110% |
| Impl | Type | BPW | Size (GiB) | % of F16 | Mean PPL(Q) | Mean KLD | 99% KLD | Δp RMS | Top-1 agree |
|---|---|---|---|---|---|---|---|---|---|
| - | F16 | 16.0031 | 15.78 | 100.0% | 32.362599 ± 0.291884 | - | - | - | - |
| naive | Q2_K | 2.8126 | 2.77 | 17.6% | 68.449767 ± 0.658693 | 1.053805 ± 0.002617 | 4.812137 | 20.916% | 52.997% |
| ik_llama | IQ2_K | 2.5704† | 2.53 | 16.1% | 68.605937 ± 0.655357 | 1.124348 ± 0.002750 | 5.083462 | 22.056% | 52.188% |
| fork | JQ2_K | 2.5704 | 2.53 | 16.1% | 66.706129 ± 0.633849 | 1.105977 ± 0.002702 | 4.945737 | 21.435% | 52.253% |
| naive | Q3_K | 3.5998 | 3.55 | 22.5% | 37.362115 ± 0.342800 | 0.459857 ± 0.001352 | 2.428714 | 13.015% | 68.059% |
| ik_llama | IQ3_K | 3.5998† | 3.55 | 22.5% | 35.689279 ± 0.322820 | 0.358280 ± 0.001126 | 2.023443 | 11.548% | 71.167% |
| fork | JQ3_K | 3.5998 | 3.55 | 22.5% | 35.325712 ± 0.319600 | 0.355572 ± 0.001118 | 2.025684 | 11.528% | 71.146% |
| naive | Q4_K | 4.6292 | 4.56 | 28.9% | 33.315517 ± 0.299281 | 0.179660 ± 0.000644 | 1.116902 | 8.270% | 78.821% |
| ik_llama | IQ4_K | 4.6292† | 4.56 | 28.9% | 32.435577 ± 0.293834 | 0.157572 ± 0.000587 | 0.985711 | 7.612% | 80.204% |
| fork | JQ4_K | 4.6292 | 4.56 | 28.9% | 33.379113 ± 0.302856 | 0.153322 ± 0.000583 | 0.944142 | 7.443% | 80.386% |
| naive | Q5_K | 5.5980 | 5.52 | 35.0% | 33.458078 ± 0.304305 | 0.100963 ± 0.000449 | 0.682244 | 6.131% | 84.104% |
| ik_llama | IQ5_K | 5.5980† | 5.52 | 35.0% | 32.819070 ± 0.297018 | 0.088242 ± 0.000409 | 0.594148 | 5.736% | 85.072% |
| fork | JQ5_K | 5.5980 | 5.52 | 35.0% | 32.531092 ± 0.293625 | 0.084535 ± 0.000399 | 0.580662 | 5.575% | 85.370% |
| naive | Q6_K | 6.6274 | 6.53 | 41.4% | 32.267404 ± 0.290971 | 0.063226 ± 0.000335 | 0.487119 | 4.880% | 87.589% |
| ik_llama | IQ6_K | 6.6880† | 6.59 | 41.8% | 32.429003 ± 0.292682 | 0.051450 ± 0.000249 | 0.361608 | 4.394% | 88.496% |
| fork | JQ6_K | 6.6880 | 6.59 | 41.8% | 32.396592 ± 0.292383 | 0.044528 ± 0.000237 | 0.325636 | 4.124% | 89.390% |
In the benchmark tables below, Q and JQ rows were benchmarked on MTL,BLAS with 12 threads, whereas IQ rows were run on Metal with 999 threads. The two groups are therefore not directly comparable, and IQ timings should not be used to rank throughput against Q or JQ.
| model | size | params | backend | threads | test | t/s |
|---|---|---|---|---|---|---|
| k2-horizon 7B Q2_K - Medium | 4.16 GiB | 9.00 B | MTL,BLAS | 12 | pp512 | 895.39 ± 5.61 |
| k2-horizon 7B Q2_K - Medium | 4.16 GiB | 9.00 B | MTL,BLAS | 12 | tg128 | 88.79 ± 2.91 |
| k2-horizon 7B Q2_K - Medium | 4.16 GiB | 9.00 B | MTL,BLAS | 12 | pp1024+tg1024 | 148.28 ± 3.67 |
| k2-horizon 7B JQ2_K - 2.375 bpw | 3.95 GiB | 9.00 B | MTL,BLAS | 12 | pp512 | 876.96 ± 1.14 |
| k2-horizon 7B JQ2_K - 2.375 bpw | 3.95 GiB | 9.00 B | MTL,BLAS | 12 | tg128 | 82.97 ± 2.20 |
| k2-horizon 7B JQ2_K - 2.375 bpw | 3.95 GiB | 9.00 B | MTL,BLAS | 12 | pp1024+tg1024 | 131.98 ± 4.78 |
| k2-horizon 7B IQ2_K - 2.375 bpw | 3.95 GiB | 9.00 B | Metal | 999 | pp512 | 418.36 ± 4.71 |
| k2-horizon 7B IQ2_K - 2.375 bpw | 3.95 GiB | 9.00 B | Metal | 999 | tg128 | 33.35 ± 0.17 |
| k2-horizon 7B IQ2_K - 2.375 bpw | 3.95 GiB | 9.00 B | Metal | 999 | pp1024+tg1024 | 59.77 ± 1.96 |
| k2-horizon 7B Q3_K - Medium | 4.81 GiB | 9.00 B | MTL,BLAS | 12 | pp512 | 660.66 ± 0.97 |
| k2-horizon 7B Q3_K - Medium | 4.81 GiB | 9.00 B | MTL,BLAS | 12 | tg128 | 50.74 ± 2.79 |
| k2-horizon 7B Q3_K - Medium | 4.81 GiB | 9.00 B | MTL,BLAS | 12 | pp1024+tg1024 | 88.77 ± 1.99 |
| k2-horizon 7B JQ3_K - 3.4375 bpw | 4.81 GiB | 9.00 B | MTL,BLAS | 12 | pp512 | 641.92 ± 11.39 |
| k2-horizon 7B JQ3_K - 3.4375 bpw | 4.81 GiB | 9.00 B | MTL,BLAS | 12 | tg128 | 67.01 ± 0.68 |
| k2-horizon 7B JQ3_K - 3.4375 bpw | 4.81 GiB | 9.00 B | MTL,BLAS | 12 | pp1024+tg1024 | 104.61 ± 1.53 |
| k2-horizon 7B IQ3_K - 3.4325 bpw | 4.81 GiB | 9.00 B | Metal | 999 | pp512 | 413.46 ± 2.43 |
| k2-horizon 7B IQ3_K - 3.4325 bpw | 4.81 GiB | 9.00 B | Metal | 999 | tg128 | 27.99 ± 0.12 |
| k2-horizon 7B IQ3_K - 3.4325 bpw | 4.81 GiB | 9.00 B | Metal | 999 | pp1024+tg1024 | 51.66 ± 0.39 |
| k2-horizon 7B Q4_K - Medium | 5.67 GiB | 9.00 B | MTL,BLAS | 12 | pp512 | 759.46 ± 79.07 |
| k2-horizon 7B Q4_K - Medium | 5.67 GiB | 9.00 B | MTL,BLAS | 12 | tg128 | 77.35 ± 2.23 |
| k2-horizon 7B Q4_K - Medium | 5.67 GiB | 9.00 B | MTL,BLAS | 12 | pp1024+tg1024 | 132.24 ± 0.52 |
| k2-horizon 7B JQ4_K - 4.5 bpw | 5.67 GiB | 9.00 B | MTL,BLAS | 12 | pp512 | 783.63 ± 80.03 |
| k2-horizon 7B JQ4_K - 4.5 bpw | 5.67 GiB | 9.00 B | MTL,BLAS | 12 | tg128 | 61.11 ± 3.74 |
| k2-horizon 7B JQ4_K - 4.5 bpw | 5.67 GiB | 9.00 B | MTL,BLAS | 12 | pp1024+tg1024 | 112.56 ± 2.40 |
| k2-horizon 7B IQ4_K - 4.5 bpw | 5.67 GiB | 9.00 B | Metal | 999 | pp512 | 430.89 ± 9.74 |
| k2-horizon 7B IQ4_K - 4.5 bpw | 5.67 GiB | 9.00 B | Metal | 999 | tg128 | 27.10 ± 4.93 |
| k2-horizon 7B IQ4_K - 4.5 bpw | 5.67 GiB | 9.00 B | Metal | 999 | pp1024+tg1024 | 52.45 ± 9.17 |
| k2-horizon 7B Q5_K - Medium | 6.48 GiB | 9.00 B | MTL,BLAS | 12 | pp512 | 816.64 ± 4.00 |
| k2-horizon 7B Q5_K - Medium | 6.48 GiB | 9.00 B | MTL,BLAS | 12 | tg128 | 56.27 ± 4.82 |
| k2-horizon 7B Q5_K - Medium | 6.48 GiB | 9.00 B | MTL,BLAS | 12 | pp1024+tg1024 | 97.81 ± 0.56 |
| k2-horizon 7B JQ5_K - 5.5 bpw | 6.48 GiB | 9.00 B | MTL,BLAS | 12 | pp512 | 758.00 ± 53.87 |
| k2-horizon 7B JQ5_K - 5.5 bpw | 6.48 GiB | 9.00 B | MTL,BLAS | 12 | tg128 | 55.54 ± 2.40 |
| k2-horizon 7B JQ5_K - 5.5 bpw | 6.48 GiB | 9.00 B | MTL,BLAS | 12 | pp1024+tg1024 | 99.84 ± 0.48 |
| k2-horizon 7B IQ5_K - 5.5 bpw | 6.48 GiB | 9.00 B | Metal | 999 | pp512 | 401.33 ± 2.12 |
| k2-horizon 7B IQ5_K - 5.5 bpw | 6.48 GiB | 9.00 B | Metal | 999 | tg128 | 28.37 ± 0.05 |
| k2-horizon 7B IQ5_K - 5.5 bpw | 6.48 GiB | 9.00 B | Metal | 999 | pp1024+tg1024 | 50.57 ± 0.72 |
| k2-horizon 7B Q6_K | 7.34 GiB | 9.00 B | MTL,BLAS | 12 | pp512 | 868.57 ± 0.86 |
| k2-horizon 7B Q6_K | 7.34 GiB | 9.00 B | MTL,BLAS | 12 | tg128 | 59.50 ± 2.72 |
| k2-horizon 7B Q6_K | 7.34 GiB | 9.00 B | MTL,BLAS | 12 | pp1024+tg1024 | 103.57 ± 1.03 |
| k2-horizon 7B JQ6_K - 6.625 bpw | 7.39 GiB | 9.00 B | MTL,BLAS | 12 | pp512 | 763.46 ± 28.91 |
| k2-horizon 7B JQ6_K - 6.625 bpw | 7.39 GiB | 9.00 B | MTL,BLAS | 12 | tg128 | 48.88 ± 1.94 |
| k2-horizon 7B JQ6_K - 6.625 bpw | 7.39 GiB | 9.00 B | MTL,BLAS | 12 | pp1024+tg1024 | 88.47 ± 0.25 |
| k2-horizon 7B IQ6_K - 6.6 bpw | 7.39 GiB | 9.00 B | Metal | 999 | pp512 | 407.70 ± 6.91 |
| k2-horizon 7B IQ6_K - 6.6 bpw | 7.39 GiB | 9.00 B | Metal | 999 | tg128 | 26.32 ± 0.10 |
| k2-horizon 7B IQ6_K - 6.6 bpw | 7.39 GiB | 9.00 B | Metal | 999 | pp1024+tg1024 | 48.54 ± 0.28 |
| model | size | params | backend | threads | test | t/s |
|---|---|---|---|---|---|---|
| lfm2moe 8B.A1B Q2_K - Medium | 2.77 GiB | 8.47 B | MTL,BLAS | 12 | pp512 | 3654.31 ± 38.63 |
| lfm2moe 8B.A1B Q2_K - Medium | 2.77 GiB | 8.47 B | MTL,BLAS | 12 | tg128 | 268.64 ± 0.57 |
| lfm2moe 8B.A1B Q2_K - Medium | 2.77 GiB | 8.47 B | MTL,BLAS | 12 | pp1024+tg1024 | 494.37 ± 2.94 |
| lfm2moe 8B.A1B JQ2_K - 2.375 bpw | 2.53 GiB | 8.47 B | MTL,BLAS | 12 | pp512 | 3623.51 ± 12.40 |
| lfm2moe 8B.A1B JQ2_K - 2.375 bpw | 2.53 GiB | 8.47 B | MTL,BLAS | 12 | tg128 | 258.23 ± 3.43 |
| lfm2moe 8B.A1B JQ2_K - 2.375 bpw | 2.53 GiB | 8.47 B | MTL,BLAS | 12 | pp1024+tg1024 | 478.63 ± 1.43 |
| lfm2moe 8B.A1B IQ2_K - 2.375 bpw | 2.79 GiB | 8.73 B | Metal | 999 | pp512 | 1383.37 ± 48.50 |
| lfm2moe 8B.A1B IQ2_K - 2.375 bpw | 2.79 GiB | 8.73 B | Metal | 999 | tg128 | 34.32 ± 4.54 |
| lfm2moe 8B.A1B IQ2_K - 2.375 bpw | 2.79 GiB | 8.73 B | Metal | 999 | pp1024+tg1024 | 65.12 ± 0.19 |
| lfm2moe 8B.A1B Q3_K - Medium | 3.55 GiB | 8.47 B | MTL,BLAS | 12 | pp512 | 3021.59 ± 129.34 |
| lfm2moe 8B.A1B Q3_K - Medium | 3.55 GiB | 8.47 B | MTL,BLAS | 12 | tg128 | 186.09 ± 0.72 |
| lfm2moe 8B.A1B Q3_K - Medium | 3.55 GiB | 8.47 B | MTL,BLAS | 12 | pp1024+tg1024 | 347.82 ± 5.40 |
| lfm2moe 8B.A1B JQ3_K - 3.4375 bpw | 3.55 GiB | 8.47 B | MTL,BLAS | 12 | pp512 | 3291.17 ± 19.43 |
| lfm2moe 8B.A1B JQ3_K - 3.4375 bpw | 3.55 GiB | 8.47 B | MTL,BLAS | 12 | tg128 | 224.52 ± 0.52 |
| lfm2moe 8B.A1B JQ3_K - 3.4375 bpw | 3.55 GiB | 8.47 B | MTL,BLAS | 12 | pp1024+tg1024 | 392.75 ± 20.49 |
| lfm2moe 8B.A1B IQ3_K - 3.4325 bpw | 3.81 GiB | 8.73 B | Metal | 999 | pp512 | 1348.17 ± 21.76 |
| lfm2moe 8B.A1B IQ3_K - 3.4325 bpw | 3.81 GiB | 8.73 B | Metal | 999 | tg128 | 33.40 ± 6.36 |
| lfm2moe 8B.A1B IQ3_K - 3.4325 bpw | 3.81 GiB | 8.73 B | Metal | 999 | pp1024+tg1024 | 58.73 ± 1.38 |
| lfm2moe 8B.A1B Q4_K - Medium | 4.56 GiB | 8.47 B | MTL,BLAS | 12 | pp512 | 3541.57 ± 73.25 |
| lfm2moe 8B.A1B Q4_K - Medium | 4.56 GiB | 8.47 B | MTL,BLAS | 12 | tg128 | 245.69 ± 0.62 |
| lfm2moe 8B.A1B Q4_K - Medium | 4.56 GiB | 8.47 B | MTL,BLAS | 12 | pp1024+tg1024 | 453.08 ± 1.02 |
| lfm2moe 8B.A1B JQ4_K - 4.5 bpw | 4.56 GiB | 8.47 B | MTL,BLAS | 12 | pp512 | 3251.63 ± 30.80 |
| lfm2moe 8B.A1B JQ4_K - 4.5 bpw | 4.56 GiB | 8.47 B | MTL,BLAS | 12 | tg128 | 244.87 ± 0.80 |
| lfm2moe 8B.A1B JQ4_K - 4.5 bpw | 4.56 GiB | 8.47 B | MTL,BLAS | 12 | pp1024+tg1024 | 409.52 ± 0.72 |
| lfm2moe 8B.A1B IQ4_K - 4.5 bpw | 4.82 GiB | 8.73 B | Metal | 999 | pp512 | 1305.31 ± 99.27 |
| lfm2moe 8B.A1B IQ4_K - 4.5 bpw | 4.82 GiB | 8.73 B | Metal | 999 | tg128 | 34.92 ± 6.67 |
| lfm2moe 8B.A1B IQ4_K - 4.5 bpw | 4.82 GiB | 8.73 B | Metal | 999 | pp1024+tg1024 | 61.38 ± 0.08 |
| lfm2moe 8B.A1B Q5_K - Medium | 5.52 GiB | 8.47 B | MTL,BLAS | 12 | pp512 | 3309.30 ± 7.20 |
| lfm2moe 8B.A1B Q5_K - Medium | 5.52 GiB | 8.47 B | MTL,BLAS | 12 | tg128 | 205.70 ± 6.15 |
| lfm2moe 8B.A1B Q5_K - Medium | 5.52 GiB | 8.47 B | MTL,BLAS | 12 | pp1024+tg1024 | 321.63 ± 2.74 |
| lfm2moe 8B.A1B JQ5_K - 5.5 bpw | 5.52 GiB | 8.47 B | MTL,BLAS | 12 | pp512 | 2771.83 ± 204.68 |
| lfm2moe 8B.A1B JQ5_K - 5.5 bpw | 5.52 GiB | 8.47 B | MTL,BLAS | 12 | tg128 | 197.17 ± 0.34 |
| lfm2moe 8B.A1B JQ5_K - 5.5 bpw | 5.52 GiB | 8.47 B | MTL,BLAS | 12 | pp1024+tg1024 | 357.92 ± 7.33 |
| lfm2moe 8B.A1B IQ5_K - 5.5 bpw | 5.78 GiB | 8.73 B | Metal | 999 | pp512 | 1335.50 ± 11.06 |
| lfm2moe 8B.A1B IQ5_K - 5.5 bpw | 5.78 GiB | 8.73 B | Metal | 999 | tg128 | 32.75 ± 7.22 |
| lfm2moe 8B.A1B IQ5_K - 5.5 bpw | 5.78 GiB | 8.73 B | Metal | 999 | pp1024+tg1024 | 56.65 ± 3.03 |
| lfm2moe 8B.A1B Q6_K | 6.53 GiB | 8.47 B | MTL,BLAS | 12 | pp512 | 3551.82 ± 9.55 |
| lfm2moe 8B.A1B Q6_K | 6.53 GiB | 8.47 B | MTL,BLAS | 12 | tg128 | 207.73 ± 0.58 |
| lfm2moe 8B.A1B Q6_K | 6.53 GiB | 8.47 B | MTL,BLAS | 12 | pp1024+tg1024 | 368.13 ± 6.37 |
| lfm2moe 8B.A1B JQ6_K - 6.625 bpw | 6.59 GiB | 8.47 B | MTL,BLAS | 12 | pp512 | 3000.53 ± 79.88 |
| lfm2moe 8B.A1B JQ6_K - 6.625 bpw | 6.59 GiB | 8.47 B | MTL,BLAS | 12 | tg128 | 196.99 ± 0.85 |
| lfm2moe 8B.A1B JQ6_K - 6.625 bpw | 6.59 GiB | 8.47 B | MTL,BLAS | 12 | pp1024+tg1024 | 332.41 ± 18.05 |
| lfm2moe 8B.A1B IQ6_K - 6.6 bpw | 6.85 GiB | 8.73 B | Metal | 999 | pp512 | 1277.95 ± 41.01 |
| lfm2moe 8B.A1B IQ6_K - 6.6 bpw | 6.85 GiB | 8.73 B | Metal | 999 | tg128 | 31.00 ± 6.93 |
| lfm2moe 8B.A1B IQ6_K - 6.6 bpw | 6.85 GiB | 8.73 B | Metal | 999 | pp1024+tg1024 | 53.65 ± 0.37 |
| Metric | Source |
|---|---|
| PPL, KLD, Δp, top-1 | <model>/scores/*.ppx |
| Tensor geometry & model metadata | <model>/scores/*.md |
| Per-tensor activation statistics | <model>/scores/*.itx |
llama-quantize --pure --token-embedding-type q8_0 --output-tensor-type q8_0 --imatrix imatrix/imatrix-<MODEL>-medium.gguf <MODEL>-F16.gguf <MODEL>-<TYPE>.gguf <TYPE>
llama-perplexity --model <MODEL>-<TYPE>.gguf -f ../../datasets/evaluations/wikitext-2-raw/wiki.test.raw --kl-divergence-base logits/<MODEL>.logits --kl-divergence --log-file scores/<MODEL>-<TYPE>.ppx --gpu-layers 999 --ctx-size 1024 --batch-size 4096 --ubatch-size 1024
llama-bench --model <MODEL>-<TYPE>.gguf -pg 1024,1024 --n-gpu-layers 999
<MODEL> is K2-Horizon-7B or LFM2.5-8B-A1B.
<TYPE> is Q2_K, JQ2_K, Q3_K, JQ3_K, Q4_K, JQ4_K, Q5_K, JQ5_K, Q6_K, JQ6_K
IFM/K2-Horizon-7B