Skip to content

Commit 3fdbe6b

Browse files
authored
llama : change yarn_ext_factor placeholder to -1 (ggml-org#3922)
1 parent 629f917 commit 3fdbe6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llama.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -7982,7 +7982,7 @@ struct llama_context_params llama_context_default_params() {
79827982
/*.rope_scaling_type =*/ LLAMA_ROPE_SCALING_UNSPECIFIED,
79837983
/*.rope_freq_base =*/ 0.0f,
79847984
/*.rope_freq_scale =*/ 0.0f,
7985-
/*.yarn_ext_factor =*/ NAN,
7985+
/*.yarn_ext_factor =*/ -1.0f,
79867986
/*.yarn_attn_factor =*/ 1.0f,
79877987
/*.yarn_beta_fast =*/ 32.0f,
79887988
/*.yarn_beta_slow =*/ 1.0f,
@@ -8125,7 +8125,7 @@ struct llama_context * llama_new_context_with_model(
81258125
cparams.rope_freq_scale = 1.0f; // never scale if scaling type is none
81268126
}
81278127

8128-
if (std::isnan(cparams.yarn_ext_factor)) { // NaN indicates 'not set'
8128+
if (cparams.yarn_ext_factor < 0.0f) { // negative indicates 'not set'
81298129
cparams.yarn_ext_factor = rope_scaling_type == LLAMA_ROPE_SCALING_YARN ? 1.0f : 0.0f;
81308130
}
81318131

0 commit comments

Comments
 (0)