Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No sentence-transformers model found with name sentence-transformers/all-MiniLM-L6-v2. #2664

Open
weirdo-onlooker opened this issue May 22, 2024 · 2 comments

Comments

@weirdo-onlooker
Copy link

During the execution of my code:
model = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')
definition_embeddings = model.encode(DSE_infos)

I encountered the following error, and the same issue occurred with multiple models:
No sentence-transformers model found with name sentence-transformers/all-MiniLM-L6-v2. Creating a new one with MEAN pooling.
/root/miniconda3/envs/sentence-bert/lib/python3.9/site-packages/huggingface_hub/file_download.py:1132: FutureWarning: resume_download is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use force_download=True.
...
...
...
OSError: We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like sentence-transformers/all-MiniLM-L6-v2 is not the path to a directory containing a file named config.json.
Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.

@tomaarsen
Copy link
Collaborator

Hello!

It seems like https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2 was not accessible for you. Could you try to:

  1. Rerun your code? Perhaps Hugging Face was down for a minute. I can access HF now, so that might just resolve it already.
  2. Verify whether you can access https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/blob/main/config.json. Can you browse to this URL without issues?
  3. Could you try and wget https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/raw/main/config.json to download this file?

If you have issues with all of those, then perhaps you're behind some firewall that prevents access to Hugging Face? Please let me know what happens when you try the above.

  • Tom Aarsen

@wangguan1995
Copy link

image

same problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants