---
base_model: sentence-transformers/all-mpnet-base-v2
datasets: []
language: []
library_name: sentence-transformers
pipeline_tag: sentence-similarity
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:2400
- loss:MultipleNegativesRankingLoss
widget:
- source_sentence: Are there any furniture stores? (variation 536)
sentences:
- Event tickets can be purchased at the customer service desk or online through
the mall's website.
- The Apple Store is located on the second floor near the food court.
- Yes, there are furniture stores including IKEA and Ashley Furniture, both located
on the second floor.
- source_sentence: Is there a play area for kids? (variation 121)
sentences:
- The customer service desk is located on the ground floor near the main entrance.
- Yes, there is a play area for kids on the first floor near the west entrance.
- Yes, there is a luggage store on the second floor near the central atrium.
- source_sentence: Are there any sports stores? (variation 931)
sentences:
- Yes, there is a toy store on the first floor near the west entrance.
- Event tickets can be purchased at the customer service desk or online through
the mall's website.
- Yes, there are sports stores including Nike and Adidas, both located on the first
floor.
- source_sentence: Where can I charge my phone? (variation 904)
sentences:
- Yes, reservations for 'The Gourmet Palace' can be made by calling their direct
line or via their website.
- Yes, there is a photography studio on the first floor near the main entrance.
- Phone charging stations are available throughout the mall, including near the
food court and at the customer service desk.
- source_sentence: Does the mall have a post office? (variation 1412)
sentences:
- Yes, there is a photography studio on the first floor near the main entrance.
- Yes, there is a game arcade on the third floor next to the cinema.
- Yes, there is a post office on the ground floor near the west entrance.
---
# 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) 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/all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2)
- **Maximum Sequence Length:** 384 tokens
- **Output Dimensionality:** 768 tokens
- **Similarity Function:** Cosine Similarity
- **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': 384, '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})
(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("anomys/gsm-finetunned")
# Run inference
sentences = [
'Does the mall have a post office? (variation 1412)',
'Yes, there is a post office on the ground floor near the west entrance.',
'Yes, there is a game arcade on the third floor next to the cinema.',
]
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: 2,400 training samples
* Columns: question
and response
* Approximate statistics based on the first 1000 samples:
| | question | response |
|:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
| type | string | string |
| details |
Where can I find an ATM in the mall? (variation 643)
| ATMs are located on the ground floor next to the information desk and near the west entrance.
|
| Is there a map of the mall available? (variation 701)
| Yes, you can find interactive maps on our website and physical maps at the information desks located at each entrance.
|
| Where can I find the customer service desk? (variation 227)
| The customer service desk is located on the ground floor near the main entrance.
|
* 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
#### train
* Dataset: train
* Size: 600 evaluation samples
* Columns: question
and response
* Approximate statistics based on the first 1000 samples:
| | question | response |
|:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
| type | string | string |
| details | Are there any opticians in the mall? (variation 1802)
| Yes, there are opticians including LensCrafters and Visionworks, both located on the first floor.
|
| Is there a map of the mall available? (variation 1191)
| Yes, you can find interactive maps on our website and physical maps at the information desks located at each entrance.
|
| Are there any wheelchair-accessible entrances? (variation 1818)
| Yes, all main entrances are wheelchair accessible, and we provide complimentary wheelchair rentals at the customer service desk.
|
* 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`: 16
- `per_device_eval_batch_size`: 16
- `num_train_epochs`: 1
- `warmup_ratio`: 0.1
- `fp16`: True
- `batch_sampler`: no_duplicates
#### All Hyperparameters