summaryrefslogtreecommitdiff
path: root/llama.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llama.cpp')
-rw-r--r--llama.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llama.cpp b/llama.cpp
index 5699a0fc..a2462153 100644
--- a/llama.cpp
+++ b/llama.cpp
@@ -1281,7 +1281,7 @@ struct llama_hparams {
if (this->rope_finetuned != other.rope_finetuned) return true;
if (this->n_yarn_orig_ctx != other.n_yarn_orig_ctx) return true;
- const float EPSILON = 1e-9;
+ const float EPSILON = 1e-9f;
if (!is_float_close(this->f_norm_eps, other.f_norm_eps, EPSILON)) return true;
if (!is_float_close(this->f_norm_rms_eps, other.f_norm_rms_eps, EPSILON)) return true;
@@ -10300,7 +10300,7 @@ int llama_token_to_piece(const struct llama_model * model, llama_token token, ch
std::string result = model->vocab.id_to_token[token].text;
llama_unescape_whitespace(result);
if (length < (int) result.length()) {
- return -result.length();
+ return -(int) result.length();
}
memcpy(buf, result.c_str(), result.length());
return result.length();
@@ -10330,7 +10330,7 @@ int llama_token_to_piece(const struct llama_model * model, llama_token token, ch
std::string result = model->vocab.id_to_token[token].text;
result = llama_decode_text(result);
if (length < (int) result.length()) {
- return -result.length();
+ return -(int) result.length();
}
memcpy(buf, result.c_str(), result.length());
return result.length();