diff options
author | Kawrakow <iwankawrakow@gmail.com> | 2024-12-18 13:29:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-18 13:29:25 +0100 |
commit | 59d742b00fb48a3704f86c16afbb6b4ebcde8e68 (patch) | |
tree | ed95493397cc9ea45b8f8d897d1200d0b3588a86 /ggml/src/ggml-common.h | |
parent | 9b6d14a2991da41af4aa7ef64a712c63b73ad9fe (diff) |
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 <iwan.kawrakow@gmail.com>
Diffstat (limited to 'ggml/src/ggml-common.h')
-rw-r--r-- | ggml/src/ggml-common.h | 10 |
1 files changed, 10 insertions, 0 deletions
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 @@ -585,6 +585,16 @@ typedef struct { 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; int8_t scales[QK_K/16]; |