From 5440a127c7df74cae45cda93282fc307a6655363 Mon Sep 17 00:00:00 2001 From: Iwan Kawrakow Date: Mon, 11 Mar 2024 14:17:28 +0100 Subject: [PATCH] iq1_s: fix dequantize on the CPU --- ggml-quants.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml-quants.c b/ggml-quants.c index 4a3cc2722..f64ac293f 100644 --- a/ggml-quants.c +++ b/ggml-quants.c @@ -3456,7 +3456,7 @@ void dequantize_row_iq1_s(const block_iq1_s * restrict x, float * restrict y, in const uint16_t * qh = x[i].qh; for (int ib = 0; ib < QK_K/32; ++ib) { - const float dl = d * ((2*(qh[ib] >> 12) & 7) + 1); + const float dl = d * (2*((qh[ib] >> 12) & 7) + 1); const float delta = qh[ib] & 0x8000 ? -IQ1S_DELTA : IQ1S_DELTA; for (int l = 0; l < 4; ++l) { const int8_t * grid = (const int8_t *)(iq1s_grid + (qs[l] | (((qh[ib] >> 3*l) & 7) << 8)));