We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b38e72 commit 79a8635Copy full SHA for 79a8635
1 file changed
llama_cpp/_internals.py
@@ -100,9 +100,13 @@ def __del__(self):
100
self.close()
101
102
def vocab_type(self) -> int:
103
- return llama_cpp.llama_vocab_type(self.model)
+ if self.vocab is None:
104
+ raise RuntimeError("LlamaModel.vocab_type: vocab is None")
105
+ return llama_cpp.llama_vocab_type(self.vocab)
106
107
def n_vocab(self) -> int:
108
109
+ raise RuntimeError("LlamaModel.n_vocab: vocab is None")
110
return llama_cpp.llama_vocab_n_tokens(self.vocab)
111
112
def n_ctx_train(self) -> int:
0 commit comments