---
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:10635
- loss:MultipleNegativesSymmetricRankingLoss
base_model: sentence-transformers/multi-qa-mpnet-base-dot-v1
widget:
- source_sentence: '12 Rules For Life: An Antidote to Chaos by Jordan B. Peterson'
sentences:
- Books on Investing
- Books on Resilience
- Books on Motivational
- source_sentence: 'Get the Guy: Learn Secrets of the Male Mind to Find the Man You
Want and the Love You Deserve by Matthew Hussey'
sentences:
- Books on Complexity
- Books on Decision Making
- Books on Self-Help for Women
- source_sentence: The Magic of Tiny Business (You Don’t Have to Go Big to Make a
Great Living) by Sharon Rowe
sentences:
- Books on Vegetarianism
- Books on Personal Development
- Books on Emotions
- source_sentence: 'The Dorito Effect: The Surprising New Truth About Food and Flavor
by Mark Schatzker'
sentences:
- Books on Skincare
- Books on Work-Life Balance
- Books on Problem Solving
- source_sentence: '12 Rules For Life: An Antidote to Chaos by Jordan B. Peterson'
sentences:
- Books on Psychology
- Books on Positive Thinking
- Books on Investing
pipeline_tag: sentence-similarity
library_name: sentence-transformers
---
# SentenceTransformer based on sentence-transformers/multi-qa-mpnet-base-dot-v1
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/multi-qa-mpnet-base-dot-v1](https://huggingface.co/sentence-transformers/multi-qa-mpnet-base-dot-v1) on the train 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:** [sentence-transformers/multi-qa-mpnet-base-dot-v1](https://huggingface.co/sentence-transformers/multi-qa-mpnet-base-dot-v1)
- **Maximum Sequence Length:** 512 tokens
- **Output Dimensionality:** 768 dimensions
- **Similarity Function:** Dot Product
- **Training Dataset:**
- train
### 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: MPNetModel
(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("sentence_transformers_model_id")
# Run inference
sentences = [
'12 Rules For Life: An Antidote to Chaos by Jordan B. Peterson',
'Books on Psychology',
'Books on Positive Thinking',
]
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
#### train
* Dataset: train
* Size: 10,635 training samples
* Columns: anchor
and positive
* Approximate statistics based on the first 1000 samples:
| | anchor | positive |
|:--------|:-----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
| type | string | string |
| details |
The Life-Changing Magic of Tidying Up: The Japanese Art of Decluttering and Organizing by Marie Kondō
| Books on Organization
|
| The Life-Changing Magic of Tidying Up: The Japanese Art of Decluttering and Organizing by Marie Kondō
| Books on Minimalism
|
| The Life-Changing Magic of Tidying Up: The Japanese Art of Decluttering and Organizing by Marie Kondō
| Books on Japanese Art
|
* Loss: [MultipleNegativesSymmetricRankingLoss
](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativessymmetricrankingloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
```
### Evaluation Dataset
#### train
* Dataset: train
* Size: 5,359 evaluation samples
* Columns: anchor
and positive
* Approximate statistics based on the first 1000 samples:
| | anchor | positive |
|:--------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
| type | string | string |
| details | 12 Rules For Life: An Antidote to Chaos by Jordan B. Peterson
| Books on Psychology
|
| 12 Rules For Life: An Antidote to Chaos by Jordan B. Peterson
| Books on Self-Help
|
| 12 Rules For Life: An Antidote to Chaos by Jordan B. Peterson
| Books on Personal Development
|
* Loss: [MultipleNegativesSymmetricRankingLoss
](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativessymmetricrankingloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
```
### Training Hyperparameters
#### Non-Default Hyperparameters
- `eval_strategy`: steps
- `per_device_train_batch_size`: 16
- `per_device_eval_batch_size`: 16
- `learning_rate`: 2e-05
- `num_train_epochs`: 10
- `warmup_ratio`: 0.1
#### All Hyperparameters