From d05ae12e93d6b400e533f165d673a14aef0e12b3 Mon Sep 17 00:00:00 2001 From: liuwei Date: Sat, 11 May 2024 20:30:32 +0000 Subject: [PATCH] set to the short freq factor when context size is small than trained context size --- llama.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama.cpp b/llama.cpp index 3bfe2910b..ef9809ecd 100644 --- a/llama.cpp +++ b/llama.cpp @@ -10983,7 +10983,7 @@ static void llama_set_inputs(llama_context & lctx, const llama_batch & batch) { ggml_backend_tensor_set(lctx.freq_factors, hparams.rope_long_factors.data(), 0, freq_dim * ggml_element_size(lctx.freq_factors)); } else { - ggml_backend_tensor_set(lctx.freq_factors, hparams.rope_long_factors.data(), 0, freq_dim * ggml_element_size(lctx.freq_factors)); + ggml_backend_tensor_set(lctx.freq_factors, hparams.rope_short_factors.data(), 0, freq_dim * ggml_element_size(lctx.freq_factors)); } }