sentence-transformers How to use perticarari/omniembedding with sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("perticarari/omniembedding")
sentences = [
"test",
"\" it 's a major victory for maine , and it 's a major victory for other states .",
"doctors say one or both boys may die , and that some brain damage is possible if they survive .",
"doctors said that one or both of the boys may die and that if they survive , some brain damage is possible ."
]
embeddings = model.encode(sentences)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [4, 4]