Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

Stevenf232
/
SapBERT_ContrastiveLoss_BC5CDR_Context

Sentence Similarity
sentence-transformers
Safetensors
bert
feature-extraction
dense
Generated from Trainer
dataset_size:5424
loss:ContrastiveLoss
text-embeddings-inference
Model card Files Files and versions
xet
Community

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
SapBERT_ContrastiveLoss_BC5CDR_Context
439 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
Stevenf232's picture
Stevenf232
Add new SentenceTransformer model
1072520 verified 2 months ago
  • 1_Pooling
    Add new SentenceTransformer model 2 months ago
  • .gitattributes
    1.52 kB
    initial commit 2 months ago
  • README.md
    20.1 kB
    Add new SentenceTransformer model 2 months ago
  • config.json
    704 Bytes
    Add new SentenceTransformer model 2 months ago
  • config_sentence_transformers.json
    283 Bytes
    Add new SentenceTransformer model 2 months ago
  • model.safetensors
    438 MB
    xet
    Add new SentenceTransformer model 2 months ago
  • modules.json
    229 Bytes
    Add new SentenceTransformer model 2 months ago
  • sentence_bert_config.json
    57 Bytes
    Add new SentenceTransformer model 2 months ago
  • tokenizer.json
    706 kB
    Add new SentenceTransformer model 2 months ago
  • tokenizer_config.json
    382 Bytes
    Add new SentenceTransformer model 2 months ago