From 9f871298b63c02b45c0d36e0ca88e14f105235a0 Mon Sep 17 00:00:00 2001 From: liuwei Date: Sat, 11 May 2024 10:38:22 +0000 Subject: [PATCH] adjust index value in cuda long rope freq factors --- ggml-cuda/rope.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml-cuda/rope.cu b/ggml-cuda/rope.cu index cba5050fa..fee56a1f2 100644 --- a/ggml-cuda/rope.cu +++ b/ggml-cuda/rope.cu @@ -88,7 +88,7 @@ static __global__ void rope_neox( float cur_rot = inv_ndims * ic - ib; const int p = has_pos ? pos[i2] : 0; - const float freq_factor = has_freq_facs ? freq_factors[col/2] : 1.0f; + const float freq_factor = has_freq_facs ? freq_factors[ic/2] : 1.0f; const float theta_base = p*freq_scale*powf(theta_scale, col/2.0f)/freq_factor;