Fix llama_cpp and Llama type signatures. Closes #221

This commit is contained in:
Andrei Betlen
2023-05-19 11:59:33 -04:00
parent fb57b9470b
commit 01a010be52
3 changed files with 58 additions and 64 deletions

View File

@@ -17,7 +17,7 @@ def test_llama():
# @pytest.mark.skip(reason="need to update sample mocking")
def test_llama_patch(monkeypatch):
llama = llama_cpp.Llama(model_path=MODEL, vocab_only=True)
n_vocab = int(llama_cpp.llama_n_vocab(llama.ctx))
n_vocab = llama_cpp.llama_n_vocab(llama.ctx)
## Set up mock function
def mock_eval(*args, **kwargs):
@@ -107,7 +107,7 @@ def test_llama_pickle():
def test_utf8(monkeypatch):
llama = llama_cpp.Llama(model_path=MODEL, vocab_only=True)
n_vocab = int(llama_cpp.llama_n_vocab(llama.ctx))
n_vocab = llama_cpp.llama_n_vocab(llama.ctx)
## Set up mock function
def mock_eval(*args, **kwargs):