SentenceTransformer based on pankajrajdeo/UMLS-Pubmed-ST-TCE-Epoch-1

This is a sentence-transformers model finetuned from pankajrajdeo/UMLS-Pubmed-ST-TCE-Epoch-1. 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: pankajrajdeo/UMLS-Pubmed-ST-TCE-Epoch-1
  • Maximum Sequence Length: 1024 tokens
  • Output Dimensionality: 384 dimensions
  • Similarity Function: Cosine Similarity

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 1024, 'do_lower_case': False}) with Transformer model: BertModel 
  (1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
)

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("pankajrajdeo/UMLS-Pubmed-ST-TCE-Epoch-1-QA_10K")
# Run inference
sentences = [
    'Primary osteosarcoma of the lung. Report of two cases and review of the literature. Two cases of primary osteosarcoma of the lung are presented. In one case, the radiologic, clinical, and cytologic findings led to a preoperative diagnosis of undifferentiated carcinoma of the lung. In the second case, a lung nodule was discovered during postchemotherapy follow-up in a patient with lymphoma. Fine needle aspiration in the second case showed lymphoma, and further chemotherapy was instituted; however, persistent growth of the nodule prompted a resection. Microscopic examination of the resected tumors in both cases revealed histologic features of high-grade osteosarcoma. Flow cytometric analyses of the primary tumors showed abnormal hyperdiploid deoxyribonucleic acid populations in accordance with those seen in high-grade malignant neoplasms. Immunohistochemical studies supported a mesenchymal origin for these tumors. These tumors shared clinical features with other reported cases of primary osteosarcoma of the lung such as large size at diagnosis, occurrence in older individuals, and aggressive behavior.',
    'What are the implications of rare or unusual tumor types on our understanding of cancer biology and treatment strategies?',
    'What are the underlying psychological mechanisms by which self-blame and negative cognitions about oneself or others/world influence suicidal ideation in veterans with PTSD?',
]
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: 8,994 training samples
  • Columns: anchor and positive
  • Approximate statistics based on the first 1000 samples:
    anchor positive
    type string string
    details
    • min: 19 tokens
    • mean: 268.28 tokens
    • max: 808 tokens
    • min: 14 tokens
    • mean: 27.58 tokens
    • max: 51 tokens
  • Samples:
    anchor positive
    Biallelic variants in DNA2 cause microcephalic primordial dwarfism. Microcephalic primordial dwarfism and c.74+4A>C) found in these individuals substantially impair DNA2 transcript splicing. Additionally, we identify a missense variant, affecting a residue of the ATP-dependent helicase domain that is highly conserved between humans and yeast, with the resulting substitution (p.Thr655Ala) predicted to directly impact ATP/ADP (adenosine diphosphate) binding by DNA2. Our findings support the pathogenicity of these variants as biallelic hypomorphic mutations, establishing DNA2 as an MPD disease gene. How do genetic variations in genes involved in DNA replication and repair contribute to human developmental disorders?
    Psychological Distress as a Primer for Sexual Risk Taking Among Emerging Adults. Emerging adults experience increased morbidity as a result of psychological distress and risky sexual behavior. This study examines how sexual behaviors (for example, condom use inconsistency and past year STI history) differ among emerging adults with low, moderate, and high psychological distress. Participants are 251,254 emerging adults attending colleges and universities in the United States who participated in the National College Health Assessment (NCHA). Findings suggest a dose-response relationship between psychological distress, condom use inconsistency, and past STI history, such that an association between greater psychological distress and condom use inconsistency and/or past year history of sexually transmitted infections (STIs). How do mental health factors influence the likelihood of engaging in high-risk behaviors among young adults?
    Long-Term Safety of Teriflunomide in Multiple Sclerosis Patients: Results of Prospective Comparative Studies in Three European Countries. BACKGROUND AND OBJECTIVES: Teriflunomide is a disease-modifying therapy (DMT) for multiple sclerosis (MS). This post authorisation safety study assessed risks of adverse events of special interest (AESI) associated with teriflunomide use. METHODS: Secondary use of individual data from the Danish MS Registry (DMSR), the French National Health Data System (SNDS), the Belgian national database of health care claims (AIM-IMA) and the Belgian Treatments in MS Registry (Beltrims). We included patients treated with a DMT at the date of teriflunomide reimbursement or initiating another DMT. Adjusted hazard rates (aHR) and 95% confidence intervals were derived from Cox models with time-dependent exposure comparing teriflunomide treatment with another DMT. RESULTS: Of 81 620 patients (72% women) included in the cohort, 22 324 (27%) were treated with teriflunom... What are the potential mechanisms underlying the observed differences in risk profiles between teriflunomide and other disease-modifying therapies, particularly with regards to opportunistic infections and renal failure?
  • Loss: MultipleNegativesRankingLoss with these parameters:
    {
        "scale": 20.0,
        "similarity_fct": "cos_sim"
    }
    

Evaluation Dataset

