---
language:
- en
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:1000
- loss:CoSENTLoss
- loss:MultipleNegativesRankingLoss
widget:
- source_sentence: test
sentences:
- '" it ''s a major victory for maine , and it ''s a major victory for other states
.'
- doctors say one or both boys may die , and that some brain damage is possible
if they survive .
- doctors said that one or both of the boys may die and that if they survive , some
brain damage is possible .
- source_sentence: test
sentences:
- but software license revenues , a measure financial analysts watch closely , decreased
21 percent to $ 107.6 million .
- a man is fishing .
- license sales , a key measure of demand , fell 21 percent to $ 107.6 million .
- source_sentence: test
sentences:
- it has a chequered safety record , including 47 accidents that resulted in 668
deaths .
- since being drafted into service in 1971 , it has racked up a record 45 accidents
, with 393 deaths .
- tenet has been under scrutiny since november , when former chief executive jeffrey
barbakow said the company used aggressive pricing to trigger higher payments for
the sickest medicare patients .
- source_sentence: test
sentences:
- it is a national concern that will touch virtually every american , " abraham
said .
- he also could be barred permanently from the securities industry .
- the impact of natural-gas shortages " will touch virtually every american , "
energy secretary spencer abraham warned yesterday .
- source_sentence: test
sentences:
- dotson , 21 , was arrested and charged on july 21 after reportedly telling authorities
he shot dennehy after dennehy tried to shoot him .
- products featuring vanderpool will be released within five years , he said .
- he projected vanderpool will be available within the next five years .
datasets:
- mteb/sts12-sts
pipeline_tag: sentence-similarity
library_name: sentence-transformers
---
# SentenceTransformer
This is a [sentence-transformers](https://www.SBERT.net) model trained on the [sts12-sts](https://huggingface.co/datasets/mteb/sts12-sts) 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
- **Maximum Sequence Length:** 512 tokens
- **Output Dimensionality:** 768 dimensions
- **Similarity Function:** Cosine Similarity
- **Training Dataset:**
- [sts12-sts](https://huggingface.co/datasets/mteb/sts12-sts)
- **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: 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("sentence_transformers_model_id")
# Run inference
sentences = [
'test',
'he projected vanderpool will be available within the next five years .',
'products featuring vanderpool will be released within five years , he said .',
]
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]
```
## Training Details
### Training Dataset
#### sts12-sts
* Dataset: [sts12-sts](https://huggingface.co/datasets/mteb/sts12-sts) at [fdf8427](https://huggingface.co/datasets/mteb/sts12-sts/tree/fdf84275bb8ce4b49c971d02e84dd1abc677a50f)
* Size: 1,000 training samples
* Columns: anchor
, positive
, and negative
* Approximate statistics based on the first 1000 samples:
| | anchor | positive | negative |
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
| type | string | string | string |
| details |
A person on a horse jumps over a broken down airplane.
| A person is outdoors, on a horse.
| A person is at a diner, ordering an omelette.
|
| Children smiling and waving at camera
| There are children present
| The kids are frowning
|
| A boy is jumping on skateboard in the middle of a red bridge.
| The boy does a skateboarding trick.
| The boy skates down the sidewalk.
|
* 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
#### sts12-sts
* Dataset: [sts12-sts](https://huggingface.co/datasets/mteb/sts12-sts) at [fdf8427](https://huggingface.co/datasets/mteb/sts12-sts/tree/fdf84275bb8ce4b49c971d02e84dd1abc677a50f)
* Size: 1,000 evaluation samples
* Columns: anchor
, positive
, and negative
* Approximate statistics based on the first 1000 samples:
| | anchor | positive | negative |
|:--------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
| type | string | string | string |
| details | This church choir sings to the masses as they sing joyous songs from the book at a church.
| The church is filled with song.
| A choir singing at a baseball game.
|
| A woman with a green headscarf, blue shirt and a very big grin.
| The woman is very happy.
| The woman has been shot.
|
| An old man with a package poses in front of an advertisement.
| A man poses in front of an ad.
| A man walks by an ad.
|
* 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`: 32
- `per_device_eval_batch_size`: 32
- `learning_rate`: 1e-05
- `num_train_epochs`: 1
#### All Hyperparameters