Sentence Similarity
sentence-transformers
Safetensors
bert
feature-extraction
dense
Generated from Trainer
dataset_size:5424
loss:ContrastiveLoss
text-embeddings-inference
Instructions to use Stevenf232/SapBERT_ContrastiveLoss_BC5CDR_Context with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Stevenf232/SapBERT_ContrastiveLoss_BC5CDR_Context with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Stevenf232/SapBERT_ContrastiveLoss_BC5CDR_Context") sentences = [ "liver injury [SEP] d up all transplant-free survivors of paracetamol-induced acute liver injury, hospitalized in a Danish national referral centre during 1984-", "Drug-Induced Liver Injury [SEP] A spectrum of clinical liver diseases ranging from mild biochemical abnormalities to ACUTE LIVER FAILURE, caused by drugs, drug ", "Venous Thrombosis [SEP] The formation or presence of a blood clot (THROMBUS) within a vein.\n ", "Isoflurophate [SEP] A di-isopropyl-fluorophosphate which is an irreversible cholinesterase inhibitor used to investigate the NERVOUS SYSTEM.\n " ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
| { | |
| "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 | |
| } |