---
base_model: BAAI/bge-small-en-v1.5
datasets: []
language: []
library_name: sentence-transformers
pipeline_tag: sentence-similarity
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:14271
- loss:BatchAllTripletLoss
widget:
- source_sentence: In a complex legal scenario involving multiple jurisdictions, how
would you navigate the differences in laws related to online privacy violations
and harassment?
sentences:
- How does voluntary admission under the Baker Act impact eligibility for a Concealed
Weapon Permit?
- How do the terms of the account and the circumstances impact the potential liability
of the Bank of Hawaii in this situation?
- Can someone run a background check on you without your consent?
- source_sentence: How long is the Kansas Lemon Law effective for?
sentences:
- What should I do to stop my neighbor from using my land and barn?
- How does the expungement of an arrest impact the disclosure requirements in applications
for permits or licenses?
- If a policy is canceled due to a denied claim, does the canceled policy still
cover injuries from the incident?
- source_sentence: What are the implications of a guilty plea without corroborating
evidence in terms of justice and fairness?
sentences:
- How does having a Series 7 license impact the ability of a financial planner to
sell securities products?
- What are the specific state laws that govern the relationship between the Baker
Act and Concealed Weapon Permits?
- How does the duration of copyright protection impact the entry of works into the
public domain?
- source_sentence: How can one prove the terms and existence of a verbal contract?
sentences:
- Is it common for search warrants to be obtained under a unique cause number?
- In what ways can transparency in background check forms contribute to national
security measures?
- What are the potential legal responsibilities of the 14-year-old boy if he is
determined to be the father of the baby?
- source_sentence: How can the person ensure they receive the necessary compensation
for their work-related injury?
sentences:
- Is there a law in Oklahoma that restricts the distance of a dispensary to a baseball
field?
- Considering the complexities of property rights, due process, and public safety,
what are the ethical and legal considerations surrounding citizens taking possession
of unattended animals in public areas, and how do these actions intersect with
constitutional rights and property laws?
- What precedent cases or legal doctrines could be relevant in a lawsuit against
the town council person and the township in this scenario?
---
# SentenceTransformer based on BAAI/bge-small-en-v1.5
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5). 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:** [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5)
- **Maximum Sequence Length:** 512 tokens
- **Output Dimensionality:** 384 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': True}) with Transformer model: BertModel
(1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, '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("Snivellus789/router-embedding")
# Run inference
sentences = [
'How can the person ensure they receive the necessary compensation for their work-related injury?',
'Is there a law in Oklahoma that restricts the distance of a dispensary to a baseball field?',
'Considering the complexities of property rights, due process, and public safety, what are the ethical and legal considerations surrounding citizens taking possession of unattended animals in public areas, and how do these actions intersect with constitutional rights and property laws?',
]
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]
```
## Training Details
### Training Dataset
#### Unnamed Dataset
* Size: 14,271 training samples
* Columns: sentence
and label
* Approximate statistics based on the first 1000 samples:
| | sentence | label |
|:--------|:----------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------|
| type | string | int |
| details |
What rights do you have regarding accessing your medical records under HIPAA?
| 1
|
| What should you do if you lose access to your patient portal after being discharged from a healthcare provider?
| 1
|
| How can you address the issue of losing access to your patient portal with the pain management office?
| 3
|
* Loss: [BatchAllTripletLoss
](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#batchalltripletloss)
### Training Hyperparameters
#### Non-Default Hyperparameters
- `per_device_train_batch_size`: 16
- `per_device_eval_batch_size`: 16
- `learning_rate`: 2e-05
- `num_train_epochs`: 2
- `warmup_ratio`: 0.1
- `bf16`: True
- `batch_sampler`: no_duplicates
#### All Hyperparameters