---
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:203040
- loss:MultipleNegativesRankingLoss
base_model: sentence-transformers/all-MiniLM-L6-v2
widget:
- source_sentence: Organizing contests, sweeptakes and surveys -Name -Contact details
-Marketing preferences information about unsubscribing (if you unsubscribe from
our mailing list) -Data provided on the registration or survey form
sentences:
- Extra data may be collected about you through promotions
- Your personal information is used for many different purposes
- Your data is processed and stored in a country that is friendlier to user privacy
protection
- source_sentence: or visit a third-party service that includes content from our Services,
we may receive information about you, or combine such information with other personal
information.
sentences:
- Your feedback is invited regarding changes to the terms.
- This service tracks you on other websites
- Your information is only shared with third parties when given specific consent
- source_sentence: Changes to Terms of Use ADT reserves the right to update or revise
the Terms of Use governing this site, or any part thereof, at any time, at its
sole discretion, without prior notice. Such changes, modifications, additions,
or deletions shall be effective immediately upon notice thereof, which may be
given by any means including posting on this site or by other electronic or conventional
means.
sentences:
- The terms may be changed at any time, but you will receive notification of the
changes
- Spidering, crawling, or accessing the site through any automated means is not
allowed
- You are prohibited from sending chain letters, junk mail, spam or any unsolicited
messages
- source_sentence: We also collect information when you make use of the Site, including
your browsing history.
sentences:
- Your browsing history can be viewed by the service
- The service informs you that its privacy policy does not apply to third party
websites
- Promises will be kept after a merger or acquisition
- source_sentence: Each customer may register only one Coinbase account.
sentences:
- You can scrape the site, as long as it doesn't impact the server too much
- Usernames can be rejected or changed for any reason
- Alternative accounts are not allowed
pipeline_tag: sentence-similarity
library_name: sentence-transformers
metrics:
- cosine_accuracy
model-index:
- name: SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
results:
- task:
type: triplet
name: Triplet
dataset:
name: all nli dev
type: all-nli-dev
metrics:
- type: cosine_accuracy
value: 0.9993498921394348
name: Cosine Accuracy
---
# SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2). It maps sentences & paragraphs to a 384-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-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2)
- **Maximum Sequence Length:** 256 tokens
- **Output Dimensionality:** 384 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': 256, 'do_lower_case': False}) with Transformer model: BertModel
(1): Pooling({'word_embedding_dimension': 384, '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("AryehRotberg/ToS-Sentence-Transformers-V2")
# Run inference
sentences = [
'Each customer may register only one Coinbase account.',
'Alternative accounts are not allowed',
'Usernames can be rejected or changed for any reason',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
```
## Evaluation
### Metrics
#### Triplet
* Dataset: `all-nli-dev`
* Evaluated with [TripletEvaluator](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
| Metric | Value |
|:--------------------|:-----------|
| **cosine_accuracy** | **0.9993** |
## Training Details
### Training Dataset
#### Unnamed Dataset
* Size: 203,040 training samples
* Columns: anchor, positive, and negative
* Approximate statistics based on the first 1000 samples:
| | anchor | positive | negative |
|:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
| type | string | string | string |
| details |
but remains subject to the promises made in any pre-existing Privacy Policy (unless, of course, the customer consents otherwise). | Promises will be kept after a merger or acquisition | When the service wants to change its terms, you are notified a week or more in advance. |
| Visits are logged by the Web server. These logs are only used for maintenance purposes and to generate anonymous access statistics. | Only necessary logs are kept by the service to ensure quality | An onion site accessible over Tor is provided |
| You affirm that you are over the age of 13, as the FanFiction.Net Service is not intended for children under 13. | This service is only available to users over a certain age | No need to register |
* 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
#### Unnamed Dataset
* Size: 50,760 evaluation samples
* Columns: anchor, positive, and negative
* Approximate statistics based on the first 1000 samples:
| | anchor | positive | negative |
|:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
| type | string | string | string |
| details | HP is not required to host, display, or distribute any User Submissions on or through This Website and may remove at any time or refuse any User Submissions for any reason. | User-generated content can be blocked or censored for any reason | The service will only respond to government requests that are reasonable |
| How we use information we collect | Information is provided about how your personal data is used | The service does not index or open files that you upload |
| your use of the LYKA Service is solely for your own personal use and you therefore must not, nor attempt to, resell or charge others for use of or access to the LYKA Service or for any business purposes; | This service is only available for use individually and non-commercially. | You cannot opt out of promotional communications |
* 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
- `learning_rate`: 2e-05
- `num_train_epochs`: 1
- `warmup_ratio`: 0.1
- `fp16`: True
- `batch_sampler`: no_duplicates
#### All Hyperparameters