---
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:1000000
- loss:DenoisingAutoEncoderLoss
base_model: google-bert/bert-base-uncased
widget:
- source_sentence: He wound up homeless in the Mission District, playing for change
in the streets.
sentences:
- He wound up homeless, playing in streets
- It line-up of professional footballers,, firefighters and survivors.
- A (Dakota) belonging to the Dutch Air crash-landed near Beswick (Beswick Creek
now Barunga?
- source_sentence: The division remained near Arkhangelsk until the beginning of August,
when it was shipped across the White Sea to Murmansk.
sentences:
- The division remained near Arkhangelsk until the beginning of August, when it
was shipped across White Sea to Murmansk.
- The building is and.
- Maxim Triesman born October) is politician banker trade union leader.
- source_sentence: '"Leper," the last song on the album, was left as an instrumental
as Jourgensen had left the studio earlier than scheduled and did not care to write
any lyrics.'
sentences:
- There produced the viral host cells processes, more suitable environment for viral
replication transcription.
- As a the to
- Leper, the song on the album was left as an as Jourgensen had left the studio
scheduled and did care to any lyrics
- source_sentence: Prince and princess have given Gerda her their golden coach so
she can continue her search for Kay.
sentences:
- and princess given Gerda their golden coach so she can her search for Kay.
- handled the cinematography
- University Hoekstra was Professor of and Department of Multidisciplinary Water.
- source_sentence: While the early models stayed close to their original form, eight
subsequent generations varied substantially in size and styling.
sentences:
- While the stayed close their, eight generations varied substantially in size and
- Their influence, his's own tradition, his special organization all combined to
divert the young into a political career
- “ U ” cross of the river are a recent
datasets:
- princeton-nlp/datasets-for-simcse
pipeline_tag: sentence-similarity
library_name: sentence-transformers
metrics:
- pearson_cosine
- spearman_cosine
co2_eq_emissions:
emissions: 556.5173349579181
energy_consumed: 1.4317326253991955
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: 4.403
hardware_used: 1 x NVIDIA GeForce RTX 3090
model-index:
- name: SentenceTransformer based on google-bert/bert-base-uncased
results:
- task:
type: semantic-similarity
name: Semantic Similarity
dataset:
name: sts dev
type: sts-dev
metrics:
- type: pearson_cosine
value: 0.6732163313155011
name: Pearson Cosine
- type: spearman_cosine
value: 0.6765812652563955
name: Spearman Cosine
- task:
type: semantic-similarity
name: Semantic Similarity
dataset:
name: sts test
type: sts-test
metrics:
- type: pearson_cosine
value: 0.6424591318281525
name: Pearson Cosine
- type: spearman_cosine
value: 0.6322331484751982
name: Spearman Cosine
---
# SentenceTransformer based on google-bert/bert-base-uncased
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 [datasets-for-simcse](https://huggingface.co/datasets/princeton-nlp/datasets-for-simcse) 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:** 75 tokens
- **Output Dimensionality:** 768 dimensions
- **Similarity Function:** Cosine Similarity
- **Training Dataset:**
- [datasets-for-simcse](https://huggingface.co/datasets/princeton-nlp/datasets-for-simcse)
### 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': 75, 'do_lower_case': False}) with Transformer model: BertModel
(1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, '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-stsb-tsdae")
# Run inference
sentences = [
'While the early models stayed close to their original form, eight subsequent generations varied substantially in size and styling.',
'While the stayed close their, eight generations varied substantially in size and',
'“ U ” cross of the river are a recent',
]
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
#### Semantic Similarity
* Datasets: `sts-dev` and `sts-test`
* Evaluated with [EmbeddingSimilarityEvaluator
](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
| Metric | sts-dev | sts-test |
|:--------------------|:-----------|:-----------|
| pearson_cosine | 0.6732 | 0.6425 |
| **spearman_cosine** | **0.6766** | **0.6322** |
## Training Details
### Training Dataset
#### datasets-for-simcse
* Dataset: [datasets-for-simcse](https://huggingface.co/datasets/princeton-nlp/datasets-for-simcse) at [e145e8b](https://huggingface.co/datasets/princeton-nlp/datasets-for-simcse/tree/e145e8bb659b2aa2669f32ef79cb4cdef6c58fef)
* Size: 1,000,000 training samples
* Columns: text
and noisy
* Approximate statistics based on the first 1000 samples:
| | text | noisy |
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
| type | string | string |
| details |
White was born in Iver, England.
| White was born in Iver,
|
| The common mangrove plants are "Rhizophora mucronata", "Sonneratia caseolaris", "Avicennia" spp., and "Aegiceras corniculatum".
| plants are Rhizophora mucronata" "Sonneratia, spp.,".
|
| H3K9ac and H3K14ac have been shown to be part of the active promoter state.
| H3K9ac been part of active promoter state.
|
* Loss: [DenoisingAutoEncoderLoss
](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#denoisingautoencoderloss)
### Evaluation Dataset
#### datasets-for-simcse
* Dataset: [datasets-for-simcse](https://huggingface.co/datasets/princeton-nlp/datasets-for-simcse) at [e145e8b](https://huggingface.co/datasets/princeton-nlp/datasets-for-simcse/tree/e145e8bb659b2aa2669f32ef79cb4cdef6c58fef)
* Size: 1,000,000 evaluation samples
* Columns: text
and noisy
* Approximate statistics based on the first 1000 samples:
| | text | noisy |
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
| type | string | string |
| details | Philippe Hervé (born 16 April 1959) is a French water polo player.
| Philippe Hervé born April 1959 is French
|
| lies at the very edge of Scottish offshore waters, close to the maritime boundary with Norway.
| the edge Scottish offshore waters close to maritime boundary with Norway
|
| The place is an exceptional example of the forced migration of convicts (Vinegar Hill rebels) and the development associated with punishment and reform, particularly convict labour and the associated coal mines.
| The is an example of forced migration of convicts (Vinegar rebels and the development punishment and reform, particularly convict and the associated coal.
|
* Loss: [DenoisingAutoEncoderLoss
](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#denoisingautoencoderloss)
### Training Hyperparameters
#### Non-Default Hyperparameters
- `eval_strategy`: steps
- `learning_rate`: 3e-05
- `num_train_epochs`: 1
- `warmup_ratio`: 0.1
- `fp16`: True
#### All Hyperparameters