Skip to content

Commit 66e28eb

Browse files
committed
Fix temperature bug
1 parent 6702d2a commit 66e28eb

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
@@ -287,7 +287,7 @@ def _sample_top_p_top_k(
287287
candidates=llama_cpp.ctypes.pointer(candidates),
288288
penalty=repeat_penalty,
289289
)
290-
if temp == 0.0:
290+
if float(temp) == 0.0:
291291
return llama_cpp.llama_sample_token_greedy(
292292
ctx=self.ctx,
293293
candidates=llama_cpp.ctypes.pointer(candidates),

0 commit comments

Comments
 (0)