I need to create embeddings and do cosine similarity calculations using sentence-transformers/all-MiniLM-L6-v2 in an ‘offline’ environment (huggingface is blacklisted in this environment since it is a community hub). I am having trouble finding info on how to run the model in offline mode. Any ideas?
I have a Windows VM for this, so I can use Command Prompt, or write methods in Python.
I ran this command and copied the files across to the python/sentence_transformers folder.
git clone https://huggingface.co/sentence-transformers/all-MiniLM-L6-v1/
Tried creating environment variables TRANSFORMERS_OFFLINE = 1, HF_DATASETS_OFFLINE = 1, HF_HUB_OFFLINE = 1 for both the user and system.
Kim Trieu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.