add one line of comments

This commit is contained in:
liuwei 2024-05-11 21:42:32 +00:00 committed by Georgi Gerganov
parent d05ae12e93
commit 8a9c897fd0
No known key found for this signature in database
GPG key ID: 449E073F9DC10735

View file

@ -10978,6 +10978,7 @@ static void llama_set_inputs(llama_context & lctx, const llama_batch & batch) {
GGML_ASSERT(hparams.rope_long_factors.size() == freq_dim);
GGML_ASSERT(hparams.rope_short_factors.size() == freq_dim);
// choose long/short freq factors based on the context size
auto n_ctx = llama_n_ctx(&lctx);
if (n_ctx > hparams.n_yarn_orig_ctx) {
ggml_backend_tensor_set(lctx.freq_factors, hparams.rope_long_factors.data(), 0, freq_dim * ggml_element_size(lctx.freq_factors));