---
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:7851
- loss:MultipleNegativesRankingLoss
base_model: microsoft/mpnet-base
widget:
- source_sentence: did I gain any profits over the past 10 days
sentences:
- Which stocks have a strong potential to see a 10% increase in the next 10 months?
- Did I make any money from trading in the last 10 days
- Which stocks have a strong potential to go up by 10% in the next 10 months?
- source_sentence: Can you show me my holdings?
sentences:
- Reveal my highest-risk assets
- Display my riskiest investment holdings
- 'I''d like to see my portfolio details '
- source_sentence: Do I have any stocks in my portfolio?
sentences:
- Are there any shares of stock included in my portfolio?
- Unfold my individualized fintech recommendations
- What's the numerical assessment of my portfolio?
- source_sentence: View my report card
sentences:
- Which sectors are the most attractive to investors in my portfolio
- Recalibrate portfolio from stocks to mutual fund holdings
- Get my account overview
- source_sentence: Which of my investments have the highest volatility?
sentences:
- Can I see a yearly analysis of my returns
- Have I committed resources to any equity-driven investment funds?
- Which of my assets show the most pronounced fluctuations in market value?
pipeline_tag: sentence-similarity
library_name: sentence-transformers
---
# SentenceTransformer based on microsoft/mpnet-base
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [microsoft/mpnet-base](https://huggingface.co/microsoft/mpnet-base). 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:** [microsoft/mpnet-base](https://huggingface.co/microsoft/mpnet-base)
- **Maximum Sequence Length:** 512 tokens
- **Output Dimensionality:** 768 tokens
- **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': 512, 'do_lower_case': False}) with Transformer model: 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})
)
```
## 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("pawan2411/semantic-embedding_2")
# Run inference
sentences = [
'Which of my investments have the highest volatility?',
'Which of my assets show the most pronounced fluctuations in market value?',
'Can I see a yearly analysis of my returns',
]
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
#### Unnamed Dataset
* Size: 7,851 training samples
* Columns: sentence_0
and sentence_1
* Approximate statistics based on the first 1000 samples:
| | sentence_0 | sentence_1 |
|:--------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
| type | string | string |
| details |
Show me how to switch my stock portfolio to mutual funds
| What steps should I take to replace my stock holdings with mutual fund investments?
|
| View my holdings
| See my investment portfolio
|
| How did my portfolio perform last week ?
| Can you give me a rundown of my portfolio's performance for the past week?
|
* 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
- `per_device_train_batch_size`: 64
- `per_device_eval_batch_size`: 64
- `num_train_epochs`: 50
- `multi_dataset_batch_sampler`: round_robin
#### All Hyperparameters