Unnamed Dataset

  • Size: 1,000 evaluation samples
  • Columns: anchor and positive
  • Approximate statistics based on the first 1000 samples:
    anchor positive
    type string string
    details
    • min: 20 tokens
    • mean: 272.12 tokens
    • max: 935 tokens
    • min: 14 tokens
    • mean: 27.77 tokens
    • max: 56 tokens
  • Samples:
    anchor positive
    Posttraumatic Cognitions and Suicidal Ideation among Veterans receiving PTSD Treatment. With approximately 20 veteran suicide deaths per day, suicidal ideation (SI) among veterans is an important concern. Posttraumatic stress disorder (PTSD) is associated with SI among veterans, yet mechanisms of this relationship remain unclear. Negative posttraumatic cognitions contribute to the development and maintenance of PTSD, yet no studies have prospectively examined the relationship between posttraumatic cognitions and SI. Veterans (N = 177; 66% Male) participating in a 3-week intensive outpatient program for PTSD completed assessments of PTSD severity, depressive symptoms, SI, and posttraumatic cognitions. Negative posttraumatic cognitions about the self significantly predicted SI at posttreatment, controlling for pretreatment levels of SI, depression, and PTSD symptom severity. Self-blame and negative posttraumatic cognitions about others/world did not predict SI prospectively. Negative pos... What are the underlying psychological mechanisms by which self-blame and negative cognitions about oneself or others/world influence suicidal ideation in veterans with PTSD?
    Bilirubin increases insulin sensitivity in leptin-receptor deficient and diet-induced obese mice through suppression of ER stress and chronic inflammation. Obesity-induced endoplasmic reticulum (ER) stress causes chronic inflammation in adipose tissue and steatosis in the liver, and eventually leads to insulin resistance and type 2 diabetes (T2D). The goal of this study was to understand the mechanisms by which administration of bilirubin, a powerful antioxidant, reduces hyperglycemia and ameliorates obesity in leptin-receptor-deficient (db/db) and diet-induced obese (DIO) mouse models. db/db or DIO mice were injected with bilirubin or vehicle ip. Blood glucose and body weight were measured. Activation of insulin-signaling pathways, expression of inflammatory cytokines, and ER stress markers were measured in skeletal muscle, adipose tissue, and liver of mice. Bilirubin administration significantly reduced hyperglycemia and increased insulin sensitivity in db/db mice. Bilirubin treatmen... What cellular pathways and stress responses contribute to the development of insulin resistance in obesity, and how can they be targeted therapeutically?
    Repair strength of dental amalgams. This study tested the hypothesis that newly triturated amalgam condensed vertically on old amalgam was essential for establishing a bond between the new and old amalgams. Twelve rectangular bars were prepared with Dispersalloy and Tytin to establish their baseline flexure strength values. An additional 12 specimens were made and separated into 24 equal halves. All fracture surfaces were abraded with a flat end fissure bur. Twelve surfaces were paired with the original amalgam, and the remaining 12 surfaces were repaired with a different amalgam. At first, freshly triturated amalgam was condensed vertically on the floor of the specimen mold (Group A). The majority of specimens repaired with Group A failed to establish bond at the repair interface. All repair surfaces were abraded again and prepared by a second method. A metal spacer was used to create a four-wall cavity to facilitate vertical condensation directly on the repair surface (Group B). The ... How do variations in surface preparation and condensation techniques affect the bonding and mechanical integrity of amalgam repairs?
  • Loss: MultipleNegativesRankingLoss with these parameters:
    {
        "scale": 20.0,
        "similarity_fct": "cos_sim"
    }
    

Training Hyperparameters

Non-Default Hyperparameters

  • eval_strategy: epoch
  • per_device_train_batch_size: 16
  • per_device_eval_batch_size: 16
  • learning_rate: 2e-05
  • num_train_epochs: 5
  • fp16: True
  • load_best_model_at_end: True
  • resume_from_checkpoint: True

All Hyperparameters

Click to expand
  • overwrite_output_dir: False
  • do_predict: False
  • eval_strategy: epoch
  • prediction_loss_only: True
  • per_device_train_batch_size: 16
  • 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
  • torch_empty_cache_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: linear
  • lr_scheduler_kwargs: {}
  • warmup_ratio: 0.0
  • 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: False
  • fp16: True
  • 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: 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
  • 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: True
  • 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
  • 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: 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
  • eval_on_start: False
  • use_liger_kernel: False
  • eval_use_gather_object: False
  • average_tokens_across_devices: False
  • prompts: None
  • batch_sampler: batch_sampler
  • multi_dataset_batch_sampler: proportional

Training Logs

Epoch Step Training Loss Validation Loss
0.1776 100 0.0247 -
0.3552 200 0.0101 -
0.5329 300 0.0158 -
0.7105 400 0.0172 -
0.8881 500 0.0133 -
1.0 563 - 0.0116
1.0657 600 0.0143 -
1.2433 700 0.0071 -
1.4210 800 0.0063 -
1.5986 900 0.0077 -
1.7762 1000 0.0089 -
1.9538 1100 0.0098 -
2.0 1126 - 0.0087
2.1314 1200 0.0152 -
2.3091 1300 0.0123 -
2.4867 1400 0.01 -
2.6643 1500 0.0075 -
2.8419 1600 0.0091 -
3.0 1689 - 0.0072

Framework Versions

  • Python: 3.10.12
  • Sentence Transformers: 3.3.1
  • Transformers: 4.46.2
  • PyTorch: 2.5.1+cu121
  • Accelerate: 1.1.1
  • Datasets: 3.1.0
  • Tokenizers: 0.20.3

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",
}

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
91
Safetensors
Model size
41.5M 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 pankajrajdeo/UMLS-Pubmed-ST-TCE-Epoch-1-QA_10K

Finetuned
(7)
this model
Finetunes
1 model