jinaai/jina-bert-implementation is not the path to a directory containing a file named configuration_bert.py.

#7
by poarpeak - opened

We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like jinaai/jina-bert-implementation is not the path to a directory containing a file named configuration_bert.py.
Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.

I tried https://huggingface.co/jinaai/jina-embeddings-v2-base-zh/discussions/4 The solution in is to upgrade the sense transformers to 2.3.0 and above, but still reporting an error

my

Name: transformers
Version: 4.36.2

Name: sentence-transformers
Version: 2.3.0

Jina AI org

This is likely because your network is unable to connect to huggingface.co correctly. Can you download other models correctly?

This is likely because your network is unable to connect to huggingface.co correctly. Can you download other models correctly?

I have downloaded the model locally through huggingface, but there is no configuration prompt_ The bert.py file, I went back later https://modelscope.cn/models/jinaai/jina-embeddings-v2-base-zh/files Download the model, I can start it normally, and I found that the configuration is indeed missing on the huggingface_ BERT.py file

Jina AI org

Our configuration files are in this repo actually, not in the model repo.

thanks

thanks

hi have you solved your problem? same error here QAQ
should I download the configuration files and put it in the same directory as the model files?

for reference:

  • I download the configuration files to './jinaai/jina-bert-implementation/'
  • update sentence-transformers (and transformers)
  • edit code
from langchain.embeddings.huggingface import HuggingFaceEmbeddings
embeddings = HuggingFaceEmbeddings(model_name='jina-embeddings-v2-base-zh',
                                model_kwargs={'device': device, 'trust_remote_code': True})

and it worked! hope it will help you

Sign up or log in to comment