HasinMDG's picture
Update README.md
ac934b2 verified

base_model: intfloat/multilingual-e5-large library_name: sentence-transformers

Usage

Direct Usage (Sentence Transformers)

First install the Sentence Transformers library:

pip install -U sentence-transformers

Then you can load this model and run inference.

from sentence_transformers import SentenceTransformer

# Download from the 🤗 Hub
model = SentenceTransformer("HasinMDG/multilingual-e5-large")
# Run inference
sentences = [
    "passage: Fit Bodies Aren't Perfect, Either \n",
    'passage: Royals attend extravagant ceremony to celebrate the opening of new museum',
    'passage: Native-American Kids Doused With Beer at SD Hockey Game \n',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 1024]

# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]