Then you can load this model and run inference.
1from sentence_transformers import SentenceTransformer
2
3# Download from the Hugging Face Hub
4model = SentenceTransformer("sentence_transformers_model_id")
5# Run inference
6sentences = [
7 'search_query: autotrain',
8 'search_query: auto train',
9 'search_query: i love autotrain',
10]
11embeddings = model.encode(sentences)
12print(embeddings.shape)
13
14# Get the similarity scores for the embeddings
15similarities = model.similarity(embeddings, embeddings)
16print(similarities.shape)