perf: convert pointer to byref

This commit is contained in:
Andrei Betlen 2023-07-07 22:54:07 -04:00
parent 52753b77f5
commit 34c505edf2

View file

@ -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(