---
language:
- en
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:3012496
- loss:CachedMultipleNegativesRankingLoss
base_model: answerdotai/ModernBERT-base
widget:
- source_sentence: how much is a car title transfer in minnesota?
sentences:
- This complex is a larger molecule than the original crystal violet stain and iodine
and is insoluble in water. ... Conversely, the the outer membrane of Gram negative
bacteria is degraded and the thinner peptidoglycan layer of Gram negative cells
is unable to retain the crystal violet-iodine complex and the color is lost.
- Get insurance on the car and provide proof. Bring this information (including
the title) to the Minnesota DVS office, as well as $10 for the filing fee and
$7.25 for the titling fee. There is also a $10 transfer tax, as well as a 6.5%
sales tax on the purchase price.
- 'One of the risks of DNP is that it accelerates the metabolism to a dangerously
fast level. Our metabolic system operates at the rate it does for a reason – it
is safe. Speeding up the metabolism may help burn off fat, but it can also trigger
a number of potentially dangerous side effects, such as: fever.'
- source_sentence: what is the difference between 18 and 20 inch tires?
sentences:
- The only real difference is a 20" rim would be more likely to be damaged, as you
pointed out. Beyond looks, there is zero benefit for the 20" rim. Also, just the
availability of tires will likely be much more limited for the larger rim. ...
Tire selection is better for 18" wheels than 20" wheels.
- '[''Open your Outlook app on your mobile device and click on the Settings gear
icon.'', ''Under Settings, click on the Signature option.'', ''Enter either a
generic signature that could be used for all email accounts tied to your Outlook
app, or a specific signature, Per Account Signature, for each email account.'']'
- The average normal body temperature is around 98.6 degrees Fahrenheit, or 37 degrees
Celsius. If your body temperature drops to just a few degrees lower than this,
your blood vessels in your hands, feet, arms, and legs start to get narrower.
- source_sentence: whom the bell tolls meaning?
sentences:
- 'Answer: Humans are depicted in Hindu art often in sensuous and erotic postures.'
- The phrase "For whom the bell tolls" refers to the church bells that are rung
when a person dies. Hence, the author is suggesting that we should not be curious
as to for whom the church bell is tolling for. It is for all of us.
- '[''Automatically.'', ''When connected to car Bluetooth and,'', ''Manually.'']'
- source_sentence: how long before chlamydia symptoms appear?
sentences:
- Most people who have chlamydia don't notice any symptoms. If you do get symptoms,
these usually appear between 1 and 3 weeks after having unprotected sex with an
infected person. For some people they don't develop until many months later. Sometimes
the symptoms can disappear after a few days.
- '[''Open the My Verizon app . ... '', ''Tap the Menu icon. ... '', ''Tap Manage
device for the appropriate mobile number. ... '', ''Tap Transfer content between
phones. ... '', ''Tap Start Transfer.'']'
- 'Psychiatrist vs Psychologist A psychiatrist is classed as a medical doctor, they
include a physical examination of symptoms in their assessment and are able to
prescribe medicine: a psychologist is also a doctor by virtue of their PHD level
qualification, but is not medically trained and cannot prescribe.'
- source_sentence: are you human korean novela?
sentences:
- Many cysts heal on their own, which means that conservative treatments like rest
and anti-inflammatory painkillers can often be enough to get rid of them. However,
in some cases, routine drainage of the sac may be necessary to reduce symptoms.
- A relative of European pear varieties like Bartlett and Anjou, the Asian pear
is great used in recipes or simply eaten out of hand. It retains a crispness that
works well in slaws and salads, and it holds its shape better than European pears
when baked and cooked.
- 'Are You Human? (Korean: 너도 인간이니; RR: Neodo Inganini; lit. Are You Human Too?)
is a 2018 South Korean television series starring Seo Kang-jun and Gong Seung-yeon.
It aired on KBS2''s Mondays and Tuesdays at 22:00 (KST) time slot, from June 4
to August 7, 2018.'
datasets:
- sentence-transformers/gooaq
pipeline_tag: sentence-similarity
library_name: sentence-transformers
metrics:
- cosine_accuracy@1
- cosine_accuracy@3
- cosine_accuracy@5
- cosine_accuracy@10
- cosine_precision@1
- cosine_precision@3
- cosine_precision@5
- cosine_precision@10
- cosine_recall@1
- cosine_recall@3
- cosine_recall@5
- cosine_recall@10
- cosine_ndcg@10
- cosine_mrr@10
- cosine_map@100
model-index:
- name: SentenceTransformer based on answerdotai/ModernBERT-base
results:
- task:
type: information-retrieval
name: Information Retrieval
dataset:
name: NanoNQ
type: NanoNQ
metrics:
- type: cosine_accuracy@1
value: 0.38
name: Cosine Accuracy@1
- type: cosine_accuracy@3
value: 0.64
name: Cosine Accuracy@3
- type: cosine_accuracy@5
value: 0.7
name: Cosine Accuracy@5
- type: cosine_accuracy@10
value: 0.8
name: Cosine Accuracy@10
- type: cosine_precision@1
value: 0.38
name: Cosine Precision@1
- type: cosine_precision@3
value: 0.22
name: Cosine Precision@3
- type: cosine_precision@5
value: 0.14400000000000002
name: Cosine Precision@5
- type: cosine_precision@10
value: 0.08199999999999999
name: Cosine Precision@10
- type: cosine_recall@1
value: 0.36
name: Cosine Recall@1
- type: cosine_recall@3
value: 0.62
name: Cosine Recall@3
- type: cosine_recall@5
value: 0.67
name: Cosine Recall@5
- type: cosine_recall@10
value: 0.74
name: Cosine Recall@10
- type: cosine_ndcg@10
value: 0.5673854489333459
name: Cosine Ndcg@10
- type: cosine_mrr@10
value: 0.5237460317460316
name: Cosine Mrr@10
- type: cosine_map@100
value: 0.5116785860647901
name: Cosine Map@100
- task:
type: information-retrieval
name: Information Retrieval
dataset:
name: NanoMSMARCO
type: NanoMSMARCO
metrics:
- type: cosine_accuracy@1
value: 0.32
name: Cosine Accuracy@1
- type: cosine_accuracy@3
value: 0.56
name: Cosine Accuracy@3
- type: cosine_accuracy@5
value: 0.66
name: Cosine Accuracy@5
- type: cosine_accuracy@10
value: 0.82
name: Cosine Accuracy@10
- type: cosine_precision@1
value: 0.32
name: Cosine Precision@1
- type: cosine_precision@3
value: 0.18666666666666665
name: Cosine Precision@3
- type: cosine_precision@5
value: 0.132
name: Cosine Precision@5
- type: cosine_precision@10
value: 0.08199999999999999
name: Cosine Precision@10
- type: cosine_recall@1
value: 0.32
name: Cosine Recall@1
- type: cosine_recall@3
value: 0.56
name: Cosine Recall@3
- type: cosine_recall@5
value: 0.66
name: Cosine Recall@5
- type: cosine_recall@10
value: 0.82
name: Cosine Recall@10
- type: cosine_ndcg@10
value: 0.555381357077638
name: Cosine Ndcg@10
- type: cosine_mrr@10
value: 0.47249206349206346
name: Cosine Mrr@10
- type: cosine_map@100
value: 0.4797949229011178
name: Cosine Map@100
- task:
type: nano-beir
name: Nano BEIR
dataset:
name: NanoBEIR mean
type: NanoBEIR_mean
metrics:
- type: cosine_accuracy@1
value: 0.35
name: Cosine Accuracy@1
- type: cosine_accuracy@3
value: 0.6000000000000001
name: Cosine Accuracy@3
- type: cosine_accuracy@5
value: 0.6799999999999999
name: Cosine Accuracy@5
- type: cosine_accuracy@10
value: 0.81
name: Cosine Accuracy@10
- type: cosine_precision@1
value: 0.35
name: Cosine Precision@1
- type: cosine_precision@3
value: 0.2033333333333333
name: Cosine Precision@3
- type: cosine_precision@5
value: 0.138
name: Cosine Precision@5
- type: cosine_precision@10
value: 0.08199999999999999
name: Cosine Precision@10
- type: cosine_recall@1
value: 0.33999999999999997
name: Cosine Recall@1
- type: cosine_recall@3
value: 0.5900000000000001
name: Cosine Recall@3
- type: cosine_recall@5
value: 0.665
name: Cosine Recall@5
- type: cosine_recall@10
value: 0.78
name: Cosine Recall@10
- type: cosine_ndcg@10
value: 0.5613834030054919
name: Cosine Ndcg@10
- type: cosine_mrr@10
value: 0.4981190476190476
name: Cosine Mrr@10
- type: cosine_map@100
value: 0.49573675448295396
name: Cosine Map@100
---
# SentenceTransformer based on answerdotai/ModernBERT-base
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [answerdotai/ModernBERT-base](https://huggingface.co/answerdotai/ModernBERT-base) on the [gooaq](https://huggingface.co/datasets/sentence-transformers/gooaq) dataset. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
## Model Details
### Model Description
- **Model Type:** Sentence Transformer
- **Base model:** [answerdotai/ModernBERT-base](https://huggingface.co/answerdotai/ModernBERT-base)
- **Maximum Sequence Length:** 512 tokens
- **Output Dimensionality:** 768 dimensions
- **Similarity Function:** Cosine Similarity
- **Training Dataset:**
- [gooaq](https://huggingface.co/datasets/sentence-transformers/gooaq)
- **Language:** en
### Model Sources
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
### Full Model Architecture
```
SentenceTransformer(
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: ModernBertModel
(1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
)
```
## Usage
### Direct Usage (Sentence Transformers)
First install the Sentence Transformers library:
```bash
pip install -U sentence-transformers
```
Then you can load this model and run inference.
```python
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("tomaarsen/ModernBERT-base-gooaq")
# Run inference
sentences = [
'are you human korean novela?',
"Are You Human? (Korean: 너도 인간이니; RR: Neodo Inganini; lit. Are You Human Too?) is a 2018 South Korean television series starring Seo Kang-jun and Gong Seung-yeon. It aired on KBS2's Mondays and Tuesdays at 22:00 (KST) time slot, from June 4 to August 7, 2018.",
'A relative of European pear varieties like Bartlett and Anjou, the Asian pear is great used in recipes or simply eaten out of hand. It retains a crispness that works well in slaws and salads, and it holds its shape better than European pears when baked and cooked.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
```
## Evaluation
### Metrics
#### Information Retrieval
* Datasets: `NanoNQ` and `NanoMSMARCO`
* Evaluated with [InformationRetrievalEvaluator
](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
| Metric | NanoNQ | NanoMSMARCO |
|:--------------------|:-----------|:------------|
| cosine_accuracy@1 | 0.38 | 0.32 |
| cosine_accuracy@3 | 0.64 | 0.56 |
| cosine_accuracy@5 | 0.7 | 0.66 |
| cosine_accuracy@10 | 0.8 | 0.82 |
| cosine_precision@1 | 0.38 | 0.32 |
| cosine_precision@3 | 0.22 | 0.1867 |
| cosine_precision@5 | 0.144 | 0.132 |
| cosine_precision@10 | 0.082 | 0.082 |
| cosine_recall@1 | 0.36 | 0.32 |
| cosine_recall@3 | 0.62 | 0.56 |
| cosine_recall@5 | 0.67 | 0.66 |
| cosine_recall@10 | 0.74 | 0.82 |
| **cosine_ndcg@10** | **0.5674** | **0.5554** |
| cosine_mrr@10 | 0.5237 | 0.4725 |
| cosine_map@100 | 0.5117 | 0.4798 |
#### Nano BEIR
* Dataset: `NanoBEIR_mean`
* Evaluated with [NanoBEIREvaluator
](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.NanoBEIREvaluator)
| Metric | Value |
|:--------------------|:-----------|
| cosine_accuracy@1 | 0.35 |
| cosine_accuracy@3 | 0.6 |
| cosine_accuracy@5 | 0.68 |
| cosine_accuracy@10 | 0.81 |
| cosine_precision@1 | 0.35 |
| cosine_precision@3 | 0.2033 |
| cosine_precision@5 | 0.138 |
| cosine_precision@10 | 0.082 |
| cosine_recall@1 | 0.34 |
| cosine_recall@3 | 0.59 |
| cosine_recall@5 | 0.665 |
| cosine_recall@10 | 0.78 |
| **cosine_ndcg@10** | **0.5614** |
| cosine_mrr@10 | 0.4981 |
| cosine_map@100 | 0.4957 |
## Training Details
### Training Dataset
#### gooaq
* Dataset: [gooaq](https://huggingface.co/datasets/sentence-transformers/gooaq) at [b089f72](https://huggingface.co/datasets/sentence-transformers/gooaq/tree/b089f728748a068b7bc5234e5bcf5b25e3c8279c)
* Size: 3,012,496 training samples
* Columns: question
and answer
* Approximate statistics based on the first 1000 samples:
| | question | answer |
|:--------|:---------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
| type | string | string |
| details |
what is the difference between clay and mud mask?
| The main difference between the two is that mud is a skin-healing agent, while clay is a cosmetic, drying agent. Clay masks are most useful for someone who has oily skin and is prone to breakouts of acne and blemishes.
|
| myki how much on card?
| A full fare myki card costs $6 and a concession, seniors or child myki costs $3. For more information about how to use your myki, visit ptv.vic.gov.au or call 1800 800 007.
|
| how to find out if someone blocked your phone number on iphone?
| If you get a notification like "Message Not Delivered" or you get no notification at all, that's a sign of a potential block. Next, you could try calling the person. If the call goes right to voicemail or rings once (or a half ring) then goes to voicemail, that's further evidence you may have been blocked.
|
* Loss: [CachedMultipleNegativesRankingLoss
](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cachedmultiplenegativesrankingloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
```
### Evaluation Dataset
#### gooaq
* Dataset: [gooaq](https://huggingface.co/datasets/sentence-transformers/gooaq) at [b089f72](https://huggingface.co/datasets/sentence-transformers/gooaq/tree/b089f728748a068b7bc5234e5bcf5b25e3c8279c)
* Size: 3,012,496 evaluation samples
* Columns: question
and answer
* Approximate statistics based on the first 1000 samples:
| | question | answer |
|:--------|:----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
| type | string | string |
| details | how do i program my directv remote with my tv?
| ['Press MENU on your remote.', 'Select Settings & Help > Settings > Remote Control > Program Remote.', 'Choose the device (TV, audio, DVD) you wish to program. ... ', 'Follow the on-screen prompts to complete programming.']
|
| are rodrigues fruit bats nocturnal?
| Before its numbers were threatened by habitat destruction, storms, and hunting, some of those groups could number 500 or more members. Sunrise, sunset. Rodrigues fruit bats are most active at dawn, at dusk, and at night.
|
| why does your heart rate increase during exercise bbc bitesize?
| During exercise there is an increase in physical activity and muscle cells respire more than they do when the body is at rest. The heart rate increases during exercise. The rate and depth of breathing increases - this makes sure that more oxygen is absorbed into the blood, and more carbon dioxide is removed from it.
|
* Loss: [CachedMultipleNegativesRankingLoss
](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cachedmultiplenegativesrankingloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
```
### Training Hyperparameters
#### Non-Default Hyperparameters
- `eval_strategy`: steps
- `per_device_train_batch_size`: 2048
- `per_device_eval_batch_size`: 2048
- `learning_rate`: 8e-05
- `num_train_epochs`: 1
- `warmup_ratio`: 0.05
- `bf16`: True
- `batch_sampler`: no_duplicates
#### All Hyperparameters