CoolFace
Modelpublic

shahafvl/bge-reasoner-scientific-parent-prompt

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes18downloads
Model Card

SentenceTransformer based on BAAI/bge-reasoner-embed-qwen3-8b-0923

This is a sentence-transformers model finetuned from BAAI/bge-reasoner-embed-qwen3-8b-0923. It maps sentences & paragraphs to a 4096-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-reasoner-embed-qwen3-8b-0923 <!-- at revision 02192a23ae188a684c39a860739a8fa3e0032f86 -->
  • —Maximum Sequence Length: 40960 tokens
  • —Output Dimensionality: 4096 dimensions
  • —Similarity Function: Cosine Similarity <!-- - Training Dataset: Unknown --> <!-- - Language: Unknown --> <!-- - License: Unknown -->

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 40960, 'do_lower_case': False, 'architecture': 'Qwen3Model'})
  (1): Pooling({'word_embedding_dimension': 4096, 'pooling_mode_cls_token': False, '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': True, 'include_prompt': True})
)

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("shahafvl/bge-reasoner-scientific-parent-prompt")
# Run inference
queries = [
    "Running document analytics pipelines can be highly time-consuming, particularly as the underlying corpora expand at a rapid pace. In addition, these workloads typically demand substantial storage capacity and main memory. A widely adopted strategy to alleviate the storage pressure is to apply data compression.",
]
documents = [
    'Data-intensive analytics workloads are often both computationally expensive and demanding in terms of storage and memory resources, with costs escalating as datasets grow. One prevalent method for alleviating storage and memory pressure is to store data in compressed form.',
    'Endmember variability in spectral unmixing encompasses both extrinsic factors, such as sensor geometry and illumination, and intrinsic factors related to the physical and chemical properties of the materials. While the former can often be approximated with analytical radiative transfer models, the latter is generally too complex to describe explicitly, motivating the adoption of statistical distributions, mixture models, or stochastic processes to model endmember spectra in high-dimensional spaces.',
    'Studies on virus–host interactions increasingly highlight that co-infected individuals can display unique transcriptional signatures compared to those infected by a single virus, underscoring the importance of examining multiple infection states. At the same time, global change research has emphasized that coastal areas, where human populations and infrastructure are heavily concentrated, are disproportionately exposed to emerging environmental hazards such as sea-level rise and coastal flooding.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 4096] [3, 4096]

# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[0.7878, 0.1387, 0.1161]])

<!--

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. -->

Evaluation

Metrics

Information Retrieval
MetricValue
cosine_accuracy@10.999
cosine_accuracy@31.0
cosine_accuracy@51.0
cosine_accuracy@101.0
cosine_precision@10.999
cosine_precision@30.999
cosine_precision@50.9842
cosine_precision@100.5936
cosine_recall@10.1665
cosine_recall@30.4996
cosine_recall@50.8202
cosine_recall@100.9893
cosine_ndcg@100.9902
cosine_mrr@100.9994
cosine_map@1000.9853
Triplet
Metricorig_vs_parentorig_vs_grandparentsib_vs_parentsib_vs_grandparent
cosine_accuracy0.97670.02330.97710.0229

<!--

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: 161,986 training samples
  • —Columns: <code>anchor</code> and <code>positive</code>
  • —Approximate statistics based on the first 1000 samples: | | anchor | positive | |:--------|:------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------| | type | string | string | | details | <ul><li>min: 42 tokens</li><li>mean: 78.81 tokens</li><li>max: 124 tokens</li></ul> | <ul><li>min: 43 tokens</li><li>mean: 70.13 tokens</li><li>max: 108 tokens</li></ul> |
  • —Samples: | anchor | positive | |:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | <code>LLZO is stable against Li metal and against a high voltage cathode. However, oxides generally require high sintering temperatures to remove grain boundaries to achieve the reported conductivity values. They also tend to be brittle, which makes it harder (relative to the sulfides) to maintain solid-solid interfacial contact and also to process.</code> | <code>Oxide-based solid electrolytes often show excellent electrochemical stability with both lithium metal anodes and high-voltage cathodes, but exploiting their full ionic conductivity generally requires aggressive high-temperature sintering to suppress grain boundary resistance. The resulting brittle ceramic bodies can be challenging to process and to integrate mechanically, particularly when maintaining intimate solid–solid interfacial contact with electrodes is critical.</code> | | <code>LLZO is stable against Li metal and against a high voltage cathode. However, oxides generally require high sintering temperatures to remove grain boundaries to achieve the reported conductivity values. They also tend to be brittle, which makes it harder (relative to the sulfides) to maintain solid-solid interfacial contact and also to process.</code> | <code>Oxide-based solid electrolytes often show excellent electrochemical stability with both lithium metal anodes and high-voltage cathodes, but exploiting their full ionic conductivity generally requires aggressive high-temperature sintering to suppress grain boundary resistance. The resulting brittle ceramic bodies can be challenging to process and to integrate mechanically, particularly when maintaining intimate solid–solid interfacial contact with electrodes is critical.</code> | | <code>LLZO is stable against Li metal and against a high voltage cathode. However, oxides generally require high sintering temperatures to remove grain boundaries to achieve the reported conductivity values. They also tend to be brittle, which makes it harder (relative to the sulfides) to maintain solid-solid interfacial contact and also to process.</code> | <code>Oxide-based solid electrolytes often show excellent electrochemical stability with both lithium metal anodes and high-voltage cathodes, but exploiting their full ionic conductivity generally requires aggressive high-temperature sintering to suppress grain boundary resistance. The resulting brittle ceramic bodies can be challenging to process and to integrate mechanically, particularly when maintaining intimate solid–solid interfacial contact with electrodes is critical.</code> |
  • —Loss: <code>MultipleNegativesRankingLoss</code> with these parameters:
json
  {
      "scale": 20.0,
      "similarity_fct": "cos_sim",
      "gather_across_devices": false
  }

Training Hyperparameters

Non-Default Hyperparameters
  • —eval_strategy: steps
  • —learning_rate: 1e-05
  • —num_train_epochs: 1
  • —warmup_ratio: 0.05
  • —bf16: True
  • —disable_tqdm: True
  • —load_best_model_at_end: True
  • —push_to_hub: True
  • —hub_model_id: shahafvl/bge-reasoner-scientific-parent-prompt
  • —hub_private_repo: False
  • —auto_find_batch_size: True
  • —prompts: {'anchor': 'Retrieve the broader scientific generalization or context for the given specific text.\nQuery: '}
All Hyperparameters

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

  • —overwrite_output_dir: False
  • —do_predict: False
  • —eval_strategy: steps
  • —prediction_loss_only: True
  • —per_device_train_batch_size: 8
  • —per_device_eval_batch_size: 8
  • —per_gpu_train_batch_size: None
  • —per_gpu_eval_batch_size: None
  • —gradient_accumulation_steps: 1
  • —eval_accumulation_steps: None
  • —torch_empty_cache_steps: None
  • —learning_rate: 1e-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: 1
  • —max_steps: -1
  • —lr_scheduler_type: linear
  • —lr_scheduler_kwargs: {}
  • —warmup_ratio: 0.05
  • —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
  • —bf16: True
  • —fp16: False
  • —fp16_opt_level: O1
  • —half_precision_backend: auto
  • —bf16_full_eval: False
  • —fp16_full_eval: False
  • —tf32: None
  • —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: True
  • —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: {'minnumparams': 0, 'xla': False, 'xlafsdpv2': False, 'xlafsdpgrad_ckpt': False}
  • —fsdp_transformer_layer_cls_to_wrap: None
  • —accelerator_config: {'splitbatches': False, 'dispatchbatches': None, 'evenbatches': True, 'useseedablesampler': True, 'nonblocking': False, 'gradientaccumulationkwargs': None}
  • —parallelism_config: None
  • —deepspeed: None
  • —label_smoothing_factor: 0.0
  • —optim: adamwtorchfused
  • —optim_args: None
  • —adafactor: False
  • —group_by_length: False
  • —length_column_name: length
  • —project: huggingface
  • —trackio_space_id: trackio
  • —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: True
  • —resume_from_checkpoint: None
  • —hub_model_id: shahafvl/bge-reasoner-scientific-parent-prompt
  • —hub_strategy: every_save
  • —hub_private_repo: False
  • —hub_always_push: False
  • —hub_revision: None
  • —gradient_checkpointing: False
  • —gradient_checkpointing_kwargs: None
  • —include_inputs_for_metrics: False
  • —include_for_metrics: []
  • —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: True
  • —full_determinism: False
  • —torchdynamo: None
  • —ray_scope: last
  • —ddp_timeout: 1800
  • —torch_compile: False
  • —torch_compile_backend: None
  • —torch_compile_mode: None
  • —include_tokens_per_second: False
  • —include_num_input_tokens_seen: no
  • —neftune_noise_alpha: None
  • —optim_target_modules: None
  • —batch_eval_metrics: False
  • —eval_on_start: False
  • —use_liger_kernel: False
  • —liger_kernel_config: None
  • —eval_use_gather_object: False
  • —average_tokens_across_devices: True
  • —prompts: {'anchor': 'Retrieve the broader scientific generalization or context for the given specific text.\nQuery: '}
  • —batch_sampler: batch_sampler
  • —multi_dataset_batch_sampler: proportional
  • —router_mapping: {}
  • —learning_rate_mapping: {}

</details>

Training Logs

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

EpochStepTraining Lossir_parent_grandparent_combined_cosine_ndcg@10orig_vs_parent_cosine_accuracyorig_vs_grandparent_cosine_accuracysib_vs_parent_cosine_accuracysib_vs_grandparent_cosine_accuracy
0.00491000.0599-----
0.00992000.0271-----
0.01483000.0139-----
0.01984000.0064-----
0.02475000.0041-----
0.02966000.0023-----
0.03467000.0037-----
0.03958000.0015-----
0.04449000.0007-----
0.049410000.0008-----
0.054311000.0033-----
0.059312000.0024-----
0.064213000.0032-----
0.069114000.0004-----
0.074115000.0028-----
0.079016000.0003-----
0.084017000.0005-----
0.088918000.002-----
0.093819000.0002-----
0.098820000.0029-----
0.103721000.0033-----
0.108622000.0004-----
0.113623000.0003-----
0.118524000.0003-----
0.123525000.0003-----
0.128426000.0023-----
0.133327000.0019-----
0.138328000.0021-----
0.143229000.0084-----
0.148230000.0044-----
0.153131000.0003-----
0.158032000.0003-----
0.163033000.0003-----
0.167934000.002-----
0.172835000.0002-----
0.177836000.0019-----
0.182737000.0008-----
0.187738000.0003-----
0.192639000.0003-----
0.197540000.0002-----
0.202541000.0001-----
0.207442000.0024-----
0.212443000.0002-----
0.217344000.0021-----
0.222245000.0001-----
0.227246000.0002-----
0.232147000.0002-----
0.237048000.0025-----
0.242049000.0058-----
0.246950000.0002-----
0.251951000.0022-----
0.256852000.0004-----
0.261753000.0002-----
0.266754000.0021-----
0.271655000.0019-----
0.276656000.0021-----
0.281557000.0002-----
0.286458000.0001-----
0.291459000.002-----
0.296360000.0002-----
0.301261000.0004-----
0.306262000.0004-----
0.311163000.0019-----
0.316164000.0019-----
0.321065000.0001-----
0.325966000.0031-----
0.330967000.0021-----
0.335868000.002-----
0.340869000.0003-----
0.345770000.0021-----
0.350671000.0001-----
0.355672000.0001-----
0.360573000.0021-----
0.365574000.0002-----
0.370475000.00550.98850.97380.02620.97530.0247
0.375376000.0036-----
0.380377000.0034-----
0.385278000.0001-----
0.390179000.0003-----
0.395180000.0018-----
0.400081000.0025-----
0.405082000.0001-----
0.409983000.0001-----
0.414884000.0001-----
0.419885000.0002-----
0.424786000.0002-----
0.429787000.002-----
0.434688000.0001-----
0.439589000.0002-----
0.444590000.0001-----
0.449491000.0051-----
0.454392000.0021-----
0.459393000.0038-----
0.464294000.0025-----
0.469295000.0002-----
0.474196000.0001-----
0.479097000.0018-----
0.484098000.0002-----
0.488999000.002-----
0.4939100000.0001-----
0.4988101000.0027-----
0.5037102000.0004-----
0.5087103000.002-----
0.5136104000.001-----
0.5185105000.0047-----
0.5235106000.0001-----
0.5284107000.0008-----
0.5334108000.0001-----
0.5383109000.0002-----
0.5432110000.0003-----
0.5482111000.0066-----
0.5531112000.0005-----
0.5581113000.0004-----
0.5630114000.0003-----
0.5679115000.002-----
0.5729116000.0002-----
0.5778117000.0021-----
0.5827118000.0002-----
0.5877119000.0047-----
0.5926120000.0001-----
0.5976121000.0001-----
0.6025122000.0041-----
0.6074123000.0001-----
0.6124124000.0036-----
0.6173125000.002-----
0.6223126000.0003-----
0.6272127000.0001-----
0.6321128000.0001-----
0.6371129000.0036-----
0.6420130000.0023-----
0.6469131000.0002-----
0.6519132000.0001-----
0.6568133000.0002-----
0.6618134000.0002-----
0.6667135000.0034-----
0.6716136000.0004-----
0.6766137000.0001-----
0.6815138000.0003-----
0.6865139000.0019-----
0.6914140000.0002-----
0.6963141000.0037-----
0.7013142000.0014-----
0.7062143000.0002-----
0.7111144000.0044-----
0.7161145000.0002-----
0.7210146000.0036-----
0.7260147000.0014-----
0.7309148000.0019-----
0.7358149000.0018-----
0.7408150000.00010.99020.97670.02330.97710.0229
0.7457151000.0023-----
0.7507152000.0018-----
0.7556153000.0002-----
0.7605154000.0004-----
0.7655155000.0036-----
0.7704156000.0002-----
0.7753157000.0001-----
0.7803158000.0002-----
0.7852159000.0033-----
0.7902160000.0019-----
0.7951161000.0025-----
0.8000162000.0012-----
0.8050163000.0038-----
0.8099164000.0002-----
0.8149165000.0002-----
0.8198166000.0021-----
0.8247167000.0021-----
0.8297168000.0002-----
0.8346169000.0001-----
0.8395170000.0019-----
0.8445171000.0037-----
0.8494172000.0036-----
0.8544173000.0001-----
0.8593174000.0065-----
0.8642175000.0002-----
0.8692176000.0002-----
0.8741177000.0002-----
0.8791178000.005-----
0.8840179000.0001-----
0.8889180000.0051-----
0.8939181000.0002-----
0.8988182000.0001-----
0.9037183000.0002-----
0.9087184000.0002-----
0.9136185000.0001-----
0.9186186000.0023-----
0.9235187000.0001-----
0.9284188000.0002-----
0.9334189000.0022-----
0.9383190000.0019-----
0.9433191000.0002-----
0.9482192000.0002-----
0.9531193000.0003-----
0.9581194000.0001-----
0.9630195000.0019-----
0.9679196000.0023-----
0.9729197000.0042-----
0.9778198000.0019-----
0.9828199000.0002-----
0.9877200000.0003-----
0.9926201000.0001-----
0.9976202000.002-----
  • —The bold row denotes the saved checkpoint. </details>

Framework Versions

  • —Python: 3.14.2
  • —Sentence Transformers: 5.1.2
  • —Transformers: 4.57.3
  • —PyTorch: 2.9.1+cu128
  • —Accelerate: 1.12.0
  • —Datasets: 4.4.1
  • —Tokenizers: 0.22.1

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{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}
}

<!--

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. -->