krishnaik06 / Complete-Langchain-Tutorials

GNU General Public License v2.0
320 stars 268 forks source link

Unable to use CTransformers #3

Open smd29 opened 8 months ago

smd29 commented 8 months ago

I am using the same app.py, but there seems to be some issue with this line llm = CTransformers( model_type='llama', model='models/llama-2-7b.ggmlv3.q8_0.bin', config={'max_new_tokens': 256, 'temperature': 0.01} )

this is giving following error: Repository Not Found for url: https://huggingface.co/api/models/models/llama-2-7b-chat.ggmlv3.q8_0.bin/revision/main. Please make sure you specified the correct repo_id and repo_type. If you are trying to access a private or gated repo, make sure you are authenticated.

I have downloaded the model locally, how can I use it? @krishnaik06

traromal commented 8 months ago

create a folder named model and put your downloaded model inside the models folder you can find the models in this Huggingface repo TheBloke/Llama-2-7B-Chat-GGML https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGML/tree/main you can download the model you want

smd29 commented 8 months ago

@traromal thanks for helping out, but still getting the same error for this model

RepositoryNotFoundError: 404 Client Error. (Request ID: Root=1-65a570c1-7fef2aaf068a5fb14eeae764;f3f9d476-22b1-452c-9010-b073a9e0bba2) Repository Not Found for url: https://huggingface.co/api/models/models/llama-2-7b-chat.ggmlv3.q8_0.bin/revision/main. Please make sure you specified the correct repo_id and repo_type. If you are trying to access a private or gated repo, make sure you are authenticated.

traromal commented 8 months ago

If you are trying to use the llama model locally you don't need to add the repo id Can you share the screenshot of the code?

smd29 commented 7 months ago
Screenshot 2024-01-16 at 7 59 40 PM

I am using the model locally. @traromal

traromal commented 7 months ago

You sure u installed CTransformers and langchain inside the env?

smd29 commented 7 months ago

Name: langchain Version: 0.1.1

Name: ctransformers Version: 0.2.27

these are the versions of ctransformers and langchain inside my venv

traromal commented 7 months ago

it looks like some problem with langchain package from the screenshot provided did you try it by creating a new workspace and env?

smd29 commented 7 months ago

yes, I created a new workspace and environment.

traromal commented 7 months ago

Try changing the python interpreter

smd29 commented 7 months ago

tried, but no luck.