Sentence Similarity
sentence-transformers
ONNX
Safetensors
modernbert
feature-extraction
dense
Generated from Trainer
dataset_size:492
loss:MultipleNegativesRankingLoss
text-embeddings-inference
Instructions to use llm-semantic-router/mmbert-embed-medical with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use llm-semantic-router/mmbert-embed-medical with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("llm-semantic-router/mmbert-embed-medical") sentences = [ "A 60-year-old man is rushed to the emergency room after he was found unconscious in bed that afternoon. The patient’s wife says he has been confused and irritable for the past several days. She says he has a history of chronic daily alcohol abuse and has been hospitalized multiple times with similar symptoms His temperature is 37°C (98.6°F), the blood pressure is 110/80 mm Hg, the pulse is 90/min, and the respiratory rate is 14/min. On physical examination, the patient is minimally responsive to painful stimuli. His abdomen is distended with positive shifting dullness. Laboratory results are as follows:\nComplete blood count\nHematocrit 35%\nPlatelets 100,000/mm3\nWhite blood cells 5000/mm3\nLiver function studies\nSerum Albumin 2 g/dL\nAlkaline phosphatase (ALP) 200 IU/L\nAspartate aminotransferase (AST) 106 IU/L\nAlanine aminotransferase (ALT) 56 IU/L\nThe patient is admitted to the hospital and started on the appropriate treatment to improve his mental status. Which of the following best describes the mechanism of action of the drug that is most likely used to treat this patient’s symptoms?", "A 60-year-old man is rushed to the emergency room after he was found unconscious in bed that afternoon. The patient’s wife says he has been confused and irritable for the past several days. She says he has a history of chronic daily alcohol abuse and has been hospitalized multiple times with similar symptoms His temperature is 37°C (98.6°F), the blood pressure is 110/80 mm Hg, the pulse is 90/min, and the respiratory rate is 14/min. On physical examination, the patient is minimally responsive to painful stimuli. His abdomen is distended with positive shifting dullness. Laboratory results are as follows:\nComplete blood count\nHematocrit 35%\nPlatelets 100,000/mm3\nWhite blood cells 5000/mm3\nLiver function studies\nSerum Albumin 2 g/dL\nAlkaline phosphatase (ALP) 200 IU/L\nAspartate aminotransferase (AST) 106 IU/L\nAlanine aminotransferase (ALT) 56 IU/L\nThe patient is admitted to the hospital and started on the appropriate treatment to improve his mental status. Which of the following best describes the mechanism of action of the drug that is most likely used to treat this patient’s symptoms?\n\nAnswer: Decreases pH in the gastrointestinal lumen", "A 65-year-old man is brought to the emergency department after loss of consciousness. He is accompanied by his wife. He is started on intravenous fluids, and his vital signs are assessed. His blood pressure is 85/50 mm Hg, pulse 50/min, and respiratory rate 10/min. He has been admitted in the past for a heart condition. His wife is unable to recall the name of the condition, but she does know that the doctor recommended some medications at that time in case his condition worsened. She has brought with her the test reports from previous medical visits over the last few months. She says that she has noticed that he often has difficulty breathing and requires three pillows to sleep at night to avoid being short of breath. He can only walk for a few kilometers before he has to stop and rest. His wife also reports that he has had occasional severe coughing spells with pinkish sputum production. She also mentions that he has been drinking alcohol for the past 30 years. Which of the following medications will improve the prognosis of this patient?\n\nAnswer: Enalapril", "A 71-year-old African American man is brought to the emergency department with a worsening productive cough and dyspnea for 2 days. He has had generalized bone pain for 2 months. He was admitted for pyelonephritis last month. He also received outpatient treatment for pneumonia almost 2 months ago. Over the past 2 months, he has been taking over-the-counter ibuprofen for pain as needed. He appears anxious. The vital signs include: temperature 38.8°C (101.8°F), pulse 95/min, respiratory rate 20/min, and blood pressure 155/90 mm Hg. The conjunctivae are pale. Crackles are heard in the right lower lobe. The cardiac examination shows no abnormalities. The laboratory studies show the following:\nHemoglobin 9 g/dL\nMean corpuscular volume 95 μm3\nLeukocyte count 13,500/mm3\nSegmented neutrophils 75%\nLymphocytes 25%\nPlatelet count 240,000/mm3\nESR 85 mm/hr\nSerum\nNa+ 135 mEq/L\nK+ 4.2 mEq/L\nCl− 113 mEq/L\nHCO3− 20 mEq/L\nCa+ 12.4 mg/dL\nAlbumin 4 g/dL\nUrea nitrogen 38 mg/dL\nCreatinine 2.2 mg/dL\nA chest X-ray shows a right lower lobe opacity and blurring of the ipsilateral diaphragmatic dome. Skull and pelvic X-rays are performed (see image). Which of the following is the most likely underlying cause of this patient’s recent infections?\n\nAnswer: Hypogammaglobulinemia" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files- README.md +246 -155
- config_sentence_transformers.json +1 -1
- model.safetensors +1 -1
- tokenizer_config.json +1 -1
README.md
CHANGED
|
@@ -5,127 +5,239 @@ tags:
|
|
| 5 |
- feature-extraction
|
| 6 |
- dense
|
| 7 |
- generated_from_trainer
|
| 8 |
-
- dataset_size:
|
| 9 |
- loss:TripletLoss
|
| 10 |
-
- dataset_size:21344
|
| 11 |
base_model: llm-semantic-router/mmbert-embed-32k-2d-matryoshka
|
| 12 |
widget:
|
| 13 |
-
- source_sentence:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
sentences:
|
| 15 |
-
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
sentences:
|
| 42 |
-
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
sentences:
|
| 72 |
-
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
and
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
sentences:
|
| 90 |
-
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
sentences:
|
| 106 |
-
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
pipeline_tag: sentence-similarity
|
| 130 |
library_name: sentence-transformers
|
| 131 |
---
|
|
@@ -138,7 +250,7 @@ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [l
|
|
| 138 |
|
| 139 |
### Model Description
|
| 140 |
- **Model Type:** Sentence Transformer
|
| 141 |
-
- **Base model:** [llm-semantic-router/mmbert-embed-32k-2d-matryoshka](https://huggingface.co/llm-semantic-router/mmbert-embed-32k-2d-matryoshka) <!-- at revision
|
| 142 |
- **Maximum Sequence Length:** 32768 tokens
|
| 143 |
- **Output Dimensionality:** 768 dimensions
|
| 144 |
- **Similarity Function:** Cosine Similarity
|
|
@@ -179,9 +291,9 @@ from sentence_transformers import SentenceTransformer
|
|
| 179 |
model = SentenceTransformer("sentence_transformers_model_id")
|
| 180 |
# Run inference
|
| 181 |
sentences = [
|
| 182 |
-
'
|
| 183 |
-
'
|
| 184 |
-
|
| 185 |
]
|
| 186 |
embeddings = model.encode(sentences)
|
| 187 |
print(embeddings.shape)
|
|
@@ -190,9 +302,9 @@ print(embeddings.shape)
|
|
| 190 |
# Get the similarity scores for the embeddings
|
| 191 |
similarities = model.similarity(embeddings, embeddings)
|
| 192 |
print(similarities)
|
| 193 |
-
# tensor([[1.0000, 0.
|
| 194 |
-
# [0.
|
| 195 |
-
# [0.
|
| 196 |
```
|
| 197 |
|
| 198 |
<!--
|
|
@@ -237,19 +349,19 @@ You can finetune this model on your own dataset.
|
|
| 237 |
|
| 238 |
#### Unnamed Dataset
|
| 239 |
|
| 240 |
-
* Size:
|
| 241 |
* Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>sentence_2</code>
|
| 242 |
-
* Approximate statistics based on the first
|
| 243 |
-
| | sentence_0
|
| 244 |
-
|:--------|:----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
|
| 245 |
-
| type | string
|
| 246 |
-
| details | <ul><li>min:
|
| 247 |
* Samples:
|
| 248 |
-
| sentence_0
|
| 249 |
-
|:-------------------------------------------------------------
|
| 250 |
-
| <code>
|
| 251 |
-
| <code>
|
| 252 |
-
| <code>
|
| 253 |
* Loss: [<code>TripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#tripletloss) with these parameters:
|
| 254 |
```json
|
| 255 |
{
|
|
@@ -320,7 +432,7 @@ You can finetune this model on your own dataset.
|
|
| 320 |
- `parallelism_config`: None
|
| 321 |
- `deepspeed`: None
|
| 322 |
- `label_smoothing_factor`: 0.0
|
| 323 |
-
- `optim`:
|
| 324 |
- `optim_args`: None
|
| 325 |
- `group_by_length`: False
|
| 326 |
- `length_column_name`: length
|
|
@@ -367,32 +479,11 @@ You can finetune this model on your own dataset.
|
|
| 367 |
|
| 368 |
</details>
|
| 369 |
|
| 370 |
-
### Training Logs
|
| 371 |
-
| Epoch | Step | Training Loss |
|
| 372 |
-
|:------:|:----:|:-------------:|
|
| 373 |
-
| 0.3085 | 500 | 0.0271 |
|
| 374 |
-
| 0.6169 | 1000 | 0.0134 |
|
| 375 |
-
| 0.9254 | 1500 | 0.0111 |
|
| 376 |
-
| 1.2338 | 2000 | 0.0059 |
|
| 377 |
-
| 1.5423 | 2500 | 0.0056 |
|
| 378 |
-
| 1.8507 | 3000 | 0.0046 |
|
| 379 |
-
| 0.1874 | 500 | 0.0184 |
|
| 380 |
-
| 0.3748 | 1000 | 0.0161 |
|
| 381 |
-
| 0.5622 | 1500 | 0.0143 |
|
| 382 |
-
| 0.7496 | 2000 | 0.0127 |
|
| 383 |
-
| 0.9370 | 2500 | 0.0125 |
|
| 384 |
-
| 1.1244 | 3000 | 0.0090 |
|
| 385 |
-
| 1.3118 | 3500 | 0.0064 |
|
| 386 |
-
| 1.4993 | 4000 | 0.0059 |
|
| 387 |
-
| 1.6867 | 4500 | 0.0062 |
|
| 388 |
-
| 1.8741 | 5000 | 0.0054 |
|
| 389 |
-
|
| 390 |
-
|
| 391 |
### Framework Versions
|
| 392 |
-
- Python: 3.12.
|
| 393 |
- Sentence Transformers: 5.2.2
|
| 394 |
- Transformers: 5.0.0
|
| 395 |
-
- PyTorch: 2.
|
| 396 |
- Accelerate: 1.12.0
|
| 397 |
- Datasets: 4.5.0
|
| 398 |
- Tokenizers: 0.22.2
|
|
|
|
| 5 |
- feature-extraction
|
| 6 |
- dense
|
| 7 |
- generated_from_trainer
|
| 8 |
+
- dataset_size:492
|
| 9 |
- loss:TripletLoss
|
|
|
|
| 10 |
base_model: llm-semantic-router/mmbert-embed-32k-2d-matryoshka
|
| 11 |
widget:
|
| 12 |
+
- source_sentence: A 7-year-old boy with a history of fetal alcohol syndrome is brought
|
| 13 |
+
by his mother to the emergency room for malaise and lethargy. His mother reports
|
| 14 |
+
that the family was on vacation in a cabin in the mountains for the past 10 days.
|
| 15 |
+
Five days ago, the child developed a fever with a max temperature of 102.6°F (39.2°F).
|
| 16 |
+
She also reports that he was given multiple medications to try to bring down his
|
| 17 |
+
fever. Although his fever resolved two days ago, the child has become increasingly
|
| 18 |
+
lethargic. He started having non-bilious, non-bloody emesis one day prior to presentation.
|
| 19 |
+
His current temperature is 100°F (37.8°C), blood pressure is 95/55 mmHg, pulse
|
| 20 |
+
is 110/min, and respirations are 22/min. On exam, the child is lethargic and minimally
|
| 21 |
+
reactive. Mild hepatomegaly is noted. A biopsy of this patient’s liver would likely
|
| 22 |
+
reveal which of the following?
|
| 23 |
sentences:
|
| 24 |
+
- 'A 7-year-old boy with a history of fetal alcohol syndrome is brought by his mother
|
| 25 |
+
to the emergency room for malaise and lethargy. His mother reports that the family
|
| 26 |
+
was on vacation in a cabin in the mountains for the past 10 days. Five days ago,
|
| 27 |
+
the child developed a fever with a max temperature of 102.6°F (39.2°F). She also
|
| 28 |
+
reports that he was given multiple medications to try to bring down his fever.
|
| 29 |
+
Although his fever resolved two days ago, the child has become increasingly lethargic.
|
| 30 |
+
He started having non-bilious, non-bloody emesis one day prior to presentation.
|
| 31 |
+
His current temperature is 100°F (37.8°C), blood pressure is 95/55 mmHg, pulse
|
| 32 |
+
is 110/min, and respirations are 22/min. On exam, the child is lethargic and minimally
|
| 33 |
+
reactive. Mild hepatomegaly is noted. A biopsy of this patient’s liver would likely
|
| 34 |
+
reveal which of the following?
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
Answer: Microvesicular steatosis'
|
| 38 |
+
- 'A 2-day-old newborn boy is brought to the emergency department because of apnea,
|
| 39 |
+
cyanosis, and seizures. He is severely hypoglycemic and does not improve with
|
| 40 |
+
glucagon administration. His blood pressure is 100/62 mm Hg and heart rate is
|
| 41 |
+
75/min. Blood tests show high lactate levels. Physical examination is notable
|
| 42 |
+
for hepatomegaly. Which of the following enzymes is most likely to be deficient
|
| 43 |
+
in this baby?
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
Answer: Glucose-6-phosphatase'
|
| 47 |
+
- 'A 49-year-old woman comes to the office complaining of 2 weeks of urinary incontinence.
|
| 48 |
+
She says she first noticed some light, urinary dribbling that would increase with
|
| 49 |
+
sneezing or coughing. This dribble soon worsened, soaking through a pad every
|
| 50 |
+
3 hours. She denies any fevers, chills, abdominal pain, hematuria, dysuria, abnormal
|
| 51 |
+
vaginal discharge, or increased urinary frequency. The patient had a bilateral
|
| 52 |
+
tubal ligation 3 weeks ago. Her last menstrual period was 2 weeks ago. Her menses
|
| 53 |
+
are regular and last 5 days. She has had 3 pregnancies that each resulted in uncomplicated,
|
| 54 |
+
term vaginal deliveries. Her last pregnancy was 2 years ago. The patient has hypothyroidism
|
| 55 |
+
and takes daily levothyroxine. She denies tobacco, alcohol, or illicit drug use.
|
| 56 |
+
She has no history of sexually transmitted diseases. She is sexually active with
|
| 57 |
+
her husband of 25 years. Her BMI is 26 kg/m^2. On physical examination, the abdomen
|
| 58 |
+
is soft, nondistended, and nontender without palpable masses or hepatosplenomegaly.
|
| 59 |
+
Rectal tone is normal. The uterus is anteverted, mobile, and nontender. There
|
| 60 |
+
are no adnexal masses. Urine is seen pooling in the vaginal vault. Urinalysis
|
| 61 |
+
is unremarkable. Which of the following is next best step in diagnosis?
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
Answer: Methylene blue instillation into the bladder'
|
| 65 |
+
- source_sentence: A 45-year-old Caucasian man is given nitroglycerin for the management
|
| 66 |
+
of his stable angina. Nitroglycerin given for the rapid relief of acute angina
|
| 67 |
+
would most likely be given through what route of administration?
|
| 68 |
sentences:
|
| 69 |
+
- 'A 45-year-old man comes to the clinic concerned about his recent exposure to
|
| 70 |
+
radon. He heard from his co-worker that radon exposure can cause lung cancer.
|
| 71 |
+
He brings in a study concerning the risks of radon exposure. In the study, there
|
| 72 |
+
were 300 patients exposed to radon, and 18 developed lung cancer over a 10-year
|
| 73 |
+
period. To compare, there were 500 patients without radon exposure and 11 developed
|
| 74 |
+
lung cancer over the same 10-year period. If we know that 0.05% of the population
|
| 75 |
+
has been exposed to radon, what is the attributable risk percent for developing
|
| 76 |
+
lung cancer over a 10 year period after radon exposure?
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
Answer: 63.3%'
|
| 80 |
+
- 'A 67-year-old man with stable coronary artery disease comes to the physician
|
| 81 |
+
for a follow-up examination. Aside from occasional exertional chest pain on mowing
|
| 82 |
+
the lawn or prolonged jogging, he feels well. He goes jogging for 20 minutes once
|
| 83 |
+
a week and takes a tablet of sublingual nitroglycerine prior to his run to prevent
|
| 84 |
+
anginal chest pain. The patient would like to run longer distances and asks the
|
| 85 |
+
physician whether he could increase the dose of the drug prior to running. Administration
|
| 86 |
+
of higher dosages of this drug is most likely to result in which of the following?
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
Answer: Reflex sympathetic activity'
|
| 90 |
+
- 'A 45-year-old Caucasian man is given nitroglycerin for the management of his
|
| 91 |
+
stable angina. Nitroglycerin given for the rapid relief of acute angina would
|
| 92 |
+
most likely be given through what route of administration?
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
Answer: Sublingual'
|
| 96 |
+
- source_sentence: "A 12-year-old boy is brought in by his mother for a routine checkup.\
|
| 97 |
+
\ The patient’s mother says he is frequently fatigued and looks pale. She also\
|
| 98 |
+
\ claims that he has recently become “much quieter” than normal and is no longer\
|
| 99 |
+
\ interested in playing baseball with his friends. The patient’s mother believes\
|
| 100 |
+
\ it may just be “growing pains.” The patient has no significant medical history.\
|
| 101 |
+
\ He is the 90th percentile for height and weight and has been meeting all developmental\
|
| 102 |
+
\ milestones. The patient is afebrile, and his vital signs are within normal limits.\
|
| 103 |
+
\ Physical examination reveals several small bruises on the patient’s right arm\
|
| 104 |
+
\ and on both thighs. Laboratory findings are significant for the following:\n\
|
| 105 |
+
Sodium 140 mEq/L\nPotassium 4.2 mEq/L\nChloride 101 mEq/L\nBicarbonate 27 mEq/L\n\
|
| 106 |
+
BUN 16 mg/dL\nCreatinine 1.2 mg/dL\nGlucose (fasting) 111 mg/dL\n WBC 3,400/mm3\n\
|
| 107 |
+
RBC 4.20 x 106/mm3\nHematocrit 22%\nHemoglobin 7.1 g/dL\nPlatelet count 109,000/mm3\n\
|
| 108 |
+
A peripheral blood smear reveals myeloblasts. Which of the following is the next\
|
| 109 |
+
\ best step in the management of this patient?"
|
| 110 |
sentences:
|
| 111 |
+
- 'A 62-year-old man is brought to the emergency department with a 2-day history
|
| 112 |
+
of cough productive of yellowish sputum. He has had fever, chills, and worsening
|
| 113 |
+
shortness of breath over this time. He has a 10-year history of hypertension and
|
| 114 |
+
hyperlipidemia. He does not drink alcohol or smoke cigarettes. His current medications
|
| 115 |
+
include atorvastatin, amlodipine, and metoprolol. His temperature is 38.9°C (102.0°F),
|
| 116 |
+
pulse is 105/min, respirations are 27/min, and blood pressure is 110/70 mm Hg.
|
| 117 |
+
He appears in mild distress. He has rales over the left lower lung field. The
|
| 118 |
+
remainder of the examination shows no abnormalities. Leukocyte count is 15,000/mm3
|
| 119 |
+
(87% segmented neutrophils). Arterial blood gas analysis on room air shows:
|
| 120 |
+
|
| 121 |
+
pH 7.44
|
| 122 |
+
|
| 123 |
+
pO2 68 mm Hg
|
| 124 |
+
|
| 125 |
+
pCO2 28 mm Hg
|
| 126 |
+
|
| 127 |
+
HCO3- 24 mEq/L
|
| 128 |
+
|
| 129 |
+
O2 saturation 91%
|
| 130 |
+
|
| 131 |
+
An x-ray of the chest shows a consolidation in the left lower lobe. Asking the
|
| 132 |
+
patient to lie down in the left lateral decubitus position would most likely result
|
| 133 |
+
in which of the following?"
|
| 134 |
+
|
| 135 |
+
|
| 136 |
+
Answer: Increase in A-a gradient'
|
| 137 |
+
- "A 12-year-old boy is brought in by his mother for a routine checkup. The patient’s\
|
| 138 |
+
\ mother says he is frequently fatigued and looks pale. She also claims that he\
|
| 139 |
+
\ has recently become “much quieter” than normal and is no longer interested in\
|
| 140 |
+
\ playing baseball with his friends. The patient’s mother believes it may just\
|
| 141 |
+
\ be “growing pains.” The patient has no significant medical history. He is the\
|
| 142 |
+
\ 90th percentile for height and weight and has been meeting all developmental\
|
| 143 |
+
\ milestones. The patient is afebrile, and his vital signs are within normal limits.\
|
| 144 |
+
\ Physical examination reveals several small bruises on the patient’s right arm\
|
| 145 |
+
\ and on both thighs. Laboratory findings are significant for the following:\n\
|
| 146 |
+
Sodium 140 mEq/L\nPotassium 4.2 mEq/L\nChloride 101 mEq/L\nBicarbonate 27 mEq/L\n\
|
| 147 |
+
BUN 16 mg/dL\nCreatinine 1.2 mg/dL\nGlucose (fasting) 111 mg/dL\n WBC 3,400/mm3\n\
|
| 148 |
+
RBC 4.20 x 106/mm3\nHematocrit 22%\nHemoglobin 7.1 g/dL\nPlatelet count 109,000/mm3\n\
|
| 149 |
+
A peripheral blood smear reveals myeloblasts. Which of the following is the next\
|
| 150 |
+
\ best step in the management of this patient?\n\nAnswer: Bone marrow biopsy"
|
| 151 |
+
- 'A 3-month-old boy is brought to the physician by his mother because of poor weight
|
| 152 |
+
gain. She also reports a dusky blue discoloration to his skin during feedings
|
| 153 |
+
and when crying. On examination, there is a harsh, systolic murmur heard over
|
| 154 |
+
the left upper sternal border. An x-ray of the chest is shown below. Which of
|
| 155 |
+
the following is the most likely cause of his symptoms?
|
| 156 |
+
|
| 157 |
+
|
| 158 |
+
Answer: Right ventricular outflow obstruction'
|
| 159 |
+
- source_sentence: 'A 33-year-old pregnant woman in the 28th week of gestation presents
|
| 160 |
+
to the emergency department for evaluation of bilateral edema of her legs. It
|
| 161 |
+
seems to worsen at the end of the day and has lasted for the past 3 weeks. History
|
| 162 |
+
reveals that this is her 3rd pregnancy. Vital signs include: blood pressure 120/80
|
| 163 |
+
mm Hg, heart rate 74/min, respiratory rate 18/min, and temperature 36.6°C (98.0°F).
|
| 164 |
+
Body mass index is 36 kg/m2. Physical examination reveals bilateral leg edema
|
| 165 |
+
with engorged surface veins. A photograph of the patient’s legs is shown. Which
|
| 166 |
+
of the following is the best initial management of the patient?'
|
| 167 |
sentences:
|
| 168 |
+
- 'A 32-year-old G2P0A1 woman presents at 36 weeks of gestation for the first time
|
| 169 |
+
during her pregnancy. The patient has no complaints, currently. However, her past
|
| 170 |
+
medical history reveals seizure disorder, which is under control with valproic
|
| 171 |
+
acid and lithium. She has not seen her neurologist during the past 2 years, in
|
| 172 |
+
the absence of any complaints. She also reports a previous history of elective
|
| 173 |
+
abortion. The physical examination is insignificant. Her blood pressure is 130/75
|
| 174 |
+
mm Hg and pulse is 80/min. The patient is scheduled to undergo regular laboratory
|
| 175 |
+
tests and abdominal ultrasound. Given her past medical history, which of the following
|
| 176 |
+
conditions is her fetus most likely going to develop?
|
| 177 |
+
|
| 178 |
+
|
| 179 |
+
Answer: Neural tube defects (NTDs)'
|
| 180 |
+
- 'A 33-year-old pregnant woman in the 28th week of gestation presents to the emergency
|
| 181 |
+
department for evaluation of bilateral edema of her legs. It seems to worsen at
|
| 182 |
+
the end of the day and has lasted for the past 3 weeks. History reveals that this
|
| 183 |
+
is her 3rd pregnancy. Vital signs include: blood pressure 120/80 mm Hg, heart
|
| 184 |
+
rate 74/min, respiratory rate 18/min, and temperature 36.6°C (98.0°F). Body mass
|
| 185 |
+
index is 36 kg/m2. Physical examination reveals bilateral leg edema with engorged
|
| 186 |
+
surface veins. A photograph of the patient’s legs is shown. Which of the following
|
| 187 |
+
is the best initial management of the patient?
|
| 188 |
+
|
| 189 |
+
|
| 190 |
+
Answer: Compression stockings'
|
| 191 |
+
- 'A 22-year-old primigravida is admitted to the obstetrics ward with leg swelling
|
| 192 |
+
at 35 weeks gestation. She denies any other symptoms. Her pregnancy has been uneventful
|
| 193 |
+
and she was compliant with the recommended prenatal care. Her vital signs were
|
| 194 |
+
as follows: blood pressure, 168/95 mm Hg; heart rate, 86/min; respiratory rate,
|
| 195 |
+
16/min; and temperature, 36.7℃ (98℉). The fetal heart rate was 141/min. The physical
|
| 196 |
+
examination was significant for 2+ pitting edema of the lower extremity. A dipstick
|
| 197 |
+
test shows 1+ proteinuria. On reassessment 15 minutes later without administration
|
| 198 |
+
of an antihypertensive, her blood pressure was 141/88 mm Hg, and the fetal heart
|
| 199 |
+
rate was 147/min. A decision was made to observe the patient and continue the
|
| 200 |
+
work-up without initiating antihypertensive therapy. Which of the following clinical
|
| 201 |
+
features would make the suspected diagnosis into a more severe form?
|
| 202 |
+
|
| 203 |
+
|
| 204 |
+
Answer: Blood pressure of 165/90 mm Hg reassessed 4 hours later'
|
| 205 |
+
- source_sentence: A previously healthy 23-year-old woman comes to the physician because
|
| 206 |
+
of a 1-week history of vaginal discharge. She has no pain or pruritus. She is
|
| 207 |
+
sexually active with one male partner and uses condoms inconsistently. Pelvic
|
| 208 |
+
examination shows a malodorous gray vaginal discharge. Microscopic examination
|
| 209 |
+
of the vaginal discharge is shown. Which of the following is the most likely diagnosis?
|
| 210 |
sentences:
|
| 211 |
+
- 'A previously healthy 23-year-old woman comes to the physician because of a 1-week
|
| 212 |
+
history of vaginal discharge. She has no pain or pruritus. She is sexually active
|
| 213 |
+
with one male partner and uses condoms inconsistently. Pelvic examination shows
|
| 214 |
+
a malodorous gray vaginal discharge. Microscopic examination of the vaginal discharge
|
| 215 |
+
is shown. Which of the following is the most likely diagnosis?
|
| 216 |
+
|
| 217 |
+
|
| 218 |
+
Answer: Bacterial vaginosis'
|
| 219 |
+
- 'A 22-year-old female presents to her physician for evaluation of a vaginal discharge,
|
| 220 |
+
itching, and irritation. She recently started a new relationship with her boyfriend,
|
| 221 |
+
who is her only sexual partner. He does not report any genitourinary symptoms.
|
| 222 |
+
She takes oral contraceptives and does not use barrier contraception. The medical
|
| 223 |
+
history is unremarkable. The vital signs are within normal limits. A gynecologic
|
| 224 |
+
examination reveals a thin, yellow, frothy vaginal discharge with a musty, unpleasant
|
| 225 |
+
odor and numerous punctate red maculae on the ectocervix. The remainder of the
|
| 226 |
+
exam is normal. Which of the following organisms will most likely be revealed
|
| 227 |
+
on wet mount microscopy?
|
| 228 |
+
|
| 229 |
+
|
| 230 |
+
Answer: Motile round or oval-shaped microorganisms'
|
| 231 |
+
- 'A 38-year-old woman, gravida 4, para 3, at 20 weeks'' gestation comes to the
|
| 232 |
+
physician for a prenatal care visit. She used fertility enhancing treatment for
|
| 233 |
+
her current pregnancy. Her other children were born before 37 weeks'' gestation.
|
| 234 |
+
She is 170 cm (5 ft 7 in) tall and weighs 82 kg (180 lb); BMI is 28.4 kg/m2. Her
|
| 235 |
+
vital signs are within normal limits. The abdomen is nontender, and no contractions
|
| 236 |
+
are felt. Ultrasonography shows a cervical length of 22 mm and a fetal heart rate
|
| 237 |
+
of 140/min. Which of the following is the most likely diagnosis?
|
| 238 |
+
|
| 239 |
+
|
| 240 |
+
Answer: Cervical insufficiency'
|
| 241 |
pipeline_tag: sentence-similarity
|
| 242 |
library_name: sentence-transformers
|
| 243 |
---
|
|
|
|
| 250 |
|
| 251 |
### Model Description
|
| 252 |
- **Model Type:** Sentence Transformer
|
| 253 |
+
- **Base model:** [llm-semantic-router/mmbert-embed-32k-2d-matryoshka](https://huggingface.co/llm-semantic-router/mmbert-embed-32k-2d-matryoshka) <!-- at revision 38ba9e6c90ad4f7631d7402c5bc2c0f953277aae -->
|
| 254 |
- **Maximum Sequence Length:** 32768 tokens
|
| 255 |
- **Output Dimensionality:** 768 dimensions
|
| 256 |
- **Similarity Function:** Cosine Similarity
|
|
|
|
| 291 |
model = SentenceTransformer("sentence_transformers_model_id")
|
| 292 |
# Run inference
|
| 293 |
sentences = [
|
| 294 |
+
'A previously healthy 23-year-old woman comes to the physician because of a 1-week history of vaginal discharge. She has no pain or pruritus. She is sexually active with one male partner and uses condoms inconsistently. Pelvic examination shows a malodorous gray vaginal discharge. Microscopic examination of the vaginal discharge is shown. Which of the following is the most likely diagnosis?',
|
| 295 |
+
'A previously healthy 23-year-old woman comes to the physician because of a 1-week history of vaginal discharge. She has no pain or pruritus. She is sexually active with one male partner and uses condoms inconsistently. Pelvic examination shows a malodorous gray vaginal discharge. Microscopic examination of the vaginal discharge is shown. Which of the following is the most likely diagnosis?\n\nAnswer: Bacterial vaginosis',
|
| 296 |
+
'A 22-year-old female presents to her physician for evaluation of a vaginal discharge, itching, and irritation. She recently started a new relationship with her boyfriend, who is her only sexual partner. He does not report any genitourinary symptoms. She takes oral contraceptives and does not use barrier contraception. The medical history is unremarkable. The vital signs are within normal limits. A gynecologic examination reveals a thin, yellow, frothy vaginal discharge with a musty, unpleasant odor and numerous punctate red maculae on the ectocervix. The remainder of the exam is normal. Which of the following organisms will most likely be revealed on wet mount microscopy?\n\nAnswer: Motile round or oval-shaped microorganisms',
|
| 297 |
]
|
| 298 |
embeddings = model.encode(sentences)
|
| 299 |
print(embeddings.shape)
|
|
|
|
| 302 |
# Get the similarity scores for the embeddings
|
| 303 |
similarities = model.similarity(embeddings, embeddings)
|
| 304 |
print(similarities)
|
| 305 |
+
# tensor([[1.0000, 0.9727, 0.8125],
|
| 306 |
+
# [0.9727, 0.9922, 0.8555],
|
| 307 |
+
# [0.8125, 0.8555, 1.0000]], dtype=torch.bfloat16)
|
| 308 |
```
|
| 309 |
|
| 310 |
<!--
|
|
|
|
| 349 |
|
| 350 |
#### Unnamed Dataset
|
| 351 |
|
| 352 |
+
* Size: 492 training samples
|
| 353 |
* Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>sentence_2</code>
|
| 354 |
+
* Approximate statistics based on the first 492 samples:
|
| 355 |
+
| | sentence_0 | sentence_1 | sentence_2 |
|
| 356 |
+
|:--------|:------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|
|
| 357 |
+
| type | string | string | string |
|
| 358 |
+
| details | <ul><li>min: 36 tokens</li><li>mean: 219.2 tokens</li><li>max: 791 tokens</li></ul> | <ul><li>min: 49 tokens</li><li>mean: 227.77 tokens</li><li>max: 819 tokens</li></ul> | <ul><li>min: 51 tokens</li><li>mean: 159.34 tokens</li><li>max: 430 tokens</li></ul> |
|
| 359 |
* Samples:
|
| 360 |
+
| sentence_0 | sentence_1 | sentence_2 |
|
| 361 |
+
|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
| 362 |
+
| <code>A 54-year-old man with a long-standing history of chronic obstructive pulmonary disease (COPD) presents to the clinic for progressive shortness of breath. The patient reports generalized fatigue, distress, and difficulty breathing that is exacerbated with exertion. Physical examination demonstrates clubbing of the fingers, and an echocardiogram shows right ventricular hypertrophy. The patient is placed on a medication for symptom control. One month later, the patient returns for follow up with some improvement in symptoms. Laboratory tests are drawn and shown below:<br><br>Serum:<br>Na+: 137 mEq/L<br>Cl-: 101 mEq/L<br>K+: 4.8 mEq/L<br>HCO3-: 25 mEq/L<br>BUN: 8.5 mg/dL<br>Glucose: 117 mg/dL<br>Creatinine: 1.4 mg/dL<br>Thyroid-stimulating hormone: 1.8 µU/mL<br>Ca2+: 9.6 mg/dL<br>AST: 159 U/L<br>ALT: 201 U/L<br><br>What is the mechanism of action of the likely medication given?</code> | <code>A 54-year-old man with a long-standing history of chronic obstructive pulmonary disease (COPD) presents to the clinic for progressive shortness of breath. The patient reports generalized fatigue, distress, and difficulty breathing that is exacerbated with exertion. Physical examination demonstrates clubbing of the fingers, and an echocardiogram shows right ventricular hypertrophy. The patient is placed on a medication for symptom control. One month later, the patient returns for follow up with some improvement in symptoms. Laboratory tests are drawn and shown below:<br><br>Serum:<br>Na+: 137 mEq/L<br>Cl-: 101 mEq/L<br>K+: 4.8 mEq/L<br>HCO3-: 25 mEq/L<br>BUN: 8.5 mg/dL<br>Glucose: 117 mg/dL<br>Creatinine: 1.4 mg/dL<br>Thyroid-stimulating hormone: 1.8 µU/mL<br>Ca2+: 9.6 mg/dL<br>AST: 159 U/L<br>ALT: 201 U/L<br><br>What is the mechanism of action of the likely medication given?<br><br>Answer: Competitive inhibition of endothelin-1 receptors</code> | <code>A 60-year-old man with known history of chronic obstructive pulmonary disease is brought by ambulance to the emergency department due to shortness of breath. He is out of breath and cannot string a sentence together. The emergency technician suggests that the man tried his tiotropium inhaler multiple times without success. The patient's vitals are as follows: afebrile, BP 90/60, HR 120, RR 24. Oxygen saturation is 90%. An EKG is obtained that shows narrow-complex tachycardia with irregular P waves preceding each QRS complex and irregular PR intervals. What is the best next step in management?<br><br>Answer: Give oxygen immediately</code> |
|
| 363 |
+
| <code>A 20-year-old female with type I diabetes mellitus presents to the emergency department with altered mental status. Her friend said that she has been out late either studying for upcoming tests or attending prayer group meetings. As far as the friend can recollect, the patient appeared to be in her usual state of health until only two days ago, when she was prescribed trimethoprim-sulfamethoxazole for a urinary tract infection. The patient complained that the medication was making her feel nauseous and bloated. The patient also relies on glargine and lispro for glycemic control. Her temperature is 100.5°F (38.1°C), blood pressure is 95/55 mmHg, pulse is 130/min, and respirations are 30/min. Her pupils are equal and reactive to light bilaterally. The remainder of the physical exam is unremarkable. Her basic metabolic panel is displayed below:<br><br>Serum:<br>Na+: 116 mEq/L<br>Cl-: 90 mEq/L<br>K+: 5.0 mEq/L<br>HCO3-: 2 mEq/L<br>BUN: 50 mg/dL<br>Glucose: 1,200 mg/dL<br>Creatinine: 1.5 mg/dL<br><br>Which of the following...</code> | <code>A 20-year-old female with type I diabetes mellitus presents to the emergency department with altered mental status. Her friend said that she has been out late either studying for upcoming tests or attending prayer group meetings. As far as the friend can recollect, the patient appeared to be in her usual state of health until only two days ago, when she was prescribed trimethoprim-sulfamethoxazole for a urinary tract infection. The patient complained that the medication was making her feel nauseous and bloated. The patient also relies on glargine and lispro for glycemic control. Her temperature is 100.5°F (38.1°C), blood pressure is 95/55 mmHg, pulse is 130/min, and respirations are 30/min. Her pupils are equal and reactive to light bilaterally. The remainder of the physical exam is unremarkable. Her basic metabolic panel is displayed below:<br><br>Serum:<br>Na+: 116 mEq/L<br>Cl-: 90 mEq/L<br>K+: 5.0 mEq/L<br>HCO3-: 2 mEq/L<br>BUN: 50 mg/dL<br>Glucose: 1,200 mg/dL<br>Creatinine: 1.5 mg/dL<br><br>Which of the following...</code> | <code>A 53-year-old woman with type 2 diabetes mellitus is admitted for evaluation of recurrent episodes of nausea, tremors, and excessive sweating. She works as a nurse and reports self-measured blood glucose levels below 50 mg/dL on several occasions. Her family history is positive for borderline personality disorder. The only medication listed in her history is metformin. Which of the following is the most appropriate next step in management?<br><br>Answer: Ask the patient if she is taking any medications other than metformin</code> |
|
| 364 |
+
| <code>A 50-year-old man undergoes parathyroidectomy for treatment-resistant hyperparathyroidism. The procedure is complicated by brisk bleeding from an artery that travels along the external branch of the superior laryngeal nerve. To stop the bleeding, the artery is ligated at its origin. Which of the following is most likely the origin of the artery that was injured in this patient?</code> | <code>A 50-year-old man undergoes parathyroidectomy for treatment-resistant hyperparathyroidism. The procedure is complicated by brisk bleeding from an artery that travels along the external branch of the superior laryngeal nerve. To stop the bleeding, the artery is ligated at its origin. Which of the following is most likely the origin of the artery that was injured in this patient?<br><br>Answer: External carotid artery</code> | <code>A 57-year-old man comes to the physician with a 3-month history of right flank pain. Urinalysis shows 60 RBC/hpf. Renal ultrasound shows a 3 cm, well-defined mass in the upper pole of the right kidney. A photomicrograph of a section of the resected mass is shown. Which of the following is the most likely diagnosis?<br><br>Answer: Oncocytoma</code> |
|
| 365 |
* Loss: [<code>TripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#tripletloss) with these parameters:
|
| 366 |
```json
|
| 367 |
{
|
|
|
|
| 432 |
- `parallelism_config`: None
|
| 433 |
- `deepspeed`: None
|
| 434 |
- `label_smoothing_factor`: 0.0
|
| 435 |
+
- `optim`: adamw_torch
|
| 436 |
- `optim_args`: None
|
| 437 |
- `group_by_length`: False
|
| 438 |
- `length_column_name`: length
|
|
|
|
| 479 |
|
| 480 |
</details>
|
| 481 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 482 |
### Framework Versions
|
| 483 |
+
- Python: 3.12.10
|
| 484 |
- Sentence Transformers: 5.2.2
|
| 485 |
- Transformers: 5.0.0
|
| 486 |
+
- PyTorch: 2.7.0+cu128
|
| 487 |
- Accelerate: 1.12.0
|
| 488 |
- Datasets: 4.5.0
|
| 489 |
- Tokenizers: 0.22.2
|
config_sentence_transformers.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
"__version__": {
|
| 4 |
"sentence_transformers": "5.2.2",
|
| 5 |
"transformers": "5.0.0",
|
| 6 |
-
"pytorch": "2.
|
| 7 |
},
|
| 8 |
"prompts": {
|
| 9 |
"query": "",
|
|
|
|
| 3 |
"__version__": {
|
| 4 |
"sentence_transformers": "5.2.2",
|
| 5 |
"transformers": "5.0.0",
|
| 6 |
+
"pytorch": "2.7.0+cu128"
|
| 7 |
},
|
| 8 |
"prompts": {
|
| 9 |
"query": "",
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 613892480
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d03e1552ecb8c1f4e677263184b2b95d7618da59040085a27d806449b5717b39
|
| 3 |
size 613892480
|
tokenizer_config.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
| 8 |
"<start_of_turn>",
|
| 9 |
"<end_of_turn>"
|
| 10 |
],
|
| 11 |
-
"is_local":
|
| 12 |
"mask_token": "<mask>",
|
| 13 |
"max_length": 32768,
|
| 14 |
"model_input_names": [
|
|
|
|
| 8 |
"<start_of_turn>",
|
| 9 |
"<end_of_turn>"
|
| 10 |
],
|
| 11 |
+
"is_local": true,
|
| 12 |
"mask_token": "<mask>",
|
| 13 |
"max_length": 32768,
|
| 14 |
"model_input_names": [
|