Sentence Similarity
sentence-transformers
Safetensors
English
modernbert
feature-extraction
text-embeddings-inference
Instructions to use clembi/ModernBERT-base-embed with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use clembi/ModernBERT-base-embed with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("clembi/ModernBERT-base-embed") sentences = [ "In 1831, interesting novels were written in Paris.", "Hugo and Dumas met in the Opera in Paris in 1831.", "Many interesting novels are released in the 21st century.", "A new vegan burger is offered at the counter from now on." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Welcome to the community
The community tab is the place to discuss and collaborate with the HF community!