sentence-transformers How to use estrogen/ModernBERT-base-marco with sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("estrogen/ModernBERT-base-marco")
sentences = [
"[unused0]what period do we live in",
"[unused1]The answer depends on what you want in a cruise experience. If youâre interested in lively entertainment, drinking and parties, and crazy excitement for more festive cruise experience, and the best time to go on a Caribbean cruise is between mid February through much of March.",
"[unused1]Earth is currently in the Quaternary Period of the Cenozoic Era.",
"[unused1]If we did not live in a structured society with other people, laws would not be necessary. We would simply do as we please, with little regard for others. But ever since individuals began to associate with other people -- to live in society --laws have been the glue that has kept society together.lmost everything we do is governed by some set of rules. There are rules for games, for social clubs, for sports and for adults in the workplace. There are also rules imposed by morality and custom that play an important role in telling us what we should and should not do."
]
embeddings = model.encode(sentences)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [4, 4]