---
base_model: google-bert/bert-base-uncased
datasets:
- sentence-transformers/gooaq
language:
- en
library_name: sentence-transformers
license: apache-2.0
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
- dot_accuracy@1
- dot_accuracy@3
- dot_accuracy@5
- dot_accuracy@10
- dot_precision@1
- dot_precision@3
- dot_precision@5
- dot_precision@10
- dot_recall@1
- dot_recall@3
- dot_recall@5
- dot_recall@10
- dot_ndcg@10
- dot_mrr@10
- dot_map@100
pipeline_tag: sentence-similarity
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:3002496
- loss:MultipleNegativesRankingLoss
widget:
- source_sentence: how to change date format in ms project 2007?
sentences:
- '[''Choose File > Options.'', ''Select General.'', ''Under Project view, pick
an option from the Date format list.'']'
- Cats can be very affectionate and bonded with each other and still bond well and
show affection to their human. Getting two kittens from the same litter, regardless
of gender, can make it easier for them to befriend each other and play—but any
two kittens generally tend to get on well after introductions.
- 'Treat your permed hair like silk or another delicate fabric: washing it once
a week is enough to keep it clean and help maintain its beauty. Wash your hair
with warm water. Hot water can strip your hair of oils that help keep it moisturized
and looking lustrous. Hot water can also ruin the curls.'
- source_sentence: is the mother in vinegar good for you?
sentences:
- Some people say the “mother,” the cloud of yeast and bacteria you might see in
a bottle of apple cider vinegar, is what makes it healthy. These things are probiotic,
meaning they might give your digestive system a boost, but there isn't enough
research to back up the other claims.
- It is normal for vaginal discharge to increase in amount and become “stringy”
(like egg whites) during the middle of your menstrual cycle when you're ovulating.
If you find that your normal discharge is annoying, you can wear panty liners/shields
on your underwear.
- State law protects cypress trees along Florida's waterways, but it has been up
to the courts to enforce the regulations. ... Landowners can cut down cypress
trees on their land, but trees below the high-water mark are considered state
property and are protected.
- source_sentence: if you're blocked on whatsapp can you see last seen?
sentences:
- Jaguars aren't going to London this year, releases new plan for season tickets.
The Jaguars will no longer be playing two games in London, and will instead play
both games at TIAA Bank Field.
- Typically, most drugs are absorbed within 20-30 minutes after given by mouth.
Vomiting after this amount of time is not related to the drug in the stomach as
the vast majority, if not all, has already been absorbed.
- You can no longer see a contact's last seen or online in the chat window. Learn
more here. You do not see updates to a contact's profile photo. Any messages sent
to a contact who has blocked you will always show one check mark (message sent),
and never show a second check mark (message delivered).
- source_sentence: how many enchantments can you put on armor?
sentences:
- 4 Answers. You can in theory add every enchantment that is compatible with a tool/weapon/armor
onto the same item. The bow can have these 7 enchantments, though mending and
infinity are mutually exclusive.
- The sleeve length will make or break a jacket. If too long, it will make the jacket
look too big, and if too short, like you have outgrown your jacket. ... This is
when you need an experienced tailor, who will be able to shorten the sleeves from
the shoulders, so the details on the cuffs are not disturbed.
- Grace period of 60 days granted after the expiration of license for purpose of
renewal, and license is valid during this period. Renewal of license may occur
from 60 days (effective August 1, 2016, 180 days) prior to expiration to 3 years
after date; afterwards, applicant required to take and pass examination.
- source_sentence: what is the best drugstore shampoo for volume?
sentences:
- '[''#8. ... '', ''#7. ... '', ''#6. Hask Biotin Boost Shampoo. ... '', ''#5. Pantene
Pro-V Sheer Volume Shampoo. ... '', ''#4. John Frieda Luxurious Volume Touchably
Full Shampoo. ... '', ''#3. Acure Vivacious Volume Peppermint Shampoo. ... '',
''#2. OGX Thick & Full Biotin & Collagen Shampoo. ... '', "#1. L''Oréal Paris
EverPure Sulfate Free Volume Shampoo."]'
- Genes can't control an organism on their own; rather, they must interact with
and respond to the organism's environment. Some genes are constitutive, or always
"on," regardless of environmental conditions.
- In electricity, the phase refers to the distribution of a load. What is the difference
between single-phase and three-phase power supplies? Single-phase power is a two-wire
alternating current (ac) power circuit. ... Three-phase power is a three-wire
ac power circuit with each phase ac signal 120 electrical degrees apart.
co2_eq_emissions:
emissions: 523.8395173647017
energy_consumed: 1.3476635503925931
source: codecarbon
training_type: fine-tuning
on_cloud: false
cpu_model: 13th Gen Intel(R) Core(TM) i7-13700K
ram_total_size: 31.777088165283203
hours_used: 3.544
hardware_used: 1 x NVIDIA GeForce RTX 3090
model-index:
- name: BERT base uncased trained on GooAQ triplets
results:
- task:
type: information-retrieval
name: Information Retrieval
dataset:
name: gooaq dev
type: gooaq-dev
metrics:
- type: cosine_accuracy@1
value: 0.7001
name: Cosine Accuracy@1
- type: cosine_accuracy@3
value: 0.8712
name: Cosine Accuracy@3
- type: cosine_accuracy@5
value: 0.9219
name: Cosine Accuracy@5
- type: cosine_accuracy@10
value: 0.9629
name: Cosine Accuracy@10
- type: cosine_precision@1
value: 0.7001
name: Cosine Precision@1
- type: cosine_precision@3
value: 0.2904
name: Cosine Precision@3
- type: cosine_precision@5
value: 0.18438000000000002
name: Cosine Precision@5
- type: cosine_precision@10
value: 0.09629000000000001
name: Cosine Precision@10
- type: cosine_recall@1
value: 0.7001
name: Cosine Recall@1
- type: cosine_recall@3
value: 0.8712
name: Cosine Recall@3
- type: cosine_recall@5
value: 0.9219
name: Cosine Recall@5
- type: cosine_recall@10
value: 0.9629
name: Cosine Recall@10
- type: cosine_ndcg@10
value: 0.8358567622290791
name: Cosine Ndcg@10
- type: cosine_mrr@10
value: 0.7945682142857085
name: Cosine Mrr@10
- type: cosine_map@100
value: 0.796615366916047
name: Cosine Map@100
- type: dot_accuracy@1
value: 0.6709
name: Dot Accuracy@1
- type: dot_accuracy@3
value: 0.8558
name: Dot Accuracy@3
- type: dot_accuracy@5
value: 0.9096
name: Dot Accuracy@5
- type: dot_accuracy@10
value: 0.9567
name: Dot Accuracy@10
- type: dot_precision@1
value: 0.6709
name: Dot Precision@1
- type: dot_precision@3
value: 0.28526666666666667
name: Dot Precision@3
- type: dot_precision@5
value: 0.18192000000000003
name: Dot Precision@5
- type: dot_precision@10
value: 0.09567
name: Dot Precision@10
- type: dot_recall@1
value: 0.6709
name: Dot Recall@1
- type: dot_recall@3
value: 0.8558
name: Dot Recall@3
- type: dot_recall@5
value: 0.9096
name: Dot Recall@5
- type: dot_recall@10
value: 0.9567
name: Dot Recall@10
- type: dot_ndcg@10
value: 0.8177950307933399
name: Dot Ndcg@10
- type: dot_mrr@10
value: 0.772776468253962
name: Dot Mrr@10
- type: dot_map@100
value: 0.7751231358698718
name: Dot Map@100
---
# BERT base uncased trained on GooAQ triplets
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [google-bert/bert-base-uncased](https://huggingface.co/google-bert/bert-base-uncased) on the [sentence-transformers/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:** [google-bert/bert-base-uncased](https://huggingface.co/google-bert/bert-base-uncased)
- **Maximum Sequence Length:** 512 tokens
- **Output Dimensionality:** 768 tokens
- **Similarity Function:** Cosine Similarity
- **Training Dataset:**
- [sentence-transformers/gooaq](https://huggingface.co/datasets/sentence-transformers/gooaq)
- **Language:** en
- **License:** apache-2.0
### 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: BertModel
(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/bert-base-uncased-gooaq")
# Run inference
sentences = [
'what is the best drugstore shampoo for volume?',
'[\'#8. ... \', \'#7. ... \', \'#6. Hask Biotin Boost Shampoo. ... \', \'#5. Pantene Pro-V Sheer Volume Shampoo. ... \', \'#4. John Frieda Luxurious Volume Touchably Full Shampoo. ... \', \'#3. Acure Vivacious Volume Peppermint Shampoo. ... \', \'#2. OGX Thick & Full Biotin & Collagen Shampoo. ... \', "#1. L\'Oréal Paris EverPure Sulfate Free Volume Shampoo."]',
'In electricity, the phase refers to the distribution of a load. What is the difference between single-phase and three-phase power supplies? Single-phase power is a two-wire alternating current (ac) power circuit. ... Three-phase power is a three-wire ac power circuit with each phase ac signal 120 electrical degrees apart.',
]
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
* Dataset: `gooaq-dev`
* Evaluated with [InformationRetrievalEvaluator
](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
| Metric | Value |
|:--------------------|:-----------|
| cosine_accuracy@1 | 0.7001 |
| cosine_accuracy@3 | 0.8712 |
| cosine_accuracy@5 | 0.9219 |
| cosine_accuracy@10 | 0.9629 |
| cosine_precision@1 | 0.7001 |
| cosine_precision@3 | 0.2904 |
| cosine_precision@5 | 0.1844 |
| cosine_precision@10 | 0.0963 |
| cosine_recall@1 | 0.7001 |
| cosine_recall@3 | 0.8712 |
| cosine_recall@5 | 0.9219 |
| cosine_recall@10 | 0.9629 |
| cosine_ndcg@10 | 0.8359 |
| cosine_mrr@10 | 0.7946 |
| **cosine_map@100** | **0.7966** |
| dot_accuracy@1 | 0.6709 |
| dot_accuracy@3 | 0.8558 |
| dot_accuracy@5 | 0.9096 |
| dot_accuracy@10 | 0.9567 |
| dot_precision@1 | 0.6709 |
| dot_precision@3 | 0.2853 |
| dot_precision@5 | 0.1819 |
| dot_precision@10 | 0.0957 |
| dot_recall@1 | 0.6709 |
| dot_recall@3 | 0.8558 |
| dot_recall@5 | 0.9096 |
| dot_recall@10 | 0.9567 |
| dot_ndcg@10 | 0.8178 |
| dot_mrr@10 | 0.7728 |
| dot_map@100 | 0.7751 |
## Training Details
### Training Dataset
#### sentence-transformers/gooaq
* Dataset: [sentence-transformers/gooaq](https://huggingface.co/datasets/sentence-transformers/gooaq) at [b089f72](https://huggingface.co/datasets/sentence-transformers/gooaq/tree/b089f728748a068b7bc5234e5bcf5b25e3c8279c)
* Size: 3,002,496 training samples
* Columns: question
and answer
* Approximate statistics based on the first 1000 samples:
| | question | answer |
|:--------|:----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
| type | string | string |
| details |
what are the differences between internet and web?
| The Internet is a global network of networks while the Web, also referred formally as World Wide Web (www) is collection of information which is accessed via the Internet. Another way to look at this difference is; the Internet is infrastructure while the Web is service on top of that infrastructure.
|
| who is the most important person in a first aid situation?
| Subscribe to New First Aid For Free The main principle of incident management is that you are the most important person and your safety comes first! Your first actions when coming across the scene of an incident should be: Check for any dangers to yourself or bystanders. Manage any dangers found (if safe to do so)
|
| why is jibjab not working?
| Usually disabling your ad blockers for JibJab will resolve this issue. If you're still having issues loading the card after your ad blockers are disabled, you can try clearing your cache/cookies or updating and restarting your browser. As a last resort, you can try opening JibJab from a different browser.
|
* Loss: [MultipleNegativesRankingLoss
](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
```
### Evaluation Dataset
#### sentence-transformers/gooaq
* Dataset: [sentence-transformers/gooaq](https://huggingface.co/datasets/sentence-transformers/gooaq) at [b089f72](https://huggingface.co/datasets/sentence-transformers/gooaq/tree/b089f728748a068b7bc5234e5bcf5b25e3c8279c)
* Size: 10,000 evaluation samples
* Columns: question
and answer
* Approximate statistics based on the first 1000 samples:
| | question | answer |
|:--------|:----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
| type | string | string |
| details | what are some common attributes/characteristics between animal and human?
| ['Culture.', 'Emotions.', 'Language.', 'Humour.', 'Tool Use.', 'Memory.', 'Self-Awareness.', 'Intelligence.']
|
| is folic acid the same as vitamin b?
| Vitamin B9, also called folate or folic acid, is one of 8 B vitamins. All B vitamins help the body convert food (carbohydrates) into fuel (glucose), which is used to produce energy. These B vitamins, often referred to as B-complex vitamins, also help the body use fats and protein.
|
| are bendy buses still in london?
| Bendy bus makes final journey for Transport for London. The last of London's bendy buses was taken off the roads on Friday night. ... The final route to be operated with bendy buses has been the 207 between Hayes and White City, and the last of the long vehicles was to run late on Friday.
|
* Loss: [MultipleNegativesRankingLoss
](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
```
### Training Hyperparameters
#### Non-Default Hyperparameters
- `eval_strategy`: steps
- `per_device_train_batch_size`: 128
- `per_device_eval_batch_size`: 128
- `learning_rate`: 2e-05
- `num_train_epochs`: 1
- `warmup_ratio`: 0.1
- `bf16`: True
- `batch_sampler`: no_duplicates
#### All Hyperparameters