mandarjoshi/trivia_qa
Viewer • Updated • 848k • 88.6k • 192
How to use metarank/multilingual-e5-small with sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("metarank/multilingual-e5-small")
sentences = [
"The weather is lovely today.",
"It's so sunny outside!",
"He drove to the stadium."
]
embeddings = model.encode(sentences)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]This is a sentence-transformers model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. The ONNX version of this model is made for the Metarank re-ranker to do semantic similarity.
Check out the main Metarank docs on how to configure it.
TLDR:
- type: field_match
name: title_query_match
rankingField: ranking.query
itemField: item.title
distance: cos
method:
type: bi-encoder
model: metarank/multilingual-e5-small
Apache 2.0