From b895511ccae4f166c893d0a69c40643943640772 Mon Sep 17 00:00:00 2001 From: Andrei Betlen Date: Sun, 21 May 2023 18:38:06 -0400 Subject: [PATCH] Fix penalize_nl --- llama_cpp/llama.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama_cpp/llama.py b/llama_cpp/llama.py index 7943084..2d405b7 100644 --- a/llama_cpp/llama.py +++ b/llama_cpp/llama.py @@ -351,7 +351,7 @@ class Llama: alpha_presence=presence_penalty, ) if not penalize_nl: - candidates.data[Llama.token_nl()].logit = nl_logit + candidates.data[Llama.token_nl()].logit = llama_cpp.c_float(nl_logit) if temp.value == 0.0: return llama_cpp.llama_sample_token_greedy( ctx=self.ctx,