Please note that these models
cannot
be used with standard
llama.cpp
. See [TBD]
Quantization test results for
K2-Horizon-7B
, comparing standard
llama.cpp
quantization against a
fork
that adds five new non-linear super-block types:
IQ2_K
to
IQ6_K
.
Summary
The five new types are non-linear (NL) super-block (K) types. Each one splits a super-block into 16 sub-blocks of 16 weights, gives every sub-block a signed scale under one fp16 super-block scale, maps every index through a non-linear codebook, and stores one phase bit per sub-block that shifts that sub-block's codebook by a fixed step. 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
IQ2_K
256
2.3750
76
64 + 12
4
Q2_K: 84 bytes (64 + 20)
IQ3_K
256
3.4375
110
96 + 14
8
Q3_K: 110 bytes (96 + 14)
IQ4_K
256
4.5000
144
128 + 16
16
Q4_K: 144 bytes (128 + 16)
IQ5_K
256
5.5000
176
160 + 16
32
Q5_K: 176 bytes (160 + 16)
IQ6_K
256
6.6250
212
192 + 20
64
Q6_K: 210 bytes (192 + 18)
IQ3_K
,
IQ4_K
and
IQ5_K
files are therefore exactly as large as their K-quant counterparts:
IQ2_K
is 8 bytes per super-block smaller than
Q2_K
, and
IQ6_K
is 2 bytes larger than
Q6_K
. Measured against the F16 reference:
Standard → fork
File size
Mean KLD
99% KLD
Δp RMS
Top-1 agree
Q2_K → IQ2_K
−4.9%
+18.5%
+11.4%
+6.4%
−1.87 pp
Q3_K → IQ3_K
same
−51.3%
−44.1%
−30.5%
+5.88 pp
Q4_K → IQ4_K
same
−20.3%
−18.4%
−11.1%
+0.73 pp
Q5_K → IQ5_K
same
−17.1%
−19.7%
−8.4%
+0.35 pp
Q6_K → IQ6_K
+0.7%
−55.7%
−53.9%
−33.4%
+1.02 pp
Four of the five new types perform better than their counterpart on every quality metric.
IQ2_K
is the exception.
1. Benefits
a) Same bytes, lower error:
IQ3_K
,
IQ4_K
and
IQ5_K
These three are size-for-size replacements: same super-block, same bytes per block, same file size to the byte. On
K2-Horizon-7B
, with the recipe, imatrix and the quantization parameters all fixed, the whole quality difference comes solely from the format, proving the new types to be superior on every metric at all three levels:
Metric
Q3_K
IQ3_K
Q4_K
IQ4_K
Q5_K
IQ5_K
Size (GiB)
4.81
4.81
5.67
5.67
6.48
6.48
PPL Δ% vs F16
+17.17%
+6.97%
+1.62%
+1.36%
+0.39%
+0.35%
Mean KLD
0.179783
0.087475
(−51.3%)
0.023664
0.018850
(−20.3%)
0.007991
0.006624
(−17.1%)
99% KLD
1.228516
0.686483
(−44.1%)
0.189978
0.155113
(−18.4%)
0.070236
0.056387
(−19.7%)
Δp RMS
10.888%
7.563%
(−30.5%)
3.895%
3.462%
(−11.1%)
2.290%
2.097%
(−8.4%)
Top-1 agree
80.049%
85.928%
(+5.88 pp)
92.714%
93.439%
(+0.73 pp)
95.910%
96.260%
(+0.35 pp)
IQ3_K
is the standout.
At the same 4.81 GiB it halves the mean KLD of
Q3_K
and cuts the PPL penalty from +17.17% to +6.97%. That gain is almost as large as the whole step from
Q2_K
to
Q3_K
(−52.1% mean KLD), which costs 673 MiB.
IQ3_K
is also faster on Metal:
tg128
65.49 vs 39.40 t/s (+66.2%) and
pp1024+tg1024
105.44 vs 84.28 t/s (+25.1%).
IQ4_K
and
IQ5_K
gain less, but consistently:
−20.3% and −17.1% mean KLD, −18.4% and −19.7% at the 99th percentile, and 10% and 9% fewer top-1 changes.
b)
IQ6_K
: less than half the KLD of
Q6_K
IQ6_K
is the only type 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 file. In exchange:
Metric
Q6_K
IQ6_K
Change
Size (MiB)
7515.27
7567.02
+0.69%
Mean PPL(Q)
8.986763
8.963099
−0.26%
Mean KLD
0.004711
0.002085
−55.7%
99% KLD
0.040452
0.018637
−53.9%
Δp RMS
1.746%
1.163%
−33.4%
Top-1 agree
96.778%
97.795%
+1.02 pp
Key Takeaways
IQ3_K
halves the error of
Q3_K
at the same size.
Both are 4.81 GiB; mean KLD is 0.0875 vs 0.1798 (
−51.3%
), PPL +6.97% vs +17.17% over F16, top-1 agreement 85.93% vs 80.05%, and
tg128
is 66% faster on Metal.
IQ4_K
and
IQ5_K
also improve.
Same file sizes as
Q4_K
and
Q5_K
,
−20.3%
and
−17.1%
mean KLD, and better on every other quality metric.
IQ6_K
outperforms
Q6_K
by more than
Q6_K
beats
Q5_K
.
+52 MiB (+0.7%) buys
−55.7%
mean KLD; the step from
Q5_K
to
Q6_K
costs 880 MiB for −41.0%.
IQ2_K
is the exception.
It is 4.9% smaller than
Q2_K
, but its mean KLD is 18.5% higher and it runs about 20% slower.
2. Disadvantages
IQ2_K
loses to
Q2_K
.
It is the only type that is worse than its counterpart: mean KLD 0.4447 vs 0.3752 (+18.5%), PPL +46.44% vs +37.85% over F16, 99% KLD 3.16 vs 2.84. It is also smaller (76 vs 84 bytes per super-block), so the comparison is not like-for-like.
Throughput is mixed
(
llama-bench
, Metal, 12 threads). Only
IQ3_K
is clearly faster than its counterpart.
IQ2_K
is about 20% slower on all three tests (
pp512
−22.3%,
tg128
−20.2%,
pp1024+tg1024
−18.4%).
IQ6_K
is about 10% slower (
pp512
−9.7%,
pp1024+tg1024
−11.4%), and
IQ4_K
is 10.4% slower on
pp1024+tg1024
.
IQ5_K
is roughly even (
pp512
−4.0%,
pp1024+tg1024
+4.3%).
Quantization is 2–10× slower.
Wall-clock time with 16 threads:
IQ2_K
86.8 s vs 39.9 s for
Q2_K
(2.2×),
IQ3_K
155.3 s vs 15.6 s (9.9×),
IQ4_K
167.0 s vs 33.6 s (5.0×),
IQ5_K
201.8 s vs 37.6 s (5.4×) and
IQ6_K
117.1 s vs 14.0 s (8.4×). However, it is a one-off cost per model.
Single architecture, single model.
Every conclusion here is drawn from one 9B dense checkpoint, one calibration corpus (imatrix), one KLD corpus (275 chunks of 1024 tokens) and one benchmark machine.
3. Comparative Performance Tables
Lower is better for every metric except
Top-1
.
Columns prefixed
S·
describe the standard (naive) build; columns prefixed
F·
describe the fork build.
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
IQ2_K
3.7734
3.95
13.1046
+46.44%
0.444733
Q3_K
4.5934
4.81
10.4854
+17.17%
0.179783
IQ3_K
4.5934
4.81
9.5729
+6.97%
0.087475
Q4_K
5.4135
5.67
9.0934
+1.62%
0.023664
IQ4_K
5.4135
5.67
9.0705
+1.36%
0.018850
Q5_K
6.1853
6.48
8.9841
+0.39%
0.007991
IQ5_K
6.1853
6.48
8.9804
+0.35%
0.006624
Q6_K
7.0054
7.34
8.9868
+0.42%
0.004711
IQ6_K
7.0536
7.39
8.9631
+0.16%
0.002085
Bold marks the better value of each standard/fork pair, here and in the extended metrics below. Rows 2–4 compare files of identical size.
IQ2_K-IQ6_K-Test-Models huggingface.co is an AI model on huggingface.co that provides IQ2_K-IQ6_K-Test-Models's model effect (), which can be used instantly with this eaddario IQ2_K-IQ6_K-Test-Models model. huggingface.co supports a free trial of the IQ2_K-IQ6_K-Test-Models model, and also provides paid use of the IQ2_K-IQ6_K-Test-Models. Support call IQ2_K-IQ6_K-Test-Models model through api, including Node.js, Python, http.
IQ2_K-IQ6_K-Test-Models huggingface.co is an online trial and call api platform, which integrates IQ2_K-IQ6_K-Test-Models's modeling effects, including api services, and provides a free online trial of IQ2_K-IQ6_K-Test-Models, you can try IQ2_K-IQ6_K-Test-Models online for free by clicking the link below.
eaddario IQ2_K-IQ6_K-Test-Models online free url in huggingface.co:
IQ2_K-IQ6_K-Test-Models is an open source model from GitHub that offers a free installation service, and any user can find IQ2_K-IQ6_K-Test-Models on GitHub to install. At the same time, huggingface.co provides the effect of IQ2_K-IQ6_K-Test-Models install, users can directly use IQ2_K-IQ6_K-Test-Models installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
IQ2_K-IQ6_K-Test-Models install url in huggingface.co: