summaryrefslogtreecommitdiff
path: root/ggml/src/ggml-common.h
diff options
context:
space:
mode:
Diffstat (limited to 'ggml/src/ggml-common.h')
-rw-r--r--ggml/src/ggml-common.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/ggml/src/ggml-common.h b/ggml/src/ggml-common.h
index 7da27794..423797b6 100644
--- a/ggml/src/ggml-common.h
+++ b/ggml/src/ggml-common.h
@@ -459,6 +459,16 @@ static_assert(sizeof(block_iq2_k) == sizeof(ggml_half) + sizeof(uint16_t) + QK_K
typedef struct {
ggml_half d;
uint16_t extra;
+ uint16_t scales_h;
+ uint8_t scales_l[QK_K/32];
+ uint8_t qs[QK_K/4];
+ uint8_t qh[QK_K/8];
+} block_iq3_k;
+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 {
+ ggml_half d;
+ uint16_t extra;
uint8_t scales_h[QK_K/64];
uint8_t scales_l[QK_K/32];
uint8_t qs[QK_K/2];
@@ -1911,6 +1921,11 @@ GGML_TABLE_BEGIN(int8_t, iq2nl_values, 8)
-31, -13, 1, 17, -26, -8, 6, 22
GGML_TABLE_END()
+GGML_TABLE_BEGIN(int8_t, iq3nl_values, 16)
+ -63, -40, -23, -10, 1, 13, 28, 47,
+ -59, -36, -19, -6, 5, 17, 32, 51,
+GGML_TABLE_END()
+
GGML_TABLE_BEGIN(int8_t, iq4k_values, 32)
-127, -104, -83, -65, -49, -35, -22, -10, 1, 13, 25, 38, 53, 69, 89, 113,
-123, -100, -79, -61, -45, -31, -18, -6, 5, 17, 29, 42, 57, 73, 93, 117