summaryrefslogtreecommitdiff
path: root/ggml/src/ggml-cuda/common.cuh
diff options
context:
space:
mode:
authorIwan Kawrakow <iwan.kawrakow@gmail.com>2024-07-30 16:11:25 +0300
committerKawrakow <48489457+ikawrakow@users.noreply.github.com>2024-08-01 09:38:06 +0200
commit4f237d44f6d75afbb5cef39d4d6b0b35b2a517c7 (patch)
tree097eb7ee5be6ec08d3958f747775f9225db3c7a4 /ggml/src/ggml-cuda/common.cuh
parent36204c4ec7815f1b0f8f38c8e1cd3e6b3fef2eaa (diff)
iq3_k: Basics
Quantize/dequantize, CUDA dequantize. PPL of LLaMA-3.1-8B is better than iq3_s and iq3_m.
Diffstat (limited to 'ggml/src/ggml-cuda/common.cuh')
-rw-r--r--ggml/src/ggml-cuda/common.cuh7
1 files changed, 7 insertions, 0 deletions
diff --git a/ggml/src/ggml-cuda/common.cuh b/ggml/src/ggml-cuda/common.cuh
index 516e74d8..fbc52aa9 100644
--- a/ggml/src/ggml-cuda/common.cuh
+++ b/ggml/src/ggml-cuda/common.cuh
@@ -677,6 +677,13 @@ struct ggml_cuda_type_traits<GGML_TYPE_IQ2_K> {
};
template<>
+struct ggml_cuda_type_traits<GGML_TYPE_IQ3_K> {
+ static constexpr int qk = QK_K;
+ static constexpr int qr = QR4_XS;
+ static constexpr int qi = QI4_XS;
+};
+
+template<>
struct ggml_cuda_type_traits<GGML_TYPE_IQ4_K> {
static constexpr int qk = QK_K;
static constexpr int qr = QR4_XS;