How to use sentence-transformers-testing/all-nli-bert-tiny-dense with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("sentence-transformers-testing/all-nli-bert-tiny-dense") sentences = [ "Tall man being stopped by an officer.", "The man is short.", "There is a tall man.", "Male in brown leather jacket and tight black slacks, looking down at his phone" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4]
The community tab is the place to discuss and collaborate with the HF community!