---
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- dense
- generated_from_trainer
- dataset_size:4615
- loss:TripletLoss
base_model: sentence-transformers/all-mpnet-base-v2
widget:
- source_sentence: Do you ever feel like you have failed in life or let yourself down?
sentences:
- But I just don't feel like even getting started because I know that I will fail
again.
- I cant remember the last time I felt happiness.
- That was their biggest and last mistake.
- source_sentence: Do you feel sad or unhappy?
sentences:
- I have been depressed since late September so I feel you.
- I share a lot of your traits, and considered myself a failure too.
- He conveys that feeling of regret so well I can feel it everytime
- source_sentence: Do you feel hopeful about your future or do things seem hopeless?
sentences:
- I'm pretty optimistic though since the pace of technological growth is accelerating
so rapidly.
- '[For a clickable image, click here](http://futurism.com/thisweekinscience)
[To get these images directly to your inbox, sign up here](http://futurism.com/subscribe)
_
Sources | Reddit
--- | ---
[Oldest and Furthest Galaxy](http://futurism.com/links/astronomers-discover-the-oldest-and-farthest-known-galaxy/)
| [Reddit](https://www.reddit.com/r/science/comments/3jypyf/researchers_find_132_billion_yearold_galaxy_in/)
[3D Printed Ribs ](http://futurism.com/links/these-3d-printed-titanium-ribs-were-successfully-implanted-in-a-person/)
| [Reddit](https://www.reddit.com/r/technology/comments/3kj8pf/patient_receives_3dprinted_titanium_sternum_and/?ref=search_posts)
[Chinese Far Side of Moon] (http://m.phys.org/news/2015-09-china-aims-probe-moon-side.html) |
[Reddit](https://www.reddit.com/r/worldnews/comments/3kcsg5/china_to_explore_dark_side_of_the_moon_china_has/)
[Rugby Ball Molecule](http://www.forbes.com/sites/carmendrahl/2015/09/02/giant-rugby-ball-new-interaction-chemistry/)
| [Reddit](https://www.reddit.com/r/EverythingScience/comments/3krt22/this_giant_rugby_ball_contains_a_new_chemical/)
[Measuring the Universe](http://astronomynow.com/2015/09/04/using-stellar-twins-to-climb-the-cosmic-distance-ladder/)
| [Reddit](https://www.reddit.com/r/science/comments/3jum8c/astronomers_have_developed_a_new_highly_accurate/)
[3D Printed Stethoscope ](http://futurism.com/links/3d-printed-stethoscopes-cost-as-little-as-2-50-and-are-just-as-good/)
| [Reddit](https://www.reddit.com/r/news/comments/3kgboz/doctor_3d_prints_stethoscope_to_alleviate_supply/)
[Giant Structure in Universe](http://phys.org/news/2015-09-giant-ring-like-universe.html)
| [Reddit](https://www.reddit.com/r/EverythingScience/comments/3jzjlm/surprising_giant_ringlike_structure_in_the/)
[Recoded Cell Factories](http://m.phys.org/news/2015-09-recoded-cells-factories-proteins.html)
| [Reddit](https://www.reddit.com/r/EverythingScience/comments/3krux3/researchers_transform_recoded_cells_into/)'
- I do not expect things to work out for me.
- source_sentence: Do you feel sad or unhappy?
sentences:
- Me everyday im depressing
- And now I feel very alone and useless.
- Sucks that I'm not the only one because others are suffering, but it's nice to
know I'm not alone.
- source_sentence: Do you feel sad or unhappy?
sentences:
- I cried because I lost not only my money, but because I lost myself.
- Im not exactly depressed, at least not all of the time.
- does anyone feel like they cant be sad
pipeline_tag: sentence-similarity
library_name: sentence-transformers
---
# SentenceTransformer based on sentence-transformers/all-mpnet-base-v2
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2). 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:** [sentence-transformers/all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2)
- **Maximum Sequence Length:** 384 tokens
- **Output Dimensionality:** 768 dimensions
- **Similarity Function:** Cosine Similarity
### 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': 384, 'do_lower_case': False, 'architecture': 'MPNetModel'})
(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})
(2): Normalize()
)
```
## 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("FritzStack/mpnet_MH_embedding")
# Run inference
sentences = [
'Do you feel sad or unhappy?',
'Im not exactly depressed, at least not all of the time.',
'does anyone feel like they cant be sad',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[ 1.0000, 0.7532, -0.4572],
# [ 0.7532, 1.0000, -0.0545],
# [-0.4572, -0.0545, 1.0000]])
```
## Training Details
### Training Dataset
#### Unnamed Dataset
* Size: 4,615 training samples
* Columns: anchor, positive, and negative
* Approximate statistics based on the first 1000 samples:
| | anchor | positive | negative |
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
| type | string | string | string |
| details |
Do you feel sad or unhappy? | I do not feel sad. | I've been suffering my whole life, and it's currently at its peak :( |
| Do you feel sad or unhappy? | I feel sad much of the time. | Things will get better, just focus more in the positive rather than the negative |
| Do you feel sad or unhappy? | I am sad all the time. | That's why I understand I'm terrible, because it's wrong I get annoyed by that, people should do what they want, but I just can't stand being alone. |
* Loss: [TripletLoss](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#tripletloss) with these parameters:
```json
{
"distance_metric": "TripletDistanceMetric.COSINE",
"triplet_margin": 0.5
}
```
### Training Hyperparameters
#### Non-Default Hyperparameters
- `per_device_train_batch_size`: 2
- `gradient_accumulation_steps`: 8
- `warmup_steps`: 100
- `fp16`: True
#### All Hyperparameters