From: yangyaofei Date: Thu, 11 May 2023 21:47:48 +0000 (+0800) Subject: ggml : fix bug in alibi (#143) X-Git-Tag: upstream/0.0.1642~1489 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=085f6af4c3806f7ab7d908b9a6bdb209176b6e3f;p=pkg%2Fggml%2Fsources%2Fggml ggml : fix bug in alibi (#143) --- diff --git a/src/ggml.c b/src/ggml.c index 0bcb5f61..127d6cf2 100644 --- a/src/ggml.c +++ b/src/ggml.c @@ -9425,7 +9425,7 @@ static void ggml_compute_forward_alibi_f32( m_k = powf(m1, 2 * (k - n_heads_log2_floor) + 1); } - pdst[0] = (j+1) * m_k + src[0]; + pdst[0] = i * m_k + src[0]; } } } @@ -9487,7 +9487,7 @@ static void ggml_compute_forward_alibi_f16( } // we return F32 - pdst[0] = (j+1) * m_k + GGML_FP16_TO_FP32(src[0]); + pdst[0] = i * m_k + GGML_FP16_TO_FP32(src[0]); } } }