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
File size: 382 Bytes
1072520 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | {
"backend": "tokenizers",
"cls_token": "[CLS]",
"do_lower_case": false,
"full_tokenizer_file": null,
"is_local": false,
"mask_token": "[MASK]",
"model_max_length": 1000000000000000019884624838656,
"pad_token": "[PAD]",
"sep_token": "[SEP]",
"strip_accents": null,
"tokenize_chinese_chars": true,
"tokenizer_class": "BertTokenizer",
"unk_token": "[UNK]"
}
|