diff options
Diffstat (limited to 'common/sampling.cpp')
-rw-r--r-- | common/sampling.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/sampling.cpp b/common/sampling.cpp index 6f0af3c4..5258d4e8 100644 --- a/common/sampling.cpp +++ b/common/sampling.cpp @@ -147,7 +147,7 @@ llama_token llama_sampling_sample( // apply penalties if (!prev.empty()) { - const float nl_logit = logits[llama_token_nl(ctx_main)]; + const float nl_logit = logits[llama_token_nl(llama_get_model(ctx_main))]; llama_sample_repetition_penalties(ctx_main, &cur_p, prev.data() + prev.size() - penalty_last_n, @@ -155,7 +155,7 @@ llama_token llama_sampling_sample( if (!penalize_nl) { for (size_t idx = 0; idx < cur_p.size; idx++) { - if (cur_p.data[idx].id == llama_token_nl(ctx_main)) { + if (cur_p.data[idx].id == llama_token_nl(llama_get_model(ctx_main))) { cur_p.data[idx].logit = nl_logit; break; } |