Sentence Similarity
sentence-transformers
Safetensors
distilbert
feature-extraction
Generated from Trainer
dataset_size:622302
loss:MultipleNegativesRankingLoss
Eval Results (legacy)
text-embeddings-inference
Instructions to use alpha-brain/stsb-distilbert-base-mnrl with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use alpha-brain/stsb-distilbert-base-mnrl with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("alpha-brain/stsb-distilbert-base-mnrl") sentences = [ "Does fTO Genotype interact with Improvement in Aerobic Fitness on Body Weight Loss During Lifestyle Intervention?", "The study population count 46 550 male workers, 1670 (3.6%) of whom incurred at least one work-related injury requiring admission to hospital within a period of 5 years following hearing tests conducted between 1987 and 2005. The noise exposure and hearing loss-related data were gathered during occupational noise-induced hearing loss (NIHL) screening. The hospital data were used to identify all members of the study population who were admitted, and the reason for admission. Finally, access to the death-related data made it possible to identify participants who died during the course of the study. Cox proportional hazards model taking into account hearing status, noise levels, age and cumulative duration of noise exposure at the time of the hearing test established the risk of work-related injuries leading to admission to hospital.", "Carriers of a hereditary mutation in BRCA are at high risk for breast and ovarian cancer. The first person from a family known to carry the mutation, the index person, has to share genetic information with relatives. This study is aimed at determining the number of relatives tested for a BRCA mutation, and the exploration of facilitating and debilitating factors in the transmission of genetic information from index patient to relatives.", "Not every participant responds with a comparable body weight loss to lifestyle intervention, despite the same compliance. Genetic factors may explain parts of this difference. Variation in fat mass and obesity-associated gene (FTO) is the strongest common genetic determinant of body weight. The aim of the present study was to evaluate the impact of FTO genotype differences in the link between improvement of fitness and reduction of body weight during a lifestyle intervention." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
File size: 565 Bytes
9481afa | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | {
"_name_or_path": "sentence-transformers/stsb-distilbert-base",
"activation": "gelu",
"architectures": [
"DistilBertModel"
],
"attention_dropout": 0.1,
"dim": 768,
"dropout": 0.1,
"hidden_dim": 3072,
"initializer_range": 0.02,
"max_position_embeddings": 512,
"model_type": "distilbert",
"n_heads": 12,
"n_layers": 6,
"pad_token_id": 0,
"qa_dropout": 0.1,
"seq_classif_dropout": 0.2,
"sinusoidal_pos_embds": false,
"tie_weights_": true,
"torch_dtype": "float32",
"transformers_version": "4.44.2",
"vocab_size": 30522
}
|