How to use LamaDiab/MiniLM-v2-v29-SemanticEngine with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("LamaDiab/MiniLM-v2-v29-SemanticEngine") sentences = [ "pappardelle beef ragu", "chocolate molten", "slow-cooked pasta", "pasta", "pasta" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [5, 5]
The community tab is the place to discuss and collaborate with the HF community!