Fix resize issue. Closes #330

This commit is contained in:
Andrei Betlen 2023-06-06 11:37:57 -04:00
parent cc8858a413
commit 8b4968ea67

View file

@ -222,7 +222,7 @@ class Llama:
[("id", np.intc), ("logit", np.single), ("p", np.single)], align=True
),
)
self._candidates_data.resize(3, self._n_vocab)
self._candidates_data.resize(3, self._n_vocab, refcheck=False)
candidates = llama_cpp.llama_token_data_array(
data=self._candidates_data.ctypes.data_as(llama_cpp.llama_token_data_p),
size=size,