diff options
author | Kawrakow <iwankawrakow@gmail.com> | 2024-12-21 08:32:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-21 08:32:39 +0100 |
commit | a867b919ca1e26cc828f98c35b4c6926e8e54762 (patch) | |
tree | ff03d259c375e17dfbf4b0bf3488be08a9cc2738 /ggml/src/ggml-common.h | |
parent | 4b53bc876eda6d89890711998b3ab5bf033b2199 (diff) |
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 <iwan.kawrakow@gmail.com>
Diffstat (limited to 'ggml/src/ggml-common.h')
-rw-r--r-- | ggml/src/ggml-common.h | 7 |
1 files changed, 7 insertions, 0 deletions
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; |