Skip to content

Commit 50526f3

Browse files
authored
llama : use std::abs in llama_sample_tail_free (#2800)
Plain 'abs' casts the input to int.
1 parent 04f4b1e commit 50526f3

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
@@ -3887,7 +3887,7 @@ void llama_sample_tail_free(struct llama_context * ctx, llama_token_data_array *
38873887

38883888
// Calculate absolute value of second derivatives
38893889
for (size_t i = 0; i < second_derivatives.size(); ++i) {
3890-
second_derivatives[i] = abs(second_derivatives[i]);
3890+
second_derivatives[i] = std::abs(second_derivatives[i]);
38913891
}
38923892

38933893
// Normalize the second derivatives

0 commit comments

Comments
 (0)