Open Chucy2020 opened 2 years ago
Hi @Chucy2020 . You can load local models by giving path to local model on your system in the SentenceTransformers constructor like this:
local_model = SentenceTransformer('/path/to/local/model')
In order to load a local model, you need to first save it like:
encoder.save('/path/to/local/model')
Hope it helps!
question is the default ‘/path/to/local/model’ location
hello, I want to know I used this code, where did the model loaded? and How do I use SentenceTransformer to load local models?
from sentence_transformers import SentenceTransformer encoder = SentenceTransformer("sentence-transformers/all-mpnet-base-v2")
thank you!