diff --git a/llama.cpp b/llama.cpp index 7d8b9a0ac485b1..768872b1de5afd 100644 --- a/llama.cpp +++ b/llama.cpp @@ -3908,7 +3908,7 @@ void llama_sample_tail_free(struct llama_context * ctx, llama_token_data_array * // Calculate absolute value of second derivatives for (size_t i = 0; i < second_derivatives.size(); ++i) { - second_derivatives[i] = abs(second_derivatives[i]); + second_derivatives[i] = fabsf(second_derivatives[i]); } // Normalize the second derivatives