---
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- dense
- generated_from_trainer
- dataset_size:3872
- loss:MultipleNegativesRankingLoss
widget:
- source_sentence: (g) If a Member wishes to extend their stay and has enough Nightly
Upgrade Award(s) to cover the extension, the Member must book a separate reservation
for the additional nights and request to use Nightly Upgrade Awards on Marriott
Websites or by calling Member Support; the Nightly Upgrade Award request cannot
be processed at the Participating Property.
sentences:
- Flexible rates cancel up to a deadline the property sets.
- DONT book a non-refundable hotel without reading the cancellation policy because
you must understand the exact penalty structurewhether you forfeit one night,
the full amount, or a percentageto determine your coverage needs and ensure your
insurance limit is adequate.
- As for semi-flexible plans, they might require notice at least five days before
check-in.
- source_sentence: Checking out late at a hotel isnt guaranteed, especially when it
comes to complimentary late check-out.
sentences:
- However, the late check-out policy will vary based on the specific hotels policy.
- The hotel guest damage clause is a crucial aspect of your reservation agreement
that aims to protect both the hotels property and the guests interests.
- Yes, if a clean room is available.
- source_sentence: refund terms and conditions
sentences:
- CANCELLATION OR MODIFICATION OF A SERVICE RESERVATION
- Elite status doesn't always change the written policy, but it can give you leverage
with customer service if you need an exception.
- 'Trick #2 Resell the nonrefundable hotel room'
- source_sentence: occupancy rules guidelines for guests
sentences:
- Most hotel insurance policies provide coverage for theft, damage, or loss of personal
property under certain conditions.
- Choose designated smoking areas outside the hotel.
- 'Semi-Flexible Rates : Some properties offer rates that allow cancellation with
a fee (e.g., $50) or partial refund up to a certain point.'
- source_sentence: Smoking or vaping is allowed in designated rooms.
sentences:
- Some upgrades to Premium Rooms require payment in local currency and cannot be
purchased with Points.
- Marriott is committed to providing its guests and associates with a smoke-free
environment, and is proud to boast one of the most comprehensive smoke-free hotel
policies in the industry.
- Participating Properties outside the United States may provide alternative services
and benefits to the Elite membership benefits set forth in these Program Rules,
depending on local law and policy.
pipeline_tag: sentence-similarity
library_name: sentence-transformers
metrics:
- pearson_cosine
- spearman_cosine
model-index:
- name: SentenceTransformer
results:
- task:
type: semantic-similarity
name: Semantic Similarity
dataset:
name: val
type: val
metrics:
- type: pearson_cosine
value: 0.6244156998181909
name: Pearson Cosine
- type: spearman_cosine
value: 0.6463453957364179
name: Spearman Cosine
---
# SentenceTransformer
This is a [sentence-transformers](https://www.SBERT.net) model trained for semantic text understanding. It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, classification, clustering, and more.
## Model Details
### Model Description
- **Model Type:** Sentence Transformer
- **Maximum Sequence Length:** 128 tokens
- **Output Dimensionality:** 384 dimensions
- **Similarity Function:** Cosine Similarity
- **Supported Modality:** Text
### Model Sources
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
- **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
### Full Model Architecture
```
SentenceTransformer(
(0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'architecture': 'BertModel'})
(1): Pooling({'embedding_dimension': 384, 'pooling_mode': 'mean', '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("HarishMaths/Hotel-Policy-Embedding")
# Run inference
sentences = [
'Smoking or vaping is allowed in designated rooms.',
'Marriott is committed to providing its guests and associates with a smoke-free environment, and is proud to boast one of the most comprehensive smoke-free hotel policies in the industry.',
'Some upgrades to Premium Rooms require payment in local currency and cannot be purchased with Points.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[1.0000, 0.9151, 0.2602],
# [0.9151, 1.0000, 0.3726],
# [0.2602, 0.3726, 1.0000]])
```
## Evaluation
### Metrics
#### Semantic Similarity
* Dataset: `val`
* Evaluated with [EmbeddingSimilarityEvaluator](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.sentence_transformer.evaluation.EmbeddingSimilarityEvaluator)
| Metric | Value |
|:--------------------|:-----------|
| pearson_cosine | 0.6244 |
| **spearman_cosine** | **0.6463** |
## Training Details
### Training Dataset
#### Unnamed Dataset
* Size: 3,872 training samples
* Columns: sentence_0 and sentence_1
* Approximate statistics based on the first 100 samples:
| | sentence_0 | sentence_1 |
|:---------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
| type | string | string |
| modality | text | text |
| details |
Three months after booking and 20 days after purchasing insurance, the tour operator files bankruptcy and ceases all operations. | California SB 644 requires hotels and third-party booking sites to give a full refund when a guest cancels within 24 hours of booking, as long as the reservation was made at least 72 hours before check-in. |
| One of the easiest ways to avoid resort fees is by booking an award stay. | For a typical domestic Hilton hotel, it will show you the points options and cash rates all on one screen. |
| The General Contractor went out to several Home Depot locations around the City to find over 250 battery-operated smoke detectors. | Modern sensors detect vapour, and the resulting charge is identical to a cigarette violation. |
* Loss: [MultipleNegativesRankingLoss](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "cos_sim",
"gather_across_devices": false,
"directions": [
"query_to_doc"
],
"partition_mode": "joint",
"hardness_mode": null,
"hardness_strength": 0.0
}
```
### Training Hyperparameters
#### Non-Default Hyperparameters
- `per_device_train_batch_size`: 32
- `num_train_epochs`: 25
- `fp16`: True
- `per_device_eval_batch_size`: 32
- `multi_dataset_batch_sampler`: round_robin
#### All Hyperparameters