You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, grateful thanks to the authors of privateGPT for developing such a great app.
However, when I tried to use nomic-ai/nomic-embed-text-v1.5 from huggingface.co as an embedding model coupled with llamacpp for local setups, an error occurred as follows:
ValueError: Loading nomic-ai/nomic-embed-text-v1.5 requires you to execute the configuration file in that repo on your local machine. Make sure you have read the code there to avoid malicious use, then set the option `trust_remote_code=True` to remove this error.
I am wondering how I can set the trust_remote_code=True option and properly pass it to privateGPT. I tried inserting trust_remote_code: true in the huggingface or llamacpp section in the yaml file, but it did not work.
To set the trust_remote_code option in privateGPT, you need to modify the following code sections:
add definition of trust_remote_code to private_gpt\settings\settings.py , the default value is set to False.
class HuggingFaceSettings(BaseModel):
embedding_hf_model_name: str = Field(
description="Name of the HuggingFace model to use for embeddings"
)
access_token: str = Field(
None,
description="Huggingface access token, required to download some models",
)
trust_remote_code: bool = Field(
False,
description="Trust remote code when downloading models",
)
insert trust_remote_code=settings.huggingface.trust_remote_code, to private_gpt\components\embedding\embedding_component.py :
First of all, grateful thanks to the authors of privateGPT for developing such a great app.
However, when I tried to use
nomic-ai/nomic-embed-text-v1.5
from huggingface.co as an embedding model coupled with llamacpp for local setups, an error occurred as follows:I am wondering how I can set the
trust_remote_code=True
option and properly pass it to privateGPT. I tried insertingtrust_remote_code: true
in thehuggingface
orllamacpp
section in the yaml file, but it did not work.The following is my configuration profile.
Any suggestions? Thank you.
The text was updated successfully, but these errors were encountered: