From e56061fa12e5fcb7a9a8fa5fca9e74c20d166bcc Mon Sep 17 00:00:00 2001 From: Kawrakow Date: Wed, 11 Jun 2025 11:12:30 +0300 Subject: IQ2_XXS: much faster CPU prompt processing (#515) * Much faster iq2_xxs GEMM PP-512 = 290 t/s vs ~110 t/s (iq2_xxs) or 148 t/s (iq2_xxs_r4) on main. * iq2_xxs: q8_2_x4 GEMM * iq2_xxs: use template for q8_2_x4 GEMM * Fix AVX2 * Cleanup * NEON is not working yet, so still use Q8_K GEMM --------- Co-authored-by: Iwan Kawrakow --- ggml/src/ggml.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ggml/src/ggml.c') diff --git a/ggml/src/ggml.c b/ggml/src/ggml.c index 3ff294cc..9e3c4b90 100644 --- a/ggml/src/ggml.c +++ b/ggml/src/ggml.c @@ -1067,7 +1067,11 @@ static const ggml_type_traits_t type_traits[GGML_TYPE_COUNT] = { .from_float = quantize_row_iq2_xxs, .from_float_ref = (ggml_from_float_t)quantize_row_iq2_xxs_ref, .vec_dot = ggml_vec_dot_iq2_xxs_q8_K, +#ifdef __AVX2__ + .vec_dot_type = GGML_TYPE_Q8_2_X4, +#else .vec_dot_type = GGML_TYPE_Q8_K, +#endif .nrows = 1, .row_meta_size = 0, }, -- cgit v1.2.3