From 59d742b00fb48a3704f86c16afbb6b4ebcde8e68 Mon Sep 17 00:00:00 2001 From: Kawrakow Date: Wed, 18 Dec 2024 13:29:25 +0100 Subject: IQ5_K_R4 (#149) * iq5_k_r4: Zen4 Much slower than the others. * iq5_k_r5: WIP * Minor * iq5_k_r4: fix AVX2 nrc_y = 1 case * iq5_k_r4: better Zen4 But TG is still slower than iq5_k * iq5_k_r4: slightly better AVX2 * iq5_k_r4: NEON --------- Co-authored-by: Iwan Kawrakow --- ggml/src/ggml-common.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ggml/src/ggml-common.h') diff --git a/ggml/src/ggml-common.h b/ggml/src/ggml-common.h index 03cc3460..0af461c7 100644 --- a/ggml/src/ggml-common.h +++ b/ggml/src/ggml-common.h @@ -584,6 +584,16 @@ typedef struct { } block_iq5_k; static_assert(sizeof(block_iq5_k) == sizeof(ggml_half) + sizeof(uint16_t) + QK_K/2 + QK_K/8 + 3*QK_K/64, "wrong iq5_k block size/padding"); +typedef struct { + ggml_half d[4]; + uint8_t extra[8]; + uint8_t scales_h[QK_K/16]; + uint8_t scales_l[QK_K/8 ]; + uint8_t qs[QK_K*2]; + uint8_t qh[QK_K/2]; +} block_iq5_k_r4; +static_assert(sizeof(block_iq5_k_r4) == 4*sizeof(block_iq5_k), "wrong iq5_k_r4 block size/padding"); + typedef struct { ggml_half d; uint16_t extra; -- cgit v1.2.3