Skip to content

Commit 34c505e

Browse files
committed
perf: convert pointer to byref
1 parent 52753b7 commit 34c505e

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
@@ -537,7 +537,7 @@ def _sample(
537537
mirostat_mu = llama_cpp.c_float(2.0 * mirostat_tau.value)
538538
llama_cpp.llama_sample_temperature(
539539
ctx=self.ctx,
540-
candidates=llama_cpp.ctypes.pointer(candidates),
540+
candidates=llama_cpp.ctypes.byref(candidates), # type: ignore
541541
temp=temp,
542542
)
543543
return llama_cpp.llama_sample_token_mirostat_v2(

0 commit comments

Comments
 (0)