Skip to content

Commit b895511

Browse files
committed
Fix penalize_nl
1 parent 03e2947 commit b895511

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llama_cpp/llama.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ def _sample(
351351
alpha_presence=presence_penalty,
352352
)
353353
if not penalize_nl:
354-
candidates.data[Llama.token_nl()].logit = nl_logit
354+
candidates.data[Llama.token_nl()].logit = llama_cpp.c_float(nl_logit)
355355
if temp.value == 0.0:
356356
return llama_cpp.llama_sample_token_greedy(
357357
ctx=self.ctx,

0 commit comments

Comments
 (0)