@@ -175,6 +175,7 @@ class llama_token_data_array(Structure):
175
175
# // context pointer passed to the progress callback
176
176
# void * progress_callback_user_data;
177
177
178
+
178
179
# // Keep the booleans together to avoid misalignment during copy-by-value.
179
180
# bool low_vram; // if true, reduce VRAM usage at the cost of performance
180
181
# bool f16_kv; // use fp16 for KV cache
@@ -748,7 +749,12 @@ def llama_get_vocab(
748
749
return _lib .llama_get_vocab (ctx , strings , scores , capacity )
749
750
750
751
751
- _lib .llama_get_vocab .argtypes = [llama_context_p , Array [c_char_p ], Array [c_float ], c_int ]
752
+ _lib .llama_get_vocab .argtypes = [
753
+ llama_context_p ,
754
+ POINTER (c_char_p ),
755
+ POINTER (c_float ),
756
+ c_int ,
757
+ ]
752
758
_lib .llama_get_vocab .restype = c_int
753
759
754
760
@@ -766,6 +772,15 @@ def llama_get_vocab_from_model(
766
772
return _lib .llama_get_vocab_from_model (model , strings , scores , capacity )
767
773
768
774
775
+ _lib .llama_get_vocab_from_model .argtypes = [
776
+ llama_model_p ,
777
+ POINTER (c_char_p ),
778
+ POINTER (c_float ),
779
+ c_int ,
780
+ ]
781
+ _lib .llama_get_vocab_from_model .restype = c_int
782
+
783
+
769
784
# Token logits obtained from the last call to llama_eval()
770
785
# The logits for the last token are stored in the last row
771
786
# Can be mutated in order to change the probabilities of the next token
0 commit comments