From 8c6b84220d78d1742cbe55e21746ad68c8df267a Mon Sep 17 00:00:00 2001 From: Kawrakow Date: Wed, 11 Dec 2024 18:16:49 +0100 Subject: Q2_K_R4 (#136) * q2_k_r4: Zen4 PP-512(LLaMA-3.1-8B) = 256 t/s * q3_k_r4: AVX2 * q2_k_r4: AVX2 We get PP-512(LLaMA-3.1-8B) = 287 t/s. Also cherry-picked the q3_k_r4 AVX2 adaptation that I somehow forgot to push upstream. * q2_k_r4: NEON We get PP-512(LLaMA-3.1-8B) = 106.2 t/s. TG-128 is 36.02 t/s, which is ~10% higher than q2_K_S. * Make sure rows per thread are a multiple of 4 --------- Co-authored-by: Iwan Kawrakow --- ggml/include/ggml.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ggml/include') diff --git a/ggml/include/ggml.h b/ggml/include/ggml.h index 0ab34f27..2ed0fb1f 100644 --- a/ggml/include/ggml.h +++ b/ggml/include/ggml.h @@ -412,6 +412,7 @@ extern "C" { GGML_TYPE_Q4_0_R4 = 202, GGML_TYPE_Q5_0_R4 = 206, GGML_TYPE_Q8_0_R4 = 208, + GGML_TYPE_Q2_K_R4 = 210, GGML_TYPE_Q3_K_R4 = 211, GGML_TYPE_Q4_K_R4 = 212, GGML_TYPE_Q5_K_R4 = 213, @@ -482,6 +483,7 @@ extern "C" { GGML_FTYPE_MOSTLY_Q4_0_R4 = 202, // except 1d tensors GGML_FTYPE_MOSTLY_Q8_0_R4 = 207, // except 1d tensors GGML_FTYPE_MOSTLY_Q5_0_R4 = 208, // except 1d tensors + GGML_FTYPE_MOSTLY_Q2_K_R4 = 210, // except 1d tensors GGML_FTYPE_MOSTLY_Q3_K_R4 = 211, // except 1d tensors GGML_FTYPE_MOSTLY_Q4_K_R4 = 212, // except 1d tensors GGML_FTYPE_MOSTLY_Q5_K_R4 = 215, // except 1d tensors -- cgit v1.2.3