mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-07-05 19:53:40 +00:00
llama : use std::abs in llama_sample_tail_free (#2800)
Plain 'abs' casts the input to int.
This commit is contained in:
@ -3887,7 +3887,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] = std::abs(second_derivatives[i]);
|
||||
}
|
||||
|
||||
// Normalize the second derivatives
|
||||
|
Reference in New Issue
Block a user