---
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- dense
- generated_from_trainer
- dataset_size:122856
- loss:MultipleNegativesRankingLoss
base_model: sentence-transformers/all-MiniLM-L6-v2
widget:
- source_sentence: '"To update your preferences, ask us to remove your information
from our marketing mailing lists or submit a request, please contact us as outlined
in the How To Contact Us Section below."'
sentences:
- You can opt out of promotional communications
- IP addresses of website visitors are not tracked
- If you are the target of a copyright holder's take down notice, this service gives
you the opportunity to defend yourself
- source_sentence: To ensure that disputes are dealt with soon after they arise, you
agree that regardless of any statute or law to the contrary, any claim or cause
of action you might have arising out of or related to use of our services or these
Terms of Use must be filed within the applicable statute of limitations or, if
earlier, one (1) year after the pertinent facts underlying such claim or cause
of action could have been discovered with reasonable diligence (or be forever
barred).
sentences:
- This service gives your personal data to third parties involved in its operation
- The service claims to be CCPA compliant for California users
- You have a reduced time period to take legal action against the service
- source_sentence: 'The privacy policy states: "To be able to offer our products and
services for free, we serve third-party ads of advertising companies in our products
for mobile devices. To enable the ad, we embed a software development kit (“SDK”)
provided by an advertising company into the product, which then collects Personal
Data in order to personalize ads for you."'
sentences:
- You are tracked via web beacons, tracking pixels, browser fingerprinting, and/or
device fingerprinting
- Your personal data may be used for marketing purposes
- You are tracked via web beacons, tracking pixels, browser fingerprinting, and/or
device fingerprinting
- source_sentence: The organization cannot be held responsible for the consequences
of negligence by the user, notably of failure by the user to secure their password.
sentences:
- Your content can be licensed to third parties
- Spidering, crawling, or accessing the site through any automated means is not
allowed
- You are responsible for maintaining the security of your account and for the activities
on your account
- source_sentence: The Services may contain links or connections to third party websites
or services that are not owned or controlled by Guilded. When you access third
party websites or use third party services, you accept that there are risks in
doing so, and that Guilded is not responsible for such risks.
sentences:
- This service assumes no responsibility and liability for the contents of links
to other websites
- Copyright license limited for the purposes of that same service but transferable
and sublicenseable
- Your content can be deleted if you violate the terms
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.9993162751197815
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, 'architecture': '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-V4")
# Run inference
sentences = [
'The Services may contain links or connections to third party websites or services that are not owned or controlled by Guilded. When you access third party websites or use third party services, you accept that there are risks in doing so, and that Guilded is not responsible for such risks.',
'This service assumes no responsibility and liability for the contents of links to other websites',
'Copyright license limited for the purposes of that same service but transferable and sublicenseable',
]
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.6397, -0.0500],
# [ 0.6397, 1.0000, 0.0874],
# [-0.0500, 0.0874, 1.0000]])
```
## 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: 122,856 training samples
* Columns: anchor, positive, and negative
* Approximate statistics based on the first 1000 samples:
| | anchor | positive | negative |
|:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
| type | string | string | string |
| details |
If you ever decide to stop using Snapchat, you can just ask us to delete your account. | You have the right to leave this service at any time | Your personal information is used for many different purposes |
| you forever waive and agree not to claim or assert any entitlement to any and all moral rights of an author in any of the User Content. | You waive your moral rights | You aren’t allowed to remove or edit user-generated content |
| You agree and shall indemnify and hold Dailymotion- harmless from and against any liability, loss, damages (including punitive damages), claim, settlement payment, cost and expense, interest, award, judgment, diminution in value, fine, fee (including reasonable attorneys’ fees), and penalty, or other charge (including reasonable attorneys’ fees and all other cost of investigating, defending or asserting any claim for indemnification under these Terms) arising from or relating to (i) Your Content, (ii) Your violation of the Terms or any other policy of Dailymotion. (iii) Your use of the Dailymotion Service. and (iv) Your violation of any third party rights, including without limitation any copyright, property, publicity or privacy rights. | You agree to defend, indemnify, and hold the service harmless in case of a claim related to your use of the service | User-generated content can be blocked or censored for any reason |
* 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
}
```
### Evaluation Dataset
#### Unnamed Dataset
* Size: 30,714 evaluation samples
* Columns: anchor, positive, and negative
* Approximate statistics based on the first 1000 samples:
| | anchor | positive | negative |
|:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
| type | string | string | string |
| details | YOU AGREE THAT USE OF THE WEB SITE AND THE SERVICES IS AT YOUR SOLE RISK. | The service is provided 'as is' and to be used at your sole risk | The court of law governing the terms is in a jurisdiction that is friendlier to user privacy protection. |
| If you continue to use our services after the changes have taken effect, it means that you agree to the changes. | Terms may be changed at any time | The service is only available in some countries approved by its government |
| We may revise these Terms of Use or any of the other Terms from time to time. You are ,expected to check this page and our Terms from time to time to take notice of any changes | Terms may be changed at any time | Voice data is collected and shared with third-parties |
* 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
}
```
### 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