FingUv1 / README.md
FINGU-AI's picture
Update README.md
92f764f verified
|
raw
history blame
2.05 kB
metadata
base_model: microsoft/mpnet-base
language:
  - en
library_name: sentence-transformers
pipeline_tag: sentence-similarity
tags:
  - sentence-transformers
  - sentence-similarity
  - feature-extraction
  - generated_from_trainer
  - dataset_size:5130135
  - loss:MultipleNegativesSymmetricRankingLoss
  - loss:CoSENTLoss
  - dataset_size:8233
widget:
  - source_sentence: This is a sample source sentence.
    target_sentence: This is a sample target sentence.
license: apache-2.0

SentenceTransformer based on microsoft/mpnet-base

Model Sources

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("sentence_transformers_model_id")
# Run inference
sentences = [
    'This form of necrosis, also termed necroptosis, requires the activity of receptor-interacting protein kinase 1 (RIP1) and its related kinase, RIP3 ',
    'TNF-mediated programmed necrosis typically involves the receptor-interacting serine-threonine kinases 1 and 3 (RIP1 and RIP3), as evidenced in human, mouse, and zebrafish cell lines, as well as in a murine sepsis model',
    'This large-scale study showed that IDH1/IDH2 mutations were mutually exclusive with inactivating TET2 mutations, suggesting that the two types of mutations had similar effects and were thus functionally redundant.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]

# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]