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

cant load sentence-transformers/all-MiniLM-L6-v2 offline #3142

Open
wangguan1995 opened this issue Dec 21, 2024 · 2 comments
Open

cant load sentence-transformers/all-MiniLM-L6-v2 offline #3142

wangguan1995 opened this issue Dec 21, 2024 · 2 comments

Comments

@wangguan1995
Copy link

Hi there,
Because internet issue, I require to load "all-MiniLM-L6-v2" offline,
I tried:

  1. download model from : https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2
  2. follow instruction of : https://www.sbert.net/docs/package_reference/sentence_transformer/SentenceTransformer.html
  3. code check :

image

@wangguan1995
Copy link
Author

@tomaarsen
Copy link
Collaborator

Hello!

Apologies for the delay. I believe the latter should work, i.e. model = SentenceTransformer("path/to/all-MiniLM-L6-v2"). Have you gotten any luck with that?

The former fails because if you're using the cache_folder, then it expects the model to be in the cache format (e.g. blobs, refs, snapshots folders, folders named after git commits, etc.). You are on the right track with the second option, i.e. the path to the local model.

  • Tom Aarsen

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

2 participants