8000 Align dtype to match c structs · sleeplessinva/llama-cpp-python@84e313b · GitHub
[go: up one dir, main page]

Skip to content

Commit 84e313b

Browse files
committed
Align dtype to match c structs
1 parent b0b154c commit 84e313b

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
@@ -217,7 +217,7 @@ def __init__(
217217
size = llama_cpp.c_size_t(self._n_vocab)
218218
sorted = llama_cpp.c_bool(False)
219219
self._candidates_data = np.array(
220-
[], dtype=[("id", np.intc), ("logit", np.single), ("p", np.single)]
220+
[], dtype=np.dtype([("id", np.intc), ("logit", np.single), ("p", np.single)], align=True)
221221
)
222222
self._candidates_data.resize(3, self._n_vocab)
223223
candidates = llama_cpp.llama_token_data_array(

0 commit comments

Comments
 (0)
0