From a867b919ca1e26cc828f98c35b4c6926e8e54762 Mon Sep 17 00:00:00 2001 From: Kawrakow Date: Sat, 21 Dec 2024 08:32:39 +0100 Subject: IQ2_XS_R4 (#155) * iq2_xs_r4: Zen4 * iq2_xs_r4: AVX2 * iq2_xs_r4: slightly better matrix x vector on AVX2 * iq2_xs_r4: NEON - not much better than iq2_xs * iq2_xs_r4: slightly better NEON --------- Co-authored-by: Iwan Kawrakow --- ggml/src/ggml-common.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ggml/src/ggml-common.h') diff --git a/ggml/src/ggml-common.h b/ggml/src/ggml-common.h index ad21dd50..2534b461 100644 --- a/ggml/src/ggml-common.h +++ b/ggml/src/ggml-common.h @@ -412,6 +412,13 @@ typedef struct { } block_iq2_xs; static_assert(sizeof(block_iq2_xs) == sizeof(ggml_half) + QK_K/8*sizeof(uint16_t) + QK_K/32, "wrong iq2_xs block size/padding"); +typedef struct { + ggml_half d[4]; + uint16_t qs[QK_K/2]; + uint8_t scales[QK_K/8]; +} block_iq2_xs_r4; +static_assert(sizeof(block_iq2_xs_r4) == 4*sizeof(block_iq2_xs), "wrong iq2_xs_r4 block size/padding"); + // 2.5625 bpw quants typedef struct { ggml_half d; -- cgit v1.2.3