fix: fix small detail

This commit is contained in:
Joan Martinez 2024-04-22 13:23:00 +02:00
parent 795ff1d3d3
commit d6ac931b7a

2
ggml.c
View file

@ -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);