Skip to content

Commit 9be7e2b

Browse files
committed
llama : use std::abs in llama_sample_tail_free
Plain 'abs' casts the input to int.
1 parent 232caf3 commit 9be7e2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llama.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3908,7 +3908,7 @@ void llama_sample_tail_free(struct llama_context * ctx, llama_token_data_array *
39083908

39093909
// Calculate absolute value of second derivatives
39103910
for (size_t i = 0; i < second_derivatives.size(); ++i) {
3911-
second_derivatives[i] = abs(second_derivatives[i]);
3911+
second_derivatives[i] = std::abs(second_derivatives[i]);
39123912
}
39133913

39143914
// Normalize the second derivatives

0 commit comments

Comments
 (0)