File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2405,11 +2405,12 @@ struct test_set_rows : public test_case {
24052405 // which is roughly 0.25 times the number of elements.
24062406 double err_estimate = 1 .0f /8 .0f ;
24072407 if (type == GGML_TYPE_IQ2_NL ) {
2408- // iq2_nl has only 4 non-linear levels (coarsest quant) so we increase error estimate
2408+ // Using iq4_nl as reference, iq2_nl has only 4 non-linear levels (coarsest quant)
2409+ // so we increase error estimate to keep the same ratio (4 non-linear levels * 4.0f)
24092410 err_estimate *= 4 .0f ;
24102411 }
24112412 if (type == GGML_TYPE_IQ3_NL ) {
2412- // iq3_nl has 8 non-linear levels: coarser than the 16-level iq4_nl
2413+ // iq3_nl has 8 non-linear levels: coarser than the 16-level iq4_nl (8 non-linear levels * 2.0f)
24132414 err_estimate *= 2 .0f ;
24142415 }
24152416 if (type == GGML_TYPE_Q5_0 || type == GGML_TYPE_Q5_1 ) {
You can’t perform that action at this time.
0 commit comments