CoolFace
Modelpublic

ubco-mds-2025-capstone-fujitsu-1/bge-large-en-v1.5-cve-finetuned

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes73downloads
Model Card

SentenceTransformer based on BAAI/bge-large-en-v1.5

This is a sentence-transformers model finetuned from BAAI/bge-large-en-v1.5. It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for retrieval.

Model Details

Model Description

  • —Model Type: Sentence Transformer
  • —Base model: BAAI/bge-large-en-v1.5 <!-- at revision d4aa6901d3a41ba39fb536a557fa166f842b0e09 -->
  • —Maximum Sequence Length: 256 tokens
  • —Output Dimensionality: 1024 dimensions
  • —Similarity Function: Cosine Similarity
  • —Supported Modality: Text <!-- - Training Dataset: Unknown --> <!-- - Language: Unknown --> <!-- - License: Unknown -->

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'architecture': 'BertModel'})
  (1): Pooling({'embedding_dimension': 1024, 'pooling_mode': 'cls', '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("sentence_transformers_model_id")
# Run inference
sentences = [
    'Represent this sentence for searching relevant passages: What issues exist with Intel Killer Control Center software?',
    'Improper access control for the Intel(R) Killer(TM) Control Center software before version 2.4.3337.0 may allow an authorized user to potentially enable escalation of privilege via local access.',
    'A content spoofing vulnerability in the following components allows to render html pages containing arbitrary plain text content, which might fool an end user: UI add-on for SAP NetWeaver (UI_Infra, 1.0), SAP UI Implementation for Decoupled Innovations (UI_700, 2.0): SAP NetWeaver 7.00 Implementation, SAP User Interface Technology (SAP_UI 7.4, 7.5, 7.51, 7.52). There is little impact as it is not possible to embed active contents such as JavaScript or hyperlinks.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 1024]

# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[ 1.0000,  0.7885, -0.0462],
#         [ 0.7885,  1.0000, -0.1053],
#         [-0.0462, -0.1053,  1.0000]])

<!--

Direct Usage (Transformers)

<details><summary>Click to see the direct usage in Transformers</summary>

</details> -->

<!--

Downstream Usage (Sentence Transformers)

You can finetune this model on your own dataset.

<details><summary>Click to expand</summary>

</details> -->

<!--

Out-of-Scope Use

List how the model may foreseeably be misused and address what users ought not to do with the model. -->

<!--

Bias, Risks and Limitations

What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model. -->

<!--

Recommendations

What are recommendations with respect to the foreseeable issues? For example, filtering explicit content. -->

Training Details

Training Dataset

Unnamed Dataset
  • —Size: 861,607 training samples
  • —Columns: <code>anchor</code> and <code>positive</code>
  • —Approximate statistics based on the first 100 samples: | | anchor | positive | |:---------|:-----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------| | type | string | string | | modality | text | text | | details | <ul><li>min: 15 tokens</li><li>mean: 19.66 tokens</li><li>max: 31 tokens</li></ul> | <ul><li>min: 24 tokens</li><li>mean: 84.49 tokens</li><li>max: 256 tokens</li></ul> |
  • —Samples: | anchor | positive | |:-----------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | <code>Represent this sentence for searching relevant passages: fuse filesystem sync issues</code> | <code>In the Linux kernel, the following vulnerability has been resolved:<br><br>writeback: don't block sync for filesystems with no data integrity guarantees<br><br>Add a SBINODATAINTEGRITY superblock flag for filesystems that cannot<br>guarantee data persistence on sync (eg fuse). For superblocks with this<br>flag set, sync kicks off writeback of dirty inodes but does not wait<br>for the flusher threads to complete the writeback.<br><br>This replaces the per-inode ASNODATAINTEGRITY mapping flag added in<br>commit f9a49aa302a0 ("fs/writeback: skip ASNODATAINTEGRITY mappings<br>in waitsbinodes()"). The flag belongs at the superblock level because<br>data integrity is a filesystem-wide property, not a per-inode one.<br>Having this flag at the superblock level also allows us to skip having<br>to iterate every dirty inode in waitsbinodes() only to skip each inode<br>individually.<br><br>Prior to this commit, mappings with no data integrity guarantees skipped<br>waiting on writeback completion but still waited on the flusher threads<br>t...</code> | | <code>Represent this sentence for searching relevant passages: EMC Documentum WebTop CSRF issue</code> | <code>Cross-site request forgery (CSRF) vulnerability in EMC Documentum WebTop before 6.8P01, Documentum Administrator through 7.2, Documentum Digital Assets Manager through 6.5SP6, Documentum Web Publishers through 6.5SP7, and Documentum Task Space through 6.7SP2 allows remote attackers to hijack the authentication of arbitrary users. NOTE: this vulnerability exists because of an incomplete fix for CVE-2014-2518.</code> | | <code>Represent this sentence for searching relevant passages: sensitive data exposed on Windows 10</code> | <code>An information disclosure vulnerability exists when the Windows kernel improperly handles objects in memory, aka "Windows Kernel Information Disclosure Vulnerability." This affects Windows 7, Windows Server 2012 R2, Windows RT 8.1, Windows Server 2008, Windows Server 2019, Windows Server 2012, Windows 8.1, Windows Server 2016, Windows Server 2008 R2, Windows 10, Windows 10 Servers.</code> |
  • —Loss: <code>MultipleNegativesRankingLoss</code> with these parameters:
json
  {
      "scale": 20.0,
      "similarity_fct": "cos_sim",
      "gather_across_devices": false,
      "directions": [
          "query_to_doc"
      ],
      "partition_mode": "joint",
      "hardness_mode": null,
      "hardness_strength": 0.0
  }

Evaluation Dataset

Unnamed Dataset
  • —Size: 8,000 evaluation samples
  • —Columns: <code>anchor</code> and <code>positive</code>
  • —Approximate statistics based on the first 100 samples: | | anchor | positive | |:---------|:-----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------| | type | string | string | | modality | text | text | | details | <ul><li>min: 14 tokens</li><li>mean: 20.67 tokens</li><li>max: 34 tokens</li></ul> | <ul><li>min: 22 tokens</li><li>mean: 82.34 tokens</li><li>max: 256 tokens</li></ul> |
  • —Samples: | anchor | positive | |:-------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | <code>Represent this sentence for searching relevant passages: Why are image titles causing issues in My Album Gallery?</code> | <code>The My Album Gallery plugin for WordPress is vulnerable to Stored Cross-Site Scripting via image titles in all versions up to, and including, 1.0.4. This is due to insufficient input sanitization and output escaping on the 'attachment->title' attribute. This makes it possible for authenticated attackers, with Author-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.</code> | | <code>Represent this sentence for searching relevant passages: jenkins bitbucket server integration csrf bypass</code> | <code>Jenkins Bitbucket Server Integration Plugin 2.1.0 through 4.1.3 (both inclusive) allows attackers to craft URLs that would bypass the CSRF protection of any target URL in Jenkins.</code> | | <code>Represent this sentence for searching relevant passages: Android keystore integer overflow issue</code> | <code>Multiple integer overflows in the Blob class in keystore/keystore.cpp in Keystore in Android before 5.1.1 LMY48M allow attackers to execute arbitrary code and read arbitrary Keystore keys via an application that uses a crafted blob in an insert operation, aka internal bug 22802399.</code> |
  • —Loss: <code>MultipleNegativesRankingLoss</code> with these parameters:
json
  {
      "scale": 20.0,
      "similarity_fct": "cos_sim",
      "gather_across_devices": false,
      "directions": [
          "query_to_doc"
      ],
      "partition_mode": "joint",
      "hardness_mode": null,
      "hardness_strength": 0.0
  }

Training Hyperparameters

Non-Default Hyperparameters
  • —per_device_train_batch_size: 16
  • —num_train_epochs: 1.0
  • —learning_rate: 2e-05
  • —warmup_steps: 0.1
  • —gradient_accumulation_steps: 2
  • —fp16: True
  • —per_device_eval_batch_size: 16
  • —load_best_model_at_end: True
  • —dataloader_drop_last: True
All Hyperparameters

<details><summary>Click to expand</summary>

  • —per_device_train_batch_size: 16
  • —num_train_epochs: 1.0
  • —max_steps: -1
  • —learning_rate: 2e-05
  • —lr_scheduler_type: linear
  • —lr_scheduler_kwargs: None
  • —warmup_steps: 0.1
  • —optim: adamwtorchfused
  • —optim_args: None
  • —weight_decay: 0.0
  • —adam_beta1: 0.9
  • —adam_beta2: 0.999
  • —adam_epsilon: 1e-08
  • —optim_target_modules: None
  • —gradient_accumulation_steps: 2
  • —average_tokens_across_devices: True
  • —max_grad_norm: 1.0
  • —label_smoothing_factor: 0.0
  • —bf16: False
  • —fp16: True
  • —bf16_full_eval: False
  • —fp16_full_eval: False
  • —tf32: None
  • —gradient_checkpointing: False
  • —gradient_checkpointing_kwargs: None
  • —torch_compile: False
  • —torch_compile_backend: None
  • —torch_compile_mode: None
  • —use_liger_kernel: False
  • —liger_kernel_config: None
  • —use_cache: False
  • —neftune_noise_alpha: None
  • —torch_empty_cache_steps: None
  • —auto_find_batch_size: False
  • —log_on_each_node: True
  • —logging_nan_inf_filter: True
  • —include_num_input_tokens_seen: no
  • —log_level: passive
  • —log_level_replica: warning
  • —disable_tqdm: False
  • —project: huggingface
  • —trackio_space_id: None
  • —trackio_bucket_id: None
  • —trackio_static_space_id: None
  • —per_device_eval_batch_size: 16
  • —prediction_loss_only: True
  • —eval_on_start: False
  • —eval_do_concat_batches: True
  • —eval_use_gather_object: False
  • —eval_accumulation_steps: None
  • —include_for_metrics: []
  • —batch_eval_metrics: False
  • —save_only_model: False
  • —save_on_each_node: False
  • —enable_jit_checkpoint: False
  • —push_to_hub: False
  • —hub_private_repo: None
  • —hub_model_id: None
  • —hub_strategy: every_save
  • —hub_always_push: False
  • —hub_revision: None
  • —load_best_model_at_end: True
  • —ignore_data_skip: False
  • —restore_callback_states_from_checkpoint: False
  • —full_determinism: False
  • —seed: 42
  • —data_seed: None
  • —use_cpu: False
  • —accelerator_config: {'splitbatches': False, 'dispatchbatches': None, 'evenbatches': True, 'useseedablesampler': True, 'nonblocking': False, 'gradientaccumulationkwargs': None}
  • —parallelism_config: None
  • —dataloader_drop_last: True
  • —dataloader_num_workers: 0
  • —dataloader_pin_memory: True
  • —dataloader_persistent_workers: False
  • —dataloader_prefetch_factor: None
  • —remove_unused_columns: True
  • —label_names: None
  • —train_sampling_strategy: random
  • —length_column_name: length
  • —ddp_find_unused_parameters: None
  • —ddp_bucket_cap_mb: None
  • —ddp_broadcast_buffers: False
  • —ddp_static_graph: None
  • —ddp_backend: None
  • —ddp_timeout: 1800
  • —fsdp: None
  • —fsdp_config: None
  • —deepspeed: None
  • —debug: []
  • —skip_memory_metrics: True
  • —do_predict: False
  • —resume_from_checkpoint: None
  • —warmup_ratio: None
  • —local_rank: -1
  • —prompts: None
  • —batch_sampler: batch_sampler
  • —multi_dataset_batch_sampler: proportional
  • —router_mapping: {}
  • —learning_rate_mapping: {}

</details>

Training Logs

<details><summary>Click to expand</summary>

EpochStepTraining LossValidation Loss
0.00371000.5356-
0.00742000.2858-
0.01113000.1882-
0.01494000.1625-
0.01865000.1592-
0.02236000.1290-
0.02607000.1179-
0.02978000.1205-
0.03349000.1074-
0.037110000.0999-
0.040911000.0996-
0.044612000.0978-
0.048313000.1007-
0.052014000.0992-
0.055715000.0871-
0.059416000.1039-
0.063117000.0873-
0.066918000.0883-
0.070619000.0855-
0.074320000.0852-
0.078021000.0927-
0.081722000.0844-
0.085423000.0901-
0.089124000.0850-
0.092925000.0937-
0.096626000.0879-
0.100327000.0985-
0.104028000.0879-
0.107729000.0730-
0.111430000.0731-
0.115131000.0904-
0.118832000.0789-
0.122633000.0702-
0.126334000.0677-
0.130035000.0774-
0.133736000.0816-
0.137437000.0794-
0.141138000.0742-
0.144839000.0765-
0.148640000.0683-
0.152341000.0753-
0.156042000.0760-
0.159743000.0697-
0.163444000.0830-
0.167145000.0754-
0.170846000.0686-
0.174647000.0904-
0.178348000.0709-
0.182049000.0766-
0.185750000.0692-
0.189451000.0692-
0.193152000.0582-
0.196853000.0757-
0.200654000.0763-
0.204355000.0687-
0.208056000.0727-
0.211757000.0681-
0.215458000.0609-
0.219159000.0689-
0.222860000.0749-
0.226661000.0767-
0.230362000.0667-
0.234063000.0637-
0.237764000.0660-
0.241465000.0671-
0.245166000.0577-
0.248867000.0717-
0.252668000.0715-
0.256369000.0646-
0.260070000.0688-
0.263771000.0696-
0.267472000.0648-
0.271173000.0590-
0.274874000.0648-
0.278675000.0645-
0.282376000.0667-
0.286077000.0652-
0.289778000.0607-
0.293479000.0648-
0.297180000.0646-
0.300881000.0652-
0.304582000.0585-
0.308383000.0549-
0.312084000.0595-
0.315785000.0594-
0.319486000.0632-
0.323187000.0548-
0.326888000.0738-
0.330589000.0538-
0.334390000.0575-
0.338091000.0531-
0.341792000.0660-
0.345493000.0609-
0.349194000.0620-
0.352895000.0584-
0.356596000.0607-
0.360397000.0623-
0.364098000.0554-
0.367799000.0562-
0.3714100000.0625-
0.3751101000.0580-
0.3788102000.0558-
0.3825103000.0597-
0.3863104000.0677-
0.3900105000.0631-
0.3937106000.0641-
0.3974107000.0511-
0.4011108000.0650-
0.4048109000.0540-
0.4085110000.0521-
0.4123111000.0605-
0.4160112000.0571-
0.4197113000.0556-
0.4234114000.0600-
0.4271115000.0541-
0.4308116000.0633-
0.4345117000.0580-
0.4383118000.0562-
0.4420119000.0550-
0.4457120000.0502-
0.4494121000.0445-
0.4531122000.0599-
0.4568123000.0441-
0.4605124000.0587-
0.4643125000.0560-
0.4680126000.0523-
0.4717127000.0547-
0.4754128000.0542-
0.4791129000.0574-
0.4828130000.0600-
0.4865131000.0587-
0.4903132000.0517-
0.4940133000.0484-
0.4977134000.0578-
0.5014135000.04770.0255
0.5051136000.0523-
0.5088137000.0548-
0.5125138000.0481-
0.5162139000.0508-
0.5200140000.0638-
0.5237141000.0418-
0.5274142000.0566-
0.5311143000.0519-
0.5348144000.0587-
0.5385145000.0514-
0.5422146000.0460-
0.5460147000.0549-
0.5497148000.0588-
0.5534149000.0474-
0.5571150000.0504-
0.5608151000.0455-
0.5645152000.0549-
0.5682153000.0560-
0.5720154000.0469-
0.5757155000.0536-
0.5794156000.0542-
0.5831157000.0556-
0.5868158000.0479-
0.5905159000.0487-
0.5942160000.0419-
0.5980161000.0515-
0.6017162000.0498-
0.6054163000.0555-
0.6091164000.0450-
0.6128165000.0462-
0.6165166000.0433-
0.6202167000.0525-
0.6240168000.0512-
0.6277169000.0540-
0.6314170000.0460-
0.6351171000.0501-
0.6388172000.0487-
0.6425173000.0414-
0.6462174000.0396-
0.6500175000.0497-
0.6537176000.0504-
0.6574177000.0578-
0.6611178000.0448-
0.6648179000.0533-
0.6685180000.0474-
0.6722181000.0459-
0.6760182000.0431-
0.6797183000.0438-
0.6834184000.0479-
0.6871185000.0487-
0.6908186000.0395-
0.6945187000.0443-
0.6982188000.0393-
0.7019189000.0444-
0.7057190000.0492-
0.7094191000.0506-
0.7131192000.0478-
0.7168193000.0386-
0.7205194000.0403-
0.7242195000.0413-
0.7279196000.0427-
0.7317197000.0460-
0.7354198000.0399-
0.7391199000.0434-
0.7428200000.0461-
0.7465201000.0462-
0.7502202000.0486-
0.7539203000.0433-
0.7577204000.0453-
0.7614205000.0452-
0.7651206000.0494-
0.7688207000.0356-
0.7725208000.0383-
0.7762209000.0408-
0.7799210000.0378-
0.7837211000.0420-
0.7874212000.0403-
0.7911213000.0455-
0.7948214000.0411-
0.7985215000.0470-
0.8022216000.0373-
0.8059217000.0385-
0.8097218000.0442-
0.8134219000.0421-
0.8171220000.0528-
0.8208221000.0499-
0.8245222000.0408-
0.8282223000.0464-
0.8319224000.0428-
0.8357225000.0400-
0.8394226000.0409-
0.8431227000.0486-
0.8468228000.0405-
0.8505229000.0415-
0.8542230000.0415-
0.8579231000.0406-
0.8617232000.0393-
0.8654233000.0381-
0.8691234000.0445-
0.8728235000.0426-
0.8765236000.0396-
0.8802237000.0448-
0.8839238000.0361-
0.8877239000.0412-
0.8914240000.0411-
0.8951241000.0439-
0.8988242000.0365-
0.9025243000.0351-
0.9062244000.0366-
0.9099245000.0358-
0.9136246000.0397-
0.9174247000.0448-
0.9211248000.0414-
0.9248249000.0413-
0.9285250000.0405-
0.9322251000.0341-
0.9359252000.0505-
0.9396253000.0397-
0.9434254000.0435-
0.9471255000.0327-
0.9508256000.0371-
0.9545257000.0351-
0.9582258000.0409-
0.9619259000.0451-
0.9656260000.0485-
0.9694261000.0407-
0.9731262000.0455-
0.9768263000.0376-
0.9805264000.0385-
0.9842265000.0347-
0.9879266000.0312-
0.9916267000.0346-
0.9954268000.0361-
0.9991269000.0375-
1.026925-0.0199
  • —The bold row denotes the saved checkpoint. </details>

Training Time

  • —Training: 4.5 days
  • —Evaluation: 30.9 minutes
  • —Total: 4.5 days

Framework Versions

  • —Python: 3.11.9
  • —Sentence Transformers: 5.5.1
  • —Transformers: 5.10.2
  • —PyTorch: 2.12.0+cu126
  • —Accelerate: 1.13.0
  • —Datasets: 5.0.0
  • —Tokenizers: 0.22.2

Citation

BibTeX

Sentence Transformers
bibtex
@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",
}
MultipleNegativesRankingLoss
bibtex
@misc{oord2019representationlearningcontrastivepredictive,
      title={Representation Learning with Contrastive Predictive Coding},
      author={Aaron van den Oord and Yazhe Li and Oriol Vinyals},
      year={2019},
      eprint={1807.03748},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/1807.03748},
}

<!--

Glossary

Clearly define terms in order to be accessible across audiences. -->

<!--

Model Card Authors

Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction. -->

<!--

Model Card Contact

Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors. -->