diff options
author | Cebtenzzre <cebtenzzre@gmail.com> | 2023-08-26 12:53:52 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-26 19:53:52 +0300 |
commit | 50526f37eba0b28336700890242ff282b949cd83 (patch) | |
tree | b60506175f023fbd74808abbb3aab157098745ae /llama.cpp | |
parent | 04f4b1eb10f3e25750ca3e530265ce2841730e6b (diff) |
llama : use std::abs in llama_sample_tail_free (#2800)
Plain 'abs' casts the input to int.
Diffstat (limited to 'llama.cpp')
-rw-r--r-- | llama.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |