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

Hi there

I am trying to use HuggingfaceEmbeddings model all-MiniLM-L6-v2,but the cmd window gives this error, how could i fix this?
My code is

from langchain_community.embeddings import HuggingFaceEmbeddings

def main():
print(“Loading embeddings”)
embedding = HuggingFaceEmbeddings(model_name=“all-MiniLM-L6-v2”, model_kwargs={“device”: device})

continue error message

I have seen that warning before, but it is just a warning. It is creating a sentence transformer with MEAN pooling that may be usable. If you want to get rid of that warning, you would have to install a sentence transformer first.

1 Like