SentenceTransformer based on BAAI/bge-base-en-v1.5
This is a sentence-transformers model finetuned from BAAI/bge-base-en-v1.5. 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: BAAI/bge-base-en-v1.5
- Maximum Sequence Length: 512 tokens
- Output Dimensionality: 768 tokens
- Similarity Function: Cosine Similarity
- Language: en
- License: apache-2.0
Model Sources
- Documentation: Sentence Transformers Documentation
- Repository: Sentence Transformers on GitHub
- Hugging Face: Sentence Transformers on Hugging Face
Full Model Architecture
SentenceTransformer(
(0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
(1): Pooling({'word_embedding_dimension': 768, '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:
pip install -U sentence-transformers
Then you can load this model and run inference.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("MugheesAwan11/bge-base-securiti-dataset-1-v10")
# Run inference
sentences = [
"PR and Federal Data Protection Act within Germany; To promote awareness within the public related to the risks, rules, safeguards, and rights concerning the processing of personal data; To handle all complaints raised by data subjects related to data processing in addition to carrying out investigations to find out if any data handler has breached any provisions of the Act; ## Penalties for Non compliance The GDPR already laid down some stringent penalties for companies that would be found in breach of the law's provisions. More importantly, as opposed to other data protection laws such as the CCPA and CPRA, non-compliance with the law also meant penalties. Germany's Federal Data Protection Act has a slightly more lenient take in this regard. Suppose a data handler is found to have fraudulently collected data, processed, shared, or sold data without proper consent from the data subjects, not responded or responded with delay to a data subject request, or failed to inform the data subject of a breach properly. In that case, it can be fined up to €50,000. This is in addition to the GDPR's €20 million or 4% of the total worldwide annual turnover of the preceding financial year, whichever is higher, that any organisation found in breach of the law is subject to. However, for this fine to be applied, either the data subject, the Federal Commissioner, or the regulatory authority must file an official complaint. ## How an Organization Can Operationalize the Law Data handlers processing data inside Germany can remain compliant with the country's data protection law if they fulfill the following conditions: Have a comprehensive privacy policy that educates all users of their rights and how to contact the relevant personnel within the organisation in case of a query Hire a competent Data Protection Officer that understands the GDPR and Federal Data Protection Act thoroughly and can lead compliance efforts within your organisation Ensure all the company's employees and staff are acutely aware of their responsibilities under the law Conduct regular data protection impact assessments as well as data mapping exercises to ensure maximum efficiency in your compliance efforts Notify the relevant authorities of a data breach as soon as possible ## How can Securiti Help Data privacy and compliance have become incredibly vital in earning users' trust globally. Most users now expect most businesses to take all the relevant measures to ensure the data they collect is properly stored, protected, and maintained. Data protection laws have made such efforts legally mandatory",
"What is required for an official complaint to be filed under Germany's Federal Data Protection Act?",
'Why is tracking data lineage important for data management and security?',
]
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]
Evaluation
Metrics
Information Retrieval
- Dataset:
dim_512
- Evaluated with
InformationRetrievalEvaluator
Metric | Value |
---|---|
cosine_accuracy@1 | 0.08 |
cosine_accuracy@3 | 0.29 |
cosine_accuracy@5 | 0.48 |
cosine_accuracy@10 | 0.65 |
cosine_precision@1 | 0.08 |
cosine_precision@3 | 0.0967 |
cosine_precision@5 | 0.096 |
cosine_precision@10 | 0.065 |
cosine_recall@1 | 0.08 |
cosine_recall@3 | 0.29 |
cosine_recall@5 | 0.48 |
cosine_recall@10 | 0.65 |
cosine_ndcg@10 | 0.3357 |
cosine_mrr@10 | 0.2381 |
cosine_map@100 | 0.2537 |
Information Retrieval
- Dataset:
dim_256
- Evaluated with
InformationRetrievalEvaluator
Metric | Value |
---|---|
cosine_accuracy@1 | 0.09 |
cosine_accuracy@3 | 0.33 |
cosine_accuracy@5 | 0.52 |
cosine_accuracy@10 | 0.68 |
cosine_precision@1 | 0.09 |
cosine_precision@3 | 0.11 |
cosine_precision@5 | 0.104 |
cosine_precision@10 | 0.068 |
cosine_recall@1 | 0.09 |
cosine_recall@3 | 0.33 |
cosine_recall@5 | 0.52 |
cosine_recall@10 | 0.68 |
cosine_ndcg@10 | 0.354 |
cosine_mrr@10 | 0.2525 |
cosine_map@100 | 0.2647 |
Information Retrieval
- Dataset:
dim_128
- Evaluated with
InformationRetrievalEvaluator
Metric | Value |
---|---|
cosine_accuracy@1 | 0.09 |
cosine_accuracy@3 | 0.27 |
cosine_accuracy@5 | 0.45 |
cosine_accuracy@10 | 0.65 |
cosine_precision@1 | 0.09 |
cosine_precision@3 | 0.09 |
cosine_precision@5 | 0.09 |
cosine_precision@10 | 0.065 |
cosine_recall@1 | 0.09 |
cosine_recall@3 | 0.27 |
cosine_recall@5 | 0.45 |
cosine_recall@10 | 0.65 |
cosine_ndcg@10 | 0.332 |
cosine_mrr@10 | 0.2342 |
cosine_map@100 | 0.2486 |
Information Retrieval
- Dataset:
dim_64
- Evaluated with
InformationRetrievalEvaluator
Metric | Value |
---|---|
cosine_accuracy@1 | 0.06 |
cosine_accuracy@3 | 0.23 |
cosine_accuracy@5 | 0.44 |
cosine_accuracy@10 | 0.57 |
cosine_precision@1 | 0.06 |
cosine_precision@3 | 0.0767 |
cosine_precision@5 | 0.088 |
cosine_precision@10 | 0.057 |
cosine_recall@1 | 0.06 |
cosine_recall@3 | 0.23 |
cosine_recall@5 | 0.44 |
cosine_recall@10 | 0.57 |
cosine_ndcg@10 | 0.2854 |
cosine_mrr@10 | 0.1973 |
cosine_map@100 | 0.2149 |
Training Details
Training Dataset
Unnamed Dataset
- Size: 900 training samples
- Columns:
positive
andanchor
- Approximate statistics based on the first 1000 samples:
positive anchor type string string details - min: 159 tokens
- mean: 445.26 tokens
- max: 512 tokens
- min: 7 tokens
- mean: 22.05 tokens
- max: 82 tokens
- Samples:
positive anchor orra The Andorra personal data protection act came into force on May 17, 2022, by the Andorra Data Protection Authority (ADPA). Learn more about Andorra PDPA ### United Kingdom The UK Data Protection Act (DPA) 2018 is the amended version of the Data Protection Act that was passed in 1998. The DPA 2018 implements the GDPR with several additions and restrictions. Learn more about UK DPA ### Botswana The Botswana Data Protection came into effect on October 15, 2021 after the issuance of the Data Protection Act (Commencement Date) Order 2021 by the Minister of Presidential Affairs, Governance and Public Administration. Learn more about Botswana DPA ### Zambia On March 31, 2021, the Zambian parliament formally passed the Data Protection Act No. 3 of 2021 and the Electronic Communications and Transactions Act No. 4 of 2021. Learn more about Zambia DPA ### Jamaica On November 30, 2020, the First Schedule of the Data Protection Act No. 7 of 2020 came into effect following the publication of Supplement No. 160 of Volume CXLIV in the Jamaica Gazette Supplement. Learn more about Jamaica DPA ### Belarus The Law on Personal Data Protection of May 7, 2021, No. 99-Z, entered into effect within Belarus on November 15, 2021. Learn more about Belarus DPA ### Russian Federation The primary Russian law on data protection, Federal Law No. 152-FZ has been in effect since July 2006. Learn more ### Eswatini On March 4, 2022, the Eswatini Communications Commission published the Data Protection Act No. 5 of 2022, simultaneously announcing its immediate enforcement. Learn more ### Oman The Royal Decree 6/2022 promulgating the Personal Data Protection Law (PDPL) was passed on February 9, 2022. Learn more ### Sri Lanka Sri Lanka's parliament formally passed the Personal Data Protection Act (PDPA), No. 9 Of 2022, on March 19, 2022. Learn more ### Kuwait Kuwait's DPPR was formally introduced by the CITRA to ensure the Gulf country's data privacy infrastructure. Learn more ### Brunei Darussalam The draft Personal Data Protection Order is Brunei’s primary data protection law which came into effect in 2022. Learn more ### India India’
What is the name of India's data protection law before May 17, 2022?
the affected data subjects and regulatory authority about the breach and whether any of their information has been compromised as a result. ### Data Protection Impact Assessment There is no requirement for conducting data protection impact assessment under the PDPA. ### Record of Processing Activities A data controller must keep and maintain a record of any privacy notice, data subject request, or any other information relating to personal data processed by him in the form and manner that may be determined by the regulatory authority. ### Cross Border Data Transfer Requirements The PDPA provides that personal data can be transferred out of Malaysia only when the recipient country is specified as adequate in the Official Gazette. The personal data of data subjects can not be disclosed without the consent of the data subject. The PDPA provides the following exceptions to the cross border data transfer requirements: Where the consent of data subject is obtained for transfer; or Where the transfer is necessary for the performance of contract between the parties; The transfer is for the purpose of any legal proceedings or for the purpose of obtaining legal advice or for establishing, exercising or defending legal rights; The data user has taken all reasonable precautions and exercised all due diligence to ensure that the personal data will not in that place be processed in any manner which, if that place is Malaysia, would be a contravention of this PDPA; The transfer is necessary in order to protect the vital interests of the data subject; or The transfer is necessary as being in the public interest in circumstances as determined by the Minister. ## Data Subject Rights The data subjects or the person whose data is being collected has certain rights under the PDPA. The most prominent rights can be categorized under the following: ## Right to withdraw consent The PDPA, like some of the other landmark data protection laws such as CPRA and GDPR gives data subjects the right to revoke their consent at any time by way of written notice from having their data collected processed. ## Right to access and rectification As per this right, anyone whose data has been collected has the right to request to review their personal data and have it updated. The onus is on the data handlers to respond to such a request as soon as possible while also making it easier for data subjects on how they can request access to their personal data. ## Right to data portability Data subjects have the right to request that their data be stored in a manner where it
What is the requirement for conducting a data protection impact assessment under the PDPA?
more Privacy Automate compliance with global privacy regulations Data Mapping Automation View Data Subject Request Automation View People Data Graph View Assessment Automation View Cookie Consent View Universal Consent View Vendor Risk Assessment View Breach Management View Privacy Policy Management View Privacy Center View Learn more Security Identify data risk and enable protection & control Data Security Posture Management View Data Access Intelligence & Governance View Data Risk Management View Data Breach Analysis View Learn more Governance Optimize Data Governance with granular insights into your data Data Catalog View Data Lineage View Data Quality View Data Controls Orchestrator View Solutions Technologies Covering you everywhere with 1000+ integrations across data systems. Snowflake View AWS View Microsoft 365 View Salesforce View Workday View GCP View Azure View Oracle View Learn more Regulations Automate compliance with global privacy regulations. US California CCPA View US California CPRA View European Union GDPR View Thailand’s PDPA View China PIPL View Canada PIPEDA View Brazil's LGPD View + More View Learn more Roles Identify data risk and enable protection & control. Privacy View Security View Governance View Marketing View Resources Blog Read through our articles written by industry experts Collateral Product brochures, white papers, infographics, analyst reports and more. Knowledge Center Learn about the data privacy, security and governance landscape. Securiti Education Courses and Certifications for data privacy, security and governance professionals. Company About Us Learn all about
What is Data Subject Request Automation?
- Loss:
MatryoshkaLoss
with these parameters:{ "loss": "MultipleNegativesRankingLoss", "matryoshka_dims": [ 512, 256, 128, 64 ], "matryoshka_weights": [ 1, 1, 1, 1 ], "n_dims_per_step": -1 }
Training Hyperparameters
Non-Default Hyperparameters
eval_strategy
: epochper_device_train_batch_size
: 32per_device_eval_batch_size
: 16learning_rate
: 2e-05num_train_epochs
: 5lr_scheduler_type
: cosinewarmup_ratio
: 0.1bf16
: Truetf32
: Trueload_best_model_at_end
: Trueoptim
: adamw_torch_fusedbatch_sampler
: no_duplicates
All Hyperparameters
Click to expand
overwrite_output_dir
: Falsedo_predict
: Falseeval_strategy
: epochprediction_loss_only
: Trueper_device_train_batch_size
: 32per_device_eval_batch_size
: 16per_gpu_train_batch_size
: Noneper_gpu_eval_batch_size
: Nonegradient_accumulation_steps
: 1eval_accumulation_steps
: Nonelearning_rate
: 2e-05weight_decay
: 0.0adam_beta1
: 0.9adam_beta2
: 0.999adam_epsilon
: 1e-08max_grad_norm
: 1.0num_train_epochs
: 5max_steps
: -1lr_scheduler_type
: cosinelr_scheduler_kwargs
: {}warmup_ratio
: 0.1warmup_steps
: 0log_level
: passivelog_level_replica
: warninglog_on_each_node
: Truelogging_nan_inf_filter
: Truesave_safetensors
: Truesave_on_each_node
: Falsesave_only_model
: Falserestore_callback_states_from_checkpoint
: Falseno_cuda
: Falseuse_cpu
: Falseuse_mps_device
: Falseseed
: 42data_seed
: Nonejit_mode_eval
: Falseuse_ipex
: Falsebf16
: Truefp16
: Falsefp16_opt_level
: O1half_precision_backend
: autobf16_full_eval
: Falsefp16_full_eval
: Falsetf32
: Truelocal_rank
: 0ddp_backend
: Nonetpu_num_cores
: Nonetpu_metrics_debug
: Falsedebug
: []dataloader_drop_last
: Falsedataloader_num_workers
: 0dataloader_prefetch_factor
: Nonepast_index
: -1disable_tqdm
: Falseremove_unused_columns
: Truelabel_names
: Noneload_best_model_at_end
: Trueignore_data_skip
: Falsefsdp
: []fsdp_min_num_params
: 0fsdp_config
: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}fsdp_transformer_layer_cls_to_wrap
: Noneaccelerator_config
: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}deepspeed
: Nonelabel_smoothing_factor
: 0.0optim
: adamw_torch_fusedoptim_args
: Noneadafactor
: Falsegroup_by_length
: Falselength_column_name
: lengthddp_find_unused_parameters
: Noneddp_bucket_cap_mb
: Noneddp_broadcast_buffers
: Falsedataloader_pin_memory
: Truedataloader_persistent_workers
: Falseskip_memory_metrics
: Trueuse_legacy_prediction_loop
: Falsepush_to_hub
: Falseresume_from_checkpoint
: Nonehub_model_id
: Nonehub_strategy
: every_savehub_private_repo
: Falsehub_always_push
: Falsegradient_checkpointing
: Falsegradient_checkpointing_kwargs
: Noneinclude_inputs_for_metrics
: Falseeval_do_concat_batches
: Truefp16_backend
: autopush_to_hub_model_id
: Nonepush_to_hub_organization
: Nonemp_parameters
:auto_find_batch_size
: Falsefull_determinism
: Falsetorchdynamo
: Noneray_scope
: lastddp_timeout
: 1800torch_compile
: Falsetorch_compile_backend
: Nonetorch_compile_mode
: Nonedispatch_batches
: Nonesplit_batches
: Noneinclude_tokens_per_second
: Falseinclude_num_input_tokens_seen
: Falseneftune_noise_alpha
: Noneoptim_target_modules
: Nonebatch_eval_metrics
: Falsebatch_sampler
: no_duplicatesmulti_dataset_batch_sampler
: proportional
Training Logs
Epoch | Step | Training Loss | dim_128_cosine_map@100 | dim_256_cosine_map@100 | dim_512_cosine_map@100 | dim_64_cosine_map@100 |
---|---|---|---|---|---|---|
0.3448 | 10 | 7.4297 | - | - | - | - |
0.6897 | 20 | 5.5127 | - | - | - | - |
1.0 | 29 | - | 0.2399 | 0.2435 | 0.2579 | 0.1837 |
1.0345 | 30 | 4.8788 | - | - | - | - |
1.3793 | 40 | 4.0614 | - | - | - | - |
1.7241 | 50 | 3.3471 | - | - | - | - |
2.0 | 58 | - | 0.2373 | 0.2510 | 0.2545 | 0.1964 |
2.0690 | 60 | 3.104 | - | - | - | - |
2.4138 | 70 | 2.695 | - | - | - | - |
2.7586 | 80 | 2.2038 | - | - | - | - |
3.0 | 87 | - | 0.2416 | 0.2630 | 0.2587 | 0.2121 |
3.1034 | 90 | 2.2576 | - | - | - | - |
3.4483 | 100 | 2.1552 | - | - | - | - |
3.7931 | 110 | 1.8199 | - | - | - | - |
4.0 | 116 | - | 0.2429 | 0.2613 | 0.2546 | 0.2098 |
4.1379 | 120 | 1.9192 | - | - | - | - |
4.4828 | 130 | 1.7221 | - | - | - | - |
4.8276 | 140 | 1.6878 | - | - | - | - |
5.0 | 145 | - | 0.2486 | 0.2647 | 0.2537 | 0.2149 |
- The bold row denotes the saved checkpoint.
Framework Versions
- Python: 3.10.14
- Sentence Transformers: 3.0.1
- Transformers: 4.41.2
- PyTorch: 2.1.2+cu121
- Accelerate: 0.31.0
- Datasets: 2.19.1
- Tokenizers: 0.19.1
Citation
BibTeX
Sentence Transformers
@inproceedings{reimers-2019-sentence-bert,
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
author = "Reimers, Nils and Gurevych, Iryna",
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
month = "11",
year = "2019",
publisher = "Association for Computational Linguistics",
url = "https://arxiv.org/abs/1908.10084",
}
MatryoshkaLoss
@misc{kusupati2024matryoshka,
title={Matryoshka Representation Learning},
author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi},
year={2024},
eprint={2205.13147},
archivePrefix={arXiv},
primaryClass={cs.LG}
}
MultipleNegativesRankingLoss
@misc{henderson2017efficient,
title={Efficient Natural Language Response Suggestion for Smart Reply},
author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
year={2017},
eprint={1705.00652},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
- Downloads last month
- 5
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.
Model tree for MugheesAwan11/bge-base-securiti-dataset-1-v10
Base model
BAAI/bge-base-en-v1.5Evaluation results
- Cosine Accuracy@1 on dim 512self-reported0.080
- Cosine Accuracy@3 on dim 512self-reported0.290
- Cosine Accuracy@5 on dim 512self-reported0.480
- Cosine Accuracy@10 on dim 512self-reported0.650
- Cosine Precision@1 on dim 512self-reported0.080
- Cosine Precision@3 on dim 512self-reported0.097
- Cosine Precision@5 on dim 512self-reported0.096
- Cosine Precision@10 on dim 512self-reported0.065
- Cosine Recall@1 on dim 512self-reported0.080
- Cosine Recall@3 on dim 512self-reported0.290