From 66e28eb548974fe50aa80b8593f77cff651959c6 Mon Sep 17 00:00:00 2001 From: Andrei Betlen Date: Fri, 5 May 2023 14:00:41 -0400 Subject: [PATCH] Fix temperature bug --- 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 c1c8847..6cd65a4 100644 --- a/llama_cpp/llama.py +++ b/llama_cpp/llama.py @@ -287,7 +287,7 @@ class Llama: candidates=llama_cpp.ctypes.pointer(candidates), penalty=repeat_penalty, ) - if temp == 0.0: + if float(temp) == 0.0: return llama_cpp.llama_sample_token_greedy( ctx=self.ctx, candidates=llama_cpp.ctypes.pointer(candidates),