nomic-ai/pygpt4all

Exception: File ./models/ggml-gpt4all-j-v1.3-groovy.bin not found! even gpt4all-j is in models folder.

NewtonJr4108 opened this issue · 2 comments

Ran this file as instructed:
`from pygpt4all.models.gpt4all_j import GPT4All_J

def new_text_callback(text):
print(text, end="")

model = GPT4All_J('./models/ggml-gpt4all-j-v1.3-groovy.bin')
model.generate("Once upon a time, ", n_predict=55, new_text_callback=new_text_callback)`

Full error:
Traceback (most recent call last): File "/Users/User/Desktop/pygpt4all/rhee.py", line 6, in <module> model = GPT4All_J('./models/ggml-gpt4all-j-v1.3-groovy.bin') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/User/Desktop/pygpt4all/pygpt4all/models/gpt4all_j.py", line 43, in __init__ super(GPT4All_J, self).__init__(model_path=model_path, log_level=log_level) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pygptj/model.py", line 52, in __init__ raise Exception(f"File {model_path} not found!") Exception: File ./models/ggml-gpt4all-j-v1.3-groovy.bin not found!

@NewtonJr4108,

You have to download the models and use their paths in the constructor.
Please try it as follows:

model = GPT4All_J('Absolute/Path/to/the/downloaded/ggml-gpt4all-j-v1.3-groovy.bin')

Thanks! It worked!