diff options
author | Kawrakow <iwankawrakow@gmail.com> | 2025-07-02 09:27:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-02 09:27:47 +0200 |
commit | 3248a3599275c3d2a98bc41d512e1d3ba66e32ba (patch) | |
tree | 14bdaae22a6db922aa9eb0a7131141da81dfd251 /ggml/src/ggml-common.h | |
parent | 46f2e5d249568b6395d17a80feb2ba9ab48156e5 (diff) |
Adding IQ3_KS quants (#566)
* iq3_ks: basics
* iq3_ks: CUDA dequantize
* iq3_ks: CUDA mmvq
* iq3_ks: mmq
* iq3_ks: faster mmq
* iq3_ks: Zen4
* iq3_ks: AVX2 convert to q8_k_r8
This gives usPP-512 = 360 t/s.
* iq3_ks: AVX2 GEMM/GEMV
* iq3_ks: NEON GEMM/GEMV
* iq3_ks: NEON convert to q8_k_r8
This gives us PP-512 = 164 t/s.
* iq3_ks: Metal dequantize
* iq3_ks: Metal gemv - pathetic performance
---------
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 | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ggml/src/ggml-common.h b/ggml/src/ggml-common.h index 2bfe5d39..a1f97911 100644 --- a/ggml/src/ggml-common.h +++ b/ggml/src/ggml-common.h @@ -650,6 +650,14 @@ typedef struct { static_assert(sizeof(block_iq3_k) == sizeof(ggml_half) + 2*sizeof(uint16_t) + QK_K/32 + QK_K/4 + QK_K/8, "wrong iq3_k block size/padding"); typedef struct { + uint16_t extra; + uint8_t scales[QK_K/64]; + uint8_t qs[QK_K/4]; + uint8_t qh[QK_K/8]; +} block_iq3_ks; +static_assert(sizeof(block_iq3_ks) == sizeof(uint16_t) + QK_K/64 + QK_K/4 + QK_K/8, "wrong iq3_ks block size/padding"); + +typedef struct { ggml_half d[4]; uint8_t extra[8]; uint8_t scales_h[QK_K/32]; |