Sentence Similarity
sentence-transformers
Safetensors
bert
feature-extraction
Generated from Trainer
dataset_size:117937
loss:MultipleNegativesRankingLoss
text-embeddings-inference
Instructions to use Gswrtz/finetuned-neg-rag-embedder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Gswrtz/finetuned-neg-rag-embedder with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Gswrtz/finetuned-neg-rag-embedder") sentences = [ "In a certain population, there are 6 times as many people aged twenty-one or under as there are people over twenty-one. The ratio of those twenty-one or under to the total population is A. 1 to 2. B. 1 to 3. C. 2 to 3. D. 6 to 7.", "Population size is the number of individuals in a population.", "Reactivity is the ability of matter to combine chemically with other substances. For example, iron is highly reactive with oxygen. When it combines with oxygen, it forms the reddish powder called rust (see Figure below ). Rust is not iron but an entirely different substance that consists of both iron and oxygen.", "The age-sex structure of a population is the number of individuals of each sex and age in the population. Age-sex structure influences population growth. It is represented by a population pyramid. The number of survivors at each age is plotted on a survivorship curve." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Ctrl+K