summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcebtenzzre <cebtenzzre@gmail.com>2023-11-03 02:31:58 -0400
committerGitHub <noreply@github.com>2023-11-03 08:31:58 +0200
commit3fdbe6b66b7b5c6ad3b2f245cbad1517c27ff776 (patch)
treebed11e45e04e38c5a471ea3de8c6a586f62dc673
parent629f917cd6b96ba1274c49a8aab163b1b189229d (diff)
llama : change yarn_ext_factor placeholder to -1 (#3922)
-rw-r--r--llama.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llama.cpp b/llama.cpp
index bb60044b..cc0211ce 100644
--- a/llama.cpp
+++ b/llama.cpp
@@ -7982,7 +7982,7 @@ struct llama_context_params llama_context_default_params() {
/*.rope_scaling_type =*/ LLAMA_ROPE_SCALING_UNSPECIFIED,
/*.rope_freq_base =*/ 0.0f,
/*.rope_freq_scale =*/ 0.0f,
- /*.yarn_ext_factor =*/ NAN,
+ /*.yarn_ext_factor =*/ -1.0f,
/*.yarn_attn_factor =*/ 1.0f,
/*.yarn_beta_fast =*/ 32.0f,
/*.yarn_beta_slow =*/ 1.0f,
@@ -8125,7 +8125,7 @@ struct llama_context * llama_new_context_with_model(
cparams.rope_freq_scale = 1.0f; // never scale if scaling type is none
}
- if (std::isnan(cparams.yarn_ext_factor)) { // NaN indicates 'not set'
+ if (cparams.yarn_ext_factor < 0.0f) { // negative indicates 'not set'
cparams.yarn_ext_factor = rope_scaling_type == LLAMA_ROPE_SCALING_YARN ? 1.0f : 0.0f;
}