From 34c505edf2609acef51b47533f10cd2b8dc2f715 Mon Sep 17 00:00:00 2001 From: Andrei Betlen Date: Fri, 7 Jul 2023 22:54:07 -0400 Subject: [PATCH] perf: convert pointer to byref --- 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 0895182..130e013 100644 --- a/llama_cpp/llama.py +++ b/llama_cpp/llama.py @@ -537,7 +537,7 @@ class Llama: mirostat_mu = llama_cpp.c_float(2.0 * mirostat_tau.value) llama_cpp.llama_sample_temperature( ctx=self.ctx, - candidates=llama_cpp.ctypes.pointer(candidates), + candidates=llama_cpp.ctypes.byref(candidates), # type: ignore temp=temp, ) return llama_cpp.llama_sample_token_mirostat_v2(