From d6ac931b7a7d2ca17653b9182f7f737b347ba2b2 Mon Sep 17 00:00:00 2001 From: Joan Martinez Date: Mon, 22 Apr 2024 13:23:00 +0200 Subject: [PATCH] fix: fix small detail --- ggml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml.c b/ggml.c index b0af1512f..b4e48a262 100644 --- a/ggml.c +++ b/ggml.c @@ -12258,7 +12258,7 @@ static void ggml_compute_forward_soft_max_f32( const float slope = h < n_head_log2 ? powf(m0, h + 1) : powf(m1, 2*(h - n_head_log2) + 1); for (int i = 0; i < nc; i++) { - if (pos == NULL) { + if (pos != NULL) { wp[i] = wp[i] + pos[i]; } else { wp[i] = wp[i] - slope*abs(i1%nc - i);