Sentence Similarity
sentence-transformers
Safetensors
modernbert
feature-extraction
Generated from Trainer
dataset_size:8963241
loss:EmbedDistillLoss
Eval Results (legacy)
text-embeddings-inference
Instructions to use sobamchan/monnem-large-v0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use sobamchan/monnem-large-v0 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("sobamchan/monnem-large-v0") sentences = [ "A man in shorts and a woman in a black and white polka dot bikini sunbathing on the beach.", "A man is standing in a field with a green plant in it.", "A woman preparing some pork.", "uh-huh uh-huh well what other movies have you seen then lately" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
metadata
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:8963241
- loss:EmbedDistillLoss
base_model: answerdotai/ModernBERT-large
widget:
- source_sentence: >-
A man in shorts and a woman in a black and white polka dot bikini
sunbathing on the beach.
sentences:
- A man is standing in a field with a green plant in it.
- A woman preparing some pork.
- uh-huh uh-huh well what other movies have you seen then lately
- source_sentence: A man is standing in a forest practicing a martial art.
sentences:
- >-
Two men are standing in a room, pointing in opposite directions, while
another man is standing in between them looking to his left.
- A woman in a white button up shirt is holding a rope and smiling.
- >-
And a special In Madrid, thanks to the siesta lunch break, the rush hour
happens not twice, but three times a day.
- source_sentence: A Boston Terrier is running on lush green grass in front of a white fence.
sentences:
- >-
The distinctive, sculpted marble figures of the era are now being
reproduced in vast quantities as souvenirs.
- An older lady in a blue shirt in a rowboat.
- >-
A man wearing jeans and no shirt is midair doing a kick flip on a
skateboard.
- source_sentence: Two dogs are chasing a ball.
sentences:
- >-
I loved you that first moment in the car when the bullet grazed your
cheek… . Five minutes later Jane murmured softly: "I don't know London
very well, Julius, but is it such a very long way from the Savoy to the
Ritz?"
- A person is sleeping on a bench, next to cars.
- >-
One of the more scenic is the five-mile River Mountain Trail, which
offers fine views of both Lake Mead and the Las Vegas Valley.
- source_sentence: A woman in purple riding a brown horse, competitively.
sentences:
- >-
and uh they they have designated smoking but it's just wide open it's
not ventilated properly and i think that's bad but as far as the drugs
you know being in the factory kind of environment that way
- 1.5, formerly methodology transfer paper 5. Using Statistical Sampling.
- >-
The oldest dances are survivors from Moorish times, and are usually
performed in mountain villages.
pipeline_tag: sentence-similarity
library_name: sentence-transformers
metrics:
- pearson_cosine
- spearman_cosine
model-index:
- name: SentenceTransformer based on answerdotai/ModernBERT-large
results:
- task:
type: semantic-similarity
name: Semantic Similarity
dataset:
name: sts dev
type: sts-dev
metrics:
- type: pearson_cosine
value: 0.8704018510417749
name: Pearson Cosine
- type: spearman_cosine
value: 0.8718236865761443
name: Spearman Cosine
SentenceTransformer based on answerdotai/ModernBERT-large
This is a sentence-transformers model finetuned from answerdotai/ModernBERT-large. It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for retrieval.
Model Details
Model Description
- Model Type: Sentence Transformer
- Base model: answerdotai/ModernBERT-large
- Maximum Sequence Length: 512 tokens
- Output Dimensionality: 1024 dimensions
- Similarity Function: Cosine Similarity
- Supported Modality: Text
Model Sources
- Documentation: Sentence Transformers Documentation
- Repository: Sentence Transformers on GitHub
- Hugging Face: Sentence Transformers on Hugging Face
Full Model Architecture
SentenceTransformer(
(0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'architecture': 'ModernBertModel'})
(1): Pooling({'embedding_dimension': 1024, 'pooling_mode': 'mean', 'include_prompt': True})
)
Usage
Direct Usage (Sentence Transformers)
First install the Sentence Transformers library:
pip install -U sentence-transformers
Then you can load this model and run inference.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("sentence_transformers_model_id")
# Run inference
sentences = [
'A woman in purple riding a brown horse, competitively.',
"and uh they they have designated smoking but it's just wide open it's not ventilated properly and i think that's bad but as far as the drugs you know being in the factory kind of environment that way",
'The oldest dances are survivors from Moorish times, and are usually performed in mountain villages.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 1024]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[ 1.0000, -0.0255, 0.1637],
# [-0.0255, 1.0000, 0.0579],
# [ 0.1637, 0.0579, 1.0000]])