How to use johnnyboycurtis/ModernBERT-small with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("johnnyboycurtis/ModernBERT-small") sentences = [ "The man is shooting an automatic rifle.", "A man is shooting a gun.", "A man is driving a car.", "A man is dancing." ] 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!