Sentence Similarity
sentence-transformers
Safetensors
feature-extraction
Generated from Trainer
dataset_size:499184
loss:MultipleNegativesRankingLoss
custom_code
Instructions to use YeonwooSung/cde-small-v2-biencoder-msmarco with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use YeonwooSung/cde-small-v2-biencoder-msmarco with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("YeonwooSung/cde-small-v2-biencoder-msmarco", trust_remote_code=True) sentences = [ "Heterozygous Advantage Definition", "A heterozygote advantage (heterozygous advantage) describes the case in which the heterozygote genotype has a higher relative fitness than either the homozygote dominant or homozygote recessive genotype.", "Science Main Index. Animals with an internal skeleton made of bone are called vertebrates. Vertebrates include fish, amphibians, reptiles, birds, mammals, primates, rodents and marsupials. Although vertebrates represent only a very small percentage of all animals, their size and mobility often allow them to dominate their environment.", "By Regina Bailey. Definition: Heterozygous refers to having two different alleles for a single trait. Related Terms: Allele, Genes, Homozygous. Examples: The gene for seed shape in pea plants exists in two forms, one form or allele for round seed shape (R) and the other for wrinkled seed shape (r). heterozygous plant would contain the following alleles for seed shape: (Rr). Organisms have two alleles for each trait. When the alleles of a pair are heterozygous, one is dominant and the other is recessive. Using the previous example, round seed shape (R) is dominant and wrinkled seed shape (r) is recessive." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Welcome to the community
The community tab is the place to discuss and collaborate with the HF community!