From 5afe911dadd2f5d6457188bd2628dcd8db3f5f7a Mon Sep 17 00:00:00 2001 From: Cebtenzzre Date: Fri, 25 Aug 2023 18:16:58 -0400 Subject: [PATCH] llama : use fabsf in llama_sample_tail_free --- llama.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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