private-gpt icon indicating copy to clipboard operation
private-gpt copied to clipboard

PrivateGPT.py is failing to retrieve the model

Open VimalMathew99 opened this issue 2 years ago • 10 comments

After Running ingest.py, I was running PrivateGPT.py and got the below error

Using embedded DuckDB with persistence: data will be stored in: db Traceback (most recent call last): File "/content/privateGPT/privateGPT.py", line 76, in main() File "/content/privateGPT/privateGPT.py", line 36, in main llm = GPT4All(model=model_path, n_ctx=model_n_ctx, backend='gptj', callbacks=callbacks, verbose=False) File "pydantic/main.py", line 341, in pydantic.main.BaseModel.init pydantic.error_wrappers.ValidationError: 1 validation error for GPT4All root Failed to retrieve model (type=value_error)

Expected behavior it should run properly and ask for my query input

VimalMathew99 avatar Jun 07 '23 05:06 VimalMathew99

@VimalMathew99, Please share your folder structure and contents in .env file

Elicherla01 avatar Jun 07 '23 09:06 Elicherla01

PERSIST_DIRECTORY=db MODEL_TYPE=GPT4All MODEL_PATH=/ggml-gpt4all-j-v1.3-groovy.bin EMBEDDINGS_MODEL_NAME=all-MiniLM-L6-v2 MODEL_N_CTX=1000 TARGET_SOURCE_CHUNKS=4

I have kept the Model file in the same directory so I have given "/file_name" as the model path.

VimalMathew99 avatar Jun 07 '23 09:06 VimalMathew99

i think you should just remove the trailing slash / before your model path

MODEL_PATH=ggml-gpt4all-j-v1.3-groovy.bin

hassanalami avatar Jun 07 '23 10:06 hassanalami

done still same error

VimalMathew99 avatar Jun 07 '23 10:06 VimalMathew99

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. google-colab 1.0.0 requires requests==2.27.1, but you have requests 2.31.0 which is incompatible.

will the above come due to this error?

VimalMathew99 avatar Jun 07 '23 10:06 VimalMathew99

??

VimalMathew99 avatar Jun 07 '23 18:06 VimalMathew99

I had exact same issue. i found out that "ggml-gpt4all-j-v1.3-groovy.bin" was not in the directory were i launched python ingest.py downloading the bin again solved the issue

samueletonon avatar Jun 08 '23 09:06 samueletonon

image

Content of env file:

PERSIST_DIRECTORY=db MODEL_TYPE=GPT4All MODEL_PATH=ggml-gpt4all-j-v1.3-groovy.bin EMBEDDINGS_MODEL_NAME=all-MiniLM-L6-v2 MODEL_N_CTX=1000 TARGET_SOURCE_CHUNKS=4

still getting the same erro. Also I changed example.env to .env

VimalMathew99 avatar Jun 08 '23 10:06 VimalMathew99

The suggestion (i.e. placing the model within a model directory inside the privateGPT folder) in this issue thread worked for me: https://github.com/imartinez/privateGPT/issues/621

jnhutchinson avatar Jun 08 '23 18:06 jnhutchinson

The suggestion (i.e. placing the model within a model directory inside the privateGPT folder) in this issue thread worked for me: #621

This solution also worked for me.

wheagle avatar Jun 12 '23 09:06 wheagle