Edit model card

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

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-v8")
# Run inference
sentences = [
    '["PR and Federal Data Protection Act within Germany;\\n\\nTo promote awareness within the public related to the risks, rules, safeguards, and rights concerning the processing of personal data;\\n\\nTo 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;\\n\\n## Penalties for Non\\n\\ncompliance\\n\\nThe 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.\\n\\nGermany\'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.\\n\\nThis 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.\\n\\nHowever, for this fine to be applied, either the data subject, the Federal Commissioner, or the regulatory authority must file an official complaint.\\n\\n## How an Organization Can Operationalize the Law\\n\\nData handlers processing data inside Germany can remain compliant with the country\'s data protection law if they fulfill the following conditions:\\n\\nHave 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\\n\\nHire a competent Data Protection Officer that understands the GDPR and Federal Data Protection Act thoroughly and can lead compliance efforts within your organisation\\n\\nEnsure all the company\'s employees and staff are acutely aware of their responsibilities under the law\\n\\nConduct regular data protection impact assessments as well as data mapping exercises to ensure maximum efficiency in your compliance efforts\\n\\nNotify the relevant authorities of a data breach as soon as possible\\n\\n## How can Securiti Help\\n\\nData 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

Metric Value
cosine_accuracy@1 0.07
cosine_accuracy@3 0.26
cosine_accuracy@5 0.44
cosine_accuracy@10 0.63
cosine_precision@1 0.07
cosine_precision@3 0.0867
cosine_precision@5 0.088
cosine_precision@10 0.063
cosine_recall@1 0.07
cosine_recall@3 0.26
cosine_recall@5 0.44
cosine_recall@10 0.63
cosine_ndcg@10 0.3151
cosine_mrr@10 0.218
cosine_map@100 0.2318

Information Retrieval

Metric Value
cosine_accuracy@1 0.06
cosine_accuracy@3 0.24
cosine_accuracy@5 0.44
cosine_accuracy@10 0.6
cosine_precision@1 0.06
cosine_precision@3 0.08
cosine_precision@5 0.088
cosine_precision@10 0.06
cosine_recall@1 0.06
cosine_recall@3 0.24
cosine_recall@5 0.44
cosine_recall@10 0.6
cosine_ndcg@10 0.2944
cosine_mrr@10 0.2
cosine_map@100 0.2149

Information Retrieval

Metric Value
cosine_accuracy@1 0.07
cosine_accuracy@3 0.21
cosine_accuracy@5 0.4
cosine_accuracy@10 0.6
cosine_precision@1 0.07
cosine_precision@3 0.07
cosine_precision@5 0.08
cosine_precision@10 0.06
cosine_recall@1 0.07
cosine_recall@3 0.21
cosine_recall@5 0.4
cosine_recall@10 0.6
cosine_ndcg@10 0.2902
cosine_mrr@10 0.1963
cosine_map@100 0.2117

Information Retrieval

Metric Value
cosine_accuracy@1 0.07
cosine_accuracy@3 0.17
cosine_accuracy@5 0.32
cosine_accuracy@10 0.53
cosine_precision@1 0.07
cosine_precision@3 0.0567
cosine_precision@5 0.064
cosine_precision@10 0.053
cosine_recall@1 0.07
cosine_recall@3 0.17
cosine_recall@5 0.32
cosine_recall@10 0.53
cosine_ndcg@10 0.2594
cosine_mrr@10 0.1776
cosine_map@100 0.1946

Training Details

Training Dataset

Unnamed Dataset

  • Size: 900 training samples
  • Columns: positive and anchor
  • Approximate statistics based on the first 1000 samples:
    positive anchor
    type string string
    details
    • min: 512 tokens
    • mean: 512.0 tokens
    • max: 512 tokens
    • min: 7 tokens
    • mean: 22.05 tokens
    • max: 82 tokens
  • Samples:
    positive anchor
    ["orra\n\nThe Andorra personal data protection act came into force on May 17, 2022, by the Andorra Data Protection Authority (ADPA). Learn more about Andorra PDPA\n\n### United Kingdom\n\nThe 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\n\n### Botswana\n\nThe 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\n\n### Zambia\n\nOn 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\n\n### Jamaica\n\nOn 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\n\n### Belarus\n\nThe 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\n\n### Russian Federation\n\nThe primary Russian law on data protection, Federal Law No. 152-FZ has been in effect since July 2006. Learn more\n\n### Eswatini\n\nOn March 4, 2022, the Eswatini Communications Commission published the Data Protection Act No. 5 of 2022, simultaneously announcing its immediate enforcement. Learn more\n\n### Oman\n\nThe Royal Decree 6/2022 promulgating the Personal Data Protection Law (PDPL) was passed on February 9, 2022. Learn more\n\n### Sri Lanka\n\nSri Lanka's parliament formally passed the Personal Data Protection Act (PDPA), No. 9 Of 2022, on March 19, 2022. Learn more\n\n### Kuwait\n\nKuwait's DPPR was formally introduced by the CITRA to ensure the Gulf country's data privacy infrastructure. Learn more\n\n### Brunei Darussalam\n\nThe draft Personal Data Protection Order is Brunei’s primary data protection law which came into effect in 2022. Learn more\n\n### India\n\nIndia’"] 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.\n\n### Data Protection Impact Assessment\n\nThere is no requirement for conducting data protection impact assessment under the PDPA.\n\n### Record of Processing Activities\n\nA 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.\n\n### Cross Border Data Transfer Requirements\n\nThe 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:\n\nWhere the consent of data subject is obtained for transfer; or\n\nWhere the transfer is necessary for the performance of contract between the parties;\n\nThe 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;\n\nThe 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;\n\nThe transfer is necessary in order to protect the vital interests of the data subject; or\n\nThe transfer is necessary as being in the public interest in circumstances as determined by the Minister.\n\n## Data Subject Rights\n\nThe 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:\n\n## Right to withdraw consent\n\nThe 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.\n\n## Right to access and rectification\n\nAs 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.\n\n## Right to data portability\n\nData 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\n\nPrivacy\n\nAutomate compliance with global privacy regulations\n\nData Mapping Automation\n\nView\n\nData Subject Request Automation\n\nView\n\nPeople Data Graph\n\nView\n\nAssessment Automation\n\nView\n\nCookie Consent\n\nView\n\nUniversal Consent\n\nView\n\nVendor Risk Assessment\n\nView\n\nBreach Management\n\nView\n\nPrivacy Policy Management\n\nView\n\nPrivacy Center\n\nView\n\nLearn more\n\nSecurity\n\nIdentify data risk and enable protection & control\n\nData Security Posture Management\n\nView\n\nData Access Intelligence & Governance\n\nView\n\nData Risk Management\n\nView\n\nData Breach Analysis\n\nView\n\nLearn more\n\nGovernance\n\nOptimize Data Governance with granular insights into your data\n\nData Catalog\n\nView\n\nData Lineage\n\nView\n\nData Quality\n\nView\n\nData Controls Orchestrator\n\nView\n\nSolutions\n\nTechnologies\n\nCovering you everywhere with 1000+ integrations across data systems.\n\nSnowflake\n\nView\n\nAWS\n\nView\n\nMicrosoft 365\n\nView\n\nSalesforce\n\nView\n\nWorkday\n\nView\n\nGCP\n\nView\n\nAzure\n\nView\n\nOracle\n\nView\n\nLearn more\n\nRegulations\n\nAutomate compliance with global privacy regulations.\n\nUS California CCPA\n\nView\n\nUS California CPRA\n\nView\n\nEuropean Union GDPR\n\nView\n\nThailand’s PDPA\n\nView\n\nChina PIPL\n\nView\n\nCanada PIPEDA\n\nView\n\nBrazil's LGPD\n\nView\n\n\+ More\n\nView\n\nLearn more\n\nRoles\n\nIdentify data risk and enable protection & control.\n\nPrivacy\n\nView\n\nSecurity\n\nView\n\nGovernance\n\nView\n\nMarketing\n\nView\n\nResources\n\nBlog\n\nRead through our articles written by industry experts\n\nCollateral\n\nProduct brochures, white papers, infographics, analyst reports and more.\n\nKnowledge Center\n\nLearn about the data privacy, security and governance landscape.\n\nSecuriti Education\n\nCourses and Certifications for data privacy, security and governance professionals.\n\nCompany\n\nAbout Us\n\nLearn 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: epoch
  • per_device_train_batch_size: 32
  • per_device_eval_batch_size: 16
  • learning_rate: 2e-05
  • num_train_epochs: 5
  • lr_scheduler_type: cosine
  • warmup_ratio: 0.1
  • bf16: True
  • tf32: True
  • load_best_model_at_end: True
  • optim: adamw_torch_fused
  • batch_sampler: no_duplicates

All Hyperparameters

Click to expand
  • overwrite_output_dir: False
  • do_predict: False
  • eval_strategy: epoch
  • prediction_loss_only: True
  • per_device_train_batch_size: 32
  • per_device_eval_batch_size: 16
  • per_gpu_train_batch_size: None
  • per_gpu_eval_batch_size: None
  • gradient_accumulation_steps: 1
  • eval_accumulation_steps: None
  • learning_rate: 2e-05
  • weight_decay: 0.0
  • adam_beta1: 0.9
  • adam_beta2: 0.999
  • adam_epsilon: 1e-08
  • max_grad_norm: 1.0
  • num_train_epochs: 5
  • max_steps: -1
  • lr_scheduler_type: cosine
  • lr_scheduler_kwargs: {}
  • warmup_ratio: 0.1
  • warmup_steps: 0
  • log_level: passive
  • log_level_replica: warning
  • log_on_each_node: True
  • logging_nan_inf_filter: True
  • save_safetensors: True
  • save_on_each_node: False
  • save_only_model: False
  • restore_callback_states_from_checkpoint: False
  • no_cuda: False
  • use_cpu: False
  • use_mps_device: False
  • seed: 42
  • data_seed: None
  • jit_mode_eval: False
  • use_ipex: False
  • bf16: True
  • fp16: False
  • fp16_opt_level: O1
  • half_precision_backend: auto
  • bf16_full_eval: False
  • fp16_full_eval: False
  • tf32: True
  • local_rank: 0
  • ddp_backend: None
  • tpu_num_cores: None
  • tpu_metrics_debug: False
  • debug: []
  • dataloader_drop_last: False
  • dataloader_num_workers: 0
  • dataloader_prefetch_factor: None
  • past_index: -1
  • disable_tqdm: False
  • remove_unused_columns: True
  • label_names: None
  • load_best_model_at_end: True
  • ignore_data_skip: False
  • fsdp: []
  • fsdp_min_num_params: 0
  • fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
  • fsdp_transformer_layer_cls_to_wrap: None
  • accelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
  • deepspeed: None
  • label_smoothing_factor: 0.0
  • optim: adamw_torch_fused
  • optim_args: None
  • adafactor: False
  • group_by_length: False
  • length_column_name: length
  • ddp_find_unused_parameters: None
  • ddp_bucket_cap_mb: None
  • ddp_broadcast_buffers: False
  • dataloader_pin_memory: True
  • dataloader_persistent_workers: False
  • skip_memory_metrics: True
  • use_legacy_prediction_loop: False
  • push_to_hub: False
  • resume_from_checkpoint: None
  • hub_model_id: None
  • hub_strategy: every_save
  • hub_private_repo: False
  • hub_always_push: False
  • gradient_checkpointing: False
  • gradient_checkpointing_kwargs: None
  • include_inputs_for_metrics: False
  • eval_do_concat_batches: True
  • fp16_backend: auto
  • push_to_hub_model_id: None
  • push_to_hub_organization: None
  • mp_parameters:
  • auto_find_batch_size: False
  • full_determinism: False
  • torchdynamo: None
  • ray_scope: last
  • ddp_timeout: 1800
  • torch_compile: False
  • torch_compile_backend: None
  • torch_compile_mode: None
  • dispatch_batches: None
  • split_batches: None
  • include_tokens_per_second: False
  • include_num_input_tokens_seen: False
  • neftune_noise_alpha: None
  • optim_target_modules: None
  • batch_eval_metrics: False
  • batch_sampler: no_duplicates
  • multi_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.9428 - - - -
0.6897 20 6.0138 - - - -
1.0 29 - 0.2011 0.2099 0.2307 0.1829
1.0345 30 5.4431 - - - -
1.3793 40 4.4675 - - - -
1.7241 50 3.7435 - - - -
2.0 58 - 0.2092 0.2161 0.2341 0.1983
2.0690 60 3.6676 - - - -
2.4138 70 3.0414 - - - -
2.7586 80 2.5451 - - - -
3.0 87 - 0.2091 0.2137 0.2426 0.1868
3.1034 90 2.7694 - - - -
3.4483 100 2.3624 - - - -
3.7931 110 2.1016 - - - -
4.0 116 - 0.2139 0.2137 0.2271 0.1964
4.1379 120 2.3842 - - - -
4.4828 130 1.9261 - - - -
4.8276 140 1.9737 - - - -
5.0 145 - 0.2117 0.2149 0.2318 0.1946
  • 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
9
Safetensors
Model size
109M params
Tensor type
F32
·
Inference Examples
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-v8

Finetuned
(292)
this model

Evaluation results