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
Initial upload: domain-adapted embedding for medical Q&A (MedQuAD)
Browse files- .gitattributes +1 -0
- 1_Pooling/config.json +10 -0
- README.md +445 -0
- config.json +79 -0
- config_sentence_transformers.json +14 -0
- model.safetensors +3 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- tokenizer.json +3 -0
- tokenizer_config.json +31 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
1_Pooling/config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"word_embedding_dimension": 768,
|
| 3 |
+
"pooling_mode_cls_token": false,
|
| 4 |
+
"pooling_mode_mean_tokens": true,
|
| 5 |
+
"pooling_mode_max_tokens": false,
|
| 6 |
+
"pooling_mode_mean_sqrt_len_tokens": false,
|
| 7 |
+
"pooling_mode_weightedmean_tokens": false,
|
| 8 |
+
"pooling_mode_lasttoken": false,
|
| 9 |
+
"include_prompt": true
|
| 10 |
+
}
|
README.md
ADDED
|
@@ -0,0 +1,445 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- sentence-transformers
|
| 4 |
+
- sentence-similarity
|
| 5 |
+
- feature-extraction
|
| 6 |
+
- dense
|
| 7 |
+
- generated_from_trainer
|
| 8 |
+
- dataset_size:12962
|
| 9 |
+
- loss:TripletLoss
|
| 10 |
+
- dataset_size:21344
|
| 11 |
+
base_model: llm-semantic-router/mmbert-embed-32k-2d-matryoshka
|
| 12 |
+
widget:
|
| 13 |
+
- source_sentence: What is (are) Leigh's Disease ?
|
| 14 |
+
sentences:
|
| 15 |
+
- Leigh's disease is a rare inherited neurometabolic disorder that affects the central
|
| 16 |
+
nervous system.This progressive disorder begins in infants between the ages of
|
| 17 |
+
three months and two years.Rarely, it occurs in teenagers and adults.Leigh's disease
|
| 18 |
+
can be caused by mutations in mitochondrial DNA or by deficiencies of an enzyme
|
| 19 |
+
called pyruvate dehydrogenase.Symptoms of Leigh's disease usually progress rapidly.The
|
| 20 |
+
earliest signs may be poor sucking ability,and the loss of head control and motor
|
| 21 |
+
skills.These symptoms may be accompanied by loss of appetite, vomiting, irritability,
|
| 22 |
+
continuous crying, and seizures.
|
| 23 |
+
- Mutations in the ACE, AGT, AGTR1, or REN gene can cause renal tubular dysgenesis.These
|
| 24 |
+
genes are involved in the renin-angiotensin system, which regulates blood pressure
|
| 25 |
+
and the balance of fluids and salts in the body and plays a role in kidney development
|
| 26 |
+
before birth. The renin-angiotensin system consists of several proteins that are
|
| 27 |
+
involved in a series of steps to produce a protein called angiotensin II.In the
|
| 28 |
+
first step, the renin protein (produced from the REN gene) converts a protein
|
| 29 |
+
called angiotensinogen (produced from the AGT gene) to angiotensin I.In the next
|
| 30 |
+
step, angiotensin-converting enzyme (produced from the ACE gene) converts angiotensin
|
| 31 |
+
I to angiotensin II.Angiotensin II attaches (binds) to the angiotensin II receptor
|
| 32 |
+
type 1 (AT1 receptor; produced from the AGTR1 gene), stimulating chemical signaling.
|
| 33 |
+
By binding to the AT1 receptor, angiotensin II causes blood vessels to narrow
|
| 34 |
+
(constrict), which results in increased blood pressure.
|
| 35 |
+
- What causes Hashimoto's encephalitis? The exact cause of Hashimoto's encephalitis
|
| 36 |
+
(HE) is unknown, but is thought to relate to autoimmune or other autoinflammatory
|
| 37 |
+
processes. While it is associated with Hashimoto's thyroiditis, the exact nature
|
| 38 |
+
of the relationship between the two conditions is unclear. It does not appear
|
| 39 |
+
to be directly related to hypothyroidism or hyperthyroidism.
|
| 40 |
+
- source_sentence: What causes Heart Palpitations ?
|
| 41 |
+
sentences:
|
| 42 |
+
- "These include decongestants (found in cough and cold medicines) and some herbal\
|
| 43 |
+
\ and nutritional supplements.\n \nCaffeine, nicotine (found in\
|
| 44 |
+
\ tobacco), alcohol, and illegal drugs (such as cocaine and amphetamines) also\
|
| 45 |
+
\ can cause palpitations.\n \nCauses Related to Heart Problems\n\
|
| 46 |
+
\ \nSome palpitations are symptoms of arrhythmias.Arrhythmias are\
|
| 47 |
+
\ problems with the rate or rhythm of the heartbeat.However, less than half of\
|
| 48 |
+
\ the people who have palpitations have arrhythmias.\n \nDuring\
|
| 49 |
+
\ an arrhythmia, the heart can beat too fast, too slow, or with an irregular rhythm."
|
| 50 |
+
- "Arrhythmias are problems with the rate or rhythm of the heartbeat.\n \
|
| 51 |
+
\ \nSome arrhythmias are signs of heart conditions, such as heart attack,\
|
| 52 |
+
\ heart failure, heart valve disease, or heart muscle disease.However, less than\
|
| 53 |
+
\ half of the people who have palpitations have arrhythmias.\n \
|
| 54 |
+
\ \nYou can take steps to reduce or prevent palpitations.Try to avoid things that\
|
| 55 |
+
\ trigger them (such as stress and stimulants) and treat related medical conditions.\n\
|
| 56 |
+
\ \nOutlook\n \nPalpitations are very common.They\
|
| 57 |
+
\ usually aren't serious or harmful, but they can be bothersome.If you have them,\
|
| 58 |
+
\ your doctor can decide whether you need treatment or ongoing care."
|
| 59 |
+
- Rheumatic fever is an inflammatory condition that may develop after infection
|
| 60 |
+
with group A Streptococcus bacteria, such as strep throat or scarlet fever. It
|
| 61 |
+
is primarily diagnosed in children between the ages of 6 and 16 and can affect
|
| 62 |
+
the heart, joints, nervous system and/or skin. Early signs and symptoms include
|
| 63 |
+
sore throat; swollen red tonsils; fever; headache; and/or muscle and joint aches.
|
| 64 |
+
Some affected people develop rheumatic heart disease, which can lead to serious
|
| 65 |
+
inflammation and scarring of the heart valves. It is not clear why some people
|
| 66 |
+
who are infected with group A Streptococcus bacteria go on to develop rheumatic
|
| 67 |
+
fever, while others do not; however, it appears that some families may have a
|
| 68 |
+
genetic susceptibility to develop the condition. Treatment usually includes antibiotics
|
| 69 |
+
and/or anti-inflammatory medications.
|
| 70 |
+
- source_sentence: What are the symptoms of Colpocephaly ?
|
| 71 |
+
sentences:
|
| 72 |
+
- What are the symptoms of colpocephaly? Colpocephaly is characterized by a small
|
| 73 |
+
head circumference and in many cases, intellectual disability. Other signs and
|
| 74 |
+
symptoms may include movement abnormalities, muscle spasms, and seizures. Poor
|
| 75 |
+
vision, speech and language difficulties, deafness, and chorioretinitis have been
|
| 76 |
+
described in individual cases. Cases of people with colpocephaly and normal neurological
|
| 77 |
+
and motor development have also been described.
|
| 78 |
+
- The NINDS supports a broad program of research on disorders of the nervous system,
|
| 79 |
+
including CIDP. Much of this research is aimed at increasing the understanding
|
| 80 |
+
of these disorders and finding ways to prevent, treat, and cure them.
|
| 81 |
+
- What are the signs and symptoms of pachygyria? Signs and symptoms of pachygyria
|
| 82 |
+
vary among affected people and can depend on the extent of the abnormality. They
|
| 83 |
+
often include poor muscle tone and motor function; seizures; developmental delays;
|
| 84 |
+
intellectual disability; failure to grow and thrive; difficulties with feeding
|
| 85 |
+
or swallowing; swelling in the extremities; and small head size (microcephaly).
|
| 86 |
+
Most infants appear physically normal, but some conditions associated with pachygyria
|
| 87 |
+
cause distinctive facial or skull characteristics.
|
| 88 |
+
- source_sentence: How many people are affected by sialuria ?
|
| 89 |
+
sentences:
|
| 90 |
+
- PD is both chronic, meaning it persists over a long period of time, and progressive,
|
| 91 |
+
meaning its symptoms grow worse over time. Although some people become severely
|
| 92 |
+
disabled, others experience only minor motor disruptions. Tremor is the major
|
| 93 |
+
symptom for some individuals, while for others tremor is only a minor complaint
|
| 94 |
+
and other symptoms are more troublesome. It is currently not possible to predict
|
| 95 |
+
which symptoms will affect an individual, and the intensity of the symptoms also
|
| 96 |
+
varies from person to person.
|
| 97 |
+
- Fewer than 10 people worldwide have been diagnosed with sialuria. There are probably
|
| 98 |
+
more people with the disorder who have not been diagnosed, as sialuria can be
|
| 99 |
+
difficult to detect because of its variable features.
|
| 100 |
+
- Sialic acid storage disease is a very rare disorder. ISSD has been identified
|
| 101 |
+
in only a few dozen infants worldwide. Salla disease occurs mainly in Finland
|
| 102 |
+
and Sweden and has been reported in approximately 150 people. A few individuals
|
| 103 |
+
have been identified as having intermediate severe Salla disease.
|
| 104 |
+
- source_sentence: What is (are) Turner Syndrome ?
|
| 105 |
+
sentences:
|
| 106 |
+
- What are the signs and symptoms of Turner syndrome?There are various signs and
|
| 107 |
+
symptoms of Turner syndrome, which can range from very mild to more severe.Short
|
| 108 |
+
stature is the most common feature and usually becomes apparent by age 5.In early
|
| 109 |
+
childhood, frequent middle ear infections are common and can lead to hearing loss
|
| 110 |
+
in some cases.Most affected girls do not produce the necessary sex hormones for
|
| 111 |
+
puberty, so they don't have a pubertal growth spurt, start their periods or develop
|
| 112 |
+
breasts without hormone treatment.While most affected women are infertile, pregnancy
|
| 113 |
+
is possible with egg donation and assisted reproductive technology.Intelligence
|
| 114 |
+
is usually normal, but developmental delay, learning disabilities, and/or behavioral
|
| 115 |
+
problems are sometimes present.
|
| 116 |
+
- What are the signs and symptoms of Myotonic dystrophy?Signs and symptoms of myotonic
|
| 117 |
+
dystrophy often begin in a person's 20s or 30s, but they can begin at any age.Symptoms
|
| 118 |
+
often include progressive muscle weakness and wasting (particularly in the legs,
|
| 119 |
+
hands, neck and face); stiffness and tightness of the muscles; cataracts; and
|
| 120 |
+
cardiac conduction defects (irregular electrical control of the heartbeat).Some
|
| 121 |
+
affected men also have hormonal changes that may cause balding or infertility.The
|
| 122 |
+
severity of symptoms can vary widely among affected people.The signs and symptoms
|
| 123 |
+
of type 1 and type 2 overlap, but type 2 is generally more mild than type 1.People
|
| 124 |
+
who are born with the condition have congenital myotonic dystrophy, which is a
|
| 125 |
+
variation of type 1.Congenital myotonic dystophy causes weakness of all muscles,
|
| 126 |
+
in addition to breathing problems, developmental delays and intellectual disabilities.
|
| 127 |
+
- 'Assisted reproduction techniques can help some women with Turner syndrome get
|
| 128 |
+
pregnant. NIH: National Institute of Child Health and Human Development'
|
| 129 |
+
pipeline_tag: sentence-similarity
|
| 130 |
+
library_name: sentence-transformers
|
| 131 |
+
---
|
| 132 |
+
|
| 133 |
+
# SentenceTransformer based on llm-semantic-router/mmbert-embed-32k-2d-matryoshka
|
| 134 |
+
|
| 135 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [llm-semantic-router/mmbert-embed-32k-2d-matryoshka](https://huggingface.co/llm-semantic-router/mmbert-embed-32k-2d-matryoshka). It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
| 136 |
+
|
| 137 |
+
## Model Details
|
| 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 ba2b3857d830fa4f10da37cd462106fd81ed14bd -->
|
| 142 |
+
- **Maximum Sequence Length:** 32768 tokens
|
| 143 |
+
- **Output Dimensionality:** 768 dimensions
|
| 144 |
+
- **Similarity Function:** Cosine Similarity
|
| 145 |
+
<!-- - **Training Dataset:** Unknown -->
|
| 146 |
+
<!-- - **Language:** Unknown -->
|
| 147 |
+
<!-- - **License:** Unknown -->
|
| 148 |
+
|
| 149 |
+
### Model Sources
|
| 150 |
+
|
| 151 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
| 152 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
|
| 153 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
| 154 |
+
|
| 155 |
+
### Full Model Architecture
|
| 156 |
+
|
| 157 |
+
```
|
| 158 |
+
SentenceTransformer(
|
| 159 |
+
(0): Transformer({'max_seq_length': 32768, 'do_lower_case': False, 'architecture': 'ModernBertModel'})
|
| 160 |
+
(1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
|
| 161 |
+
)
|
| 162 |
+
```
|
| 163 |
+
|
| 164 |
+
## Usage
|
| 165 |
+
|
| 166 |
+
### Direct Usage (Sentence Transformers)
|
| 167 |
+
|
| 168 |
+
First install the Sentence Transformers library:
|
| 169 |
+
|
| 170 |
+
```bash
|
| 171 |
+
pip install -U sentence-transformers
|
| 172 |
+
```
|
| 173 |
+
|
| 174 |
+
Then you can load this model and run inference.
|
| 175 |
+
```python
|
| 176 |
+
from sentence_transformers import SentenceTransformer
|
| 177 |
+
|
| 178 |
+
# Download from the 🤗 Hub
|
| 179 |
+
model = SentenceTransformer("sentence_transformers_model_id")
|
| 180 |
+
# Run inference
|
| 181 |
+
sentences = [
|
| 182 |
+
'What is (are) Turner Syndrome ?',
|
| 183 |
+
'Assisted reproduction techniques can help some women with Turner syndrome get pregnant. NIH: National Institute of Child Health and Human Development',
|
| 184 |
+
"What are the signs and symptoms of Turner syndrome?There are various signs and symptoms of Turner syndrome, which can range from very mild to more severe.Short stature is the most common feature and usually becomes apparent by age 5.In early childhood, frequent middle ear infections are common and can lead to hearing loss in some cases.Most affected girls do not produce the necessary sex hormones for puberty, so they don't have a pubertal growth spurt, start their periods or develop breasts without hormone treatment.While most affected women are infertile, pregnancy is possible with egg donation and assisted reproductive technology.Intelligence is usually normal, but developmental delay, learning disabilities, and/or behavioral problems are sometimes present.",
|
| 185 |
+
]
|
| 186 |
+
embeddings = model.encode(sentences)
|
| 187 |
+
print(embeddings.shape)
|
| 188 |
+
# [3, 768]
|
| 189 |
+
|
| 190 |
+
# Get the similarity scores for the embeddings
|
| 191 |
+
similarities = model.similarity(embeddings, embeddings)
|
| 192 |
+
print(similarities)
|
| 193 |
+
# tensor([[1.0000, 0.7383, 0.4883],
|
| 194 |
+
# [0.7383, 1.0000, 0.5508],
|
| 195 |
+
# [0.4883, 0.5508, 1.0000]], dtype=torch.bfloat16)
|
| 196 |
+
```
|
| 197 |
+
|
| 198 |
+
<!--
|
| 199 |
+
### Direct Usage (Transformers)
|
| 200 |
+
|
| 201 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 202 |
+
|
| 203 |
+
</details>
|
| 204 |
+
-->
|
| 205 |
+
|
| 206 |
+
<!--
|
| 207 |
+
### Downstream Usage (Sentence Transformers)
|
| 208 |
+
|
| 209 |
+
You can finetune this model on your own dataset.
|
| 210 |
+
|
| 211 |
+
<details><summary>Click to expand</summary>
|
| 212 |
+
|
| 213 |
+
</details>
|
| 214 |
+
-->
|
| 215 |
+
|
| 216 |
+
<!--
|
| 217 |
+
### Out-of-Scope Use
|
| 218 |
+
|
| 219 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 220 |
+
-->
|
| 221 |
+
|
| 222 |
+
<!--
|
| 223 |
+
## Bias, Risks and Limitations
|
| 224 |
+
|
| 225 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 226 |
+
-->
|
| 227 |
+
|
| 228 |
+
<!--
|
| 229 |
+
### Recommendations
|
| 230 |
+
|
| 231 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 232 |
+
-->
|
| 233 |
+
|
| 234 |
+
## Training Details
|
| 235 |
+
|
| 236 |
+
### Training Dataset
|
| 237 |
+
|
| 238 |
+
#### Unnamed Dataset
|
| 239 |
+
|
| 240 |
+
* Size: 21,344 training samples
|
| 241 |
+
* Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>sentence_2</code>
|
| 242 |
+
* Approximate statistics based on the first 1000 samples:
|
| 243 |
+
| | sentence_0 | sentence_1 | sentence_2 |
|
| 244 |
+
|:--------|:----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
|
| 245 |
+
| type | string | string | string |
|
| 246 |
+
| details | <ul><li>min: 6 tokens</li><li>mean: 13.33 tokens</li><li>max: 27 tokens</li></ul> | <ul><li>min: 12 tokens</li><li>mean: 148.31 tokens</li><li>max: 439 tokens</li></ul> | <ul><li>min: 9 tokens</li><li>mean: 141.22 tokens</li><li>max: 523 tokens</li></ul> |
|
| 247 |
+
* Samples:
|
| 248 |
+
| sentence_0 | sentence_1 | sentence_2 |
|
| 249 |
+
|:-------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
| 250 |
+
| <code>What is the outlook for Coffin Lowry Syndrome ?</code> | <code>The prognosis for individuals with Coffin-Lowry syndrome varies depending on the severity of symptoms. Early intervention may improve the outlook for patients. Life span is reduced in some individuals with Coffin-Lowry syndrome.</code> | <code>How might Coffin-Siris syndrome be treated? People with Coffin-Siris syndrome may benefit from occupational, physical, and speech therapy. Developmental pediatricians may be helpful in recommending and coordinating therapeutic and educational interventions. Additional specialty care may be needed depending on the symptoms in the individual, such as by gastrointestinal, eye, kidney, heart, and hearing specialists.</code> |
|
| 251 |
+
| <code>What is (are) Sarcoidosis ?</code> | <code>Sarcoidosis is an inflammatory disease characterized by the development and growth of tiny lumps of cells called granulomas. If these tiny granulomas grow and clump together in an organ, they can affect how the organ works, leading to the symptoms of sarcoidosis. The granulomas can be found in almost any part of the body, but occur more commonly in the lungs, lymph nodes, eyes, skin, and liver. Although no one is sure what causes sarcoidosis, it is thought by most scientists to be a disorder of the immune system. The course of the disease varies from person to person. It often goes away on its own, but in some people symptoms of sarcoidosis may last a lifetime. For those who need treatment, anti-inflammatory medications and immunosuppressants can help.</code> | <code>Sarcoidosis is a disease that leads to inflammation, usually in your lungs, skin, or lymph nodes. It starts as tiny, grain-like lumps, called granulomas. Sarcoidosis can affect any organ in your body. No one is sure what causes sarcoidosis. It affects men and women of all ages and races. It occurs mostly in people ages 20 to 50, African Americans, especially women, and people of Northern European origin. Many people have no symptoms. If you have symptoms, they may include - Cough - Shortness of breath - Weight loss - Night sweats - Fatigue Tests to diagnose sarcoidosis include chest x-rays, lung function tests, and a biopsy. Not everyone who has the disease needs treatment. If you do, prednisone, a type of steroid, is the main treatment. NIH: National Heart, Lung, and Blood Institute</code> |
|
| 252 |
+
| <code>What are the symptoms of High Blood Pressure ?</code> | <code>Because diagnosis is based on blood pressure readings, this condition can go undetected for years, as symptoms do not usually appear until the body is damaged from chronic high blood pressure.<br> <br><br> <br>Complications of High Blood Pressure<br> <br>When blood pressure stays high over time, it can damage the body and cause complications.Some common complications and their signs and symptoms include:<br> <br>Aneurysms:When an abnormal bulge forms in the wall of an artery.Aneurysms develop and grow for years without causing signs or symptoms until they rupture, grow large enough to press on nearby body parts, or block blood flow.The signs and symptoms that develop depend on the location of the aneurysm.<br> <br>Chronic Kidney Disease: When blood vessels narrow in the kidneys, possibly causing kidney failure.<br> <br>Cognitive Changes: Research shows that over time, higher blood pressure numbers can lead to cognitive changes.</code> | <code>High blood pressure is a common disease in which blood flows through blood vessels (arteries) at higher than normal pressures. There are two main types of high blood pressure: primary and secondary high blood pressure. Primary, or essential, high blood pressure is the most common type of high blood pressure. This type of high blood pressure tends to develop over years as a person ages. Secondary high blood pressure is caused by another medical condition or use of certain medicines. This type usually resolves after the cause is treated or removed.</code> |
|
| 253 |
+
* Loss: [<code>TripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#tripletloss) with these parameters:
|
| 254 |
+
```json
|
| 255 |
+
{
|
| 256 |
+
"distance_metric": "TripletDistanceMetric.COSINE",
|
| 257 |
+
"triplet_margin": 0.1
|
| 258 |
+
}
|
| 259 |
+
```
|
| 260 |
+
|
| 261 |
+
### Training Hyperparameters
|
| 262 |
+
#### Non-Default Hyperparameters
|
| 263 |
+
|
| 264 |
+
- `num_train_epochs`: 2
|
| 265 |
+
- `multi_dataset_batch_sampler`: round_robin
|
| 266 |
+
|
| 267 |
+
#### All Hyperparameters
|
| 268 |
+
<details><summary>Click to expand</summary>
|
| 269 |
+
|
| 270 |
+
- `do_predict`: False
|
| 271 |
+
- `eval_strategy`: no
|
| 272 |
+
- `prediction_loss_only`: True
|
| 273 |
+
- `per_device_train_batch_size`: 8
|
| 274 |
+
- `per_device_eval_batch_size`: 8
|
| 275 |
+
- `gradient_accumulation_steps`: 1
|
| 276 |
+
- `eval_accumulation_steps`: None
|
| 277 |
+
- `torch_empty_cache_steps`: None
|
| 278 |
+
- `learning_rate`: 5e-05
|
| 279 |
+
- `weight_decay`: 0.0
|
| 280 |
+
- `adam_beta1`: 0.9
|
| 281 |
+
- `adam_beta2`: 0.999
|
| 282 |
+
- `adam_epsilon`: 1e-08
|
| 283 |
+
- `max_grad_norm`: 1
|
| 284 |
+
- `num_train_epochs`: 2
|
| 285 |
+
- `max_steps`: -1
|
| 286 |
+
- `lr_scheduler_type`: linear
|
| 287 |
+
- `lr_scheduler_kwargs`: None
|
| 288 |
+
- `warmup_ratio`: None
|
| 289 |
+
- `warmup_steps`: 0
|
| 290 |
+
- `log_level`: passive
|
| 291 |
+
- `log_level_replica`: warning
|
| 292 |
+
- `log_on_each_node`: True
|
| 293 |
+
- `logging_nan_inf_filter`: True
|
| 294 |
+
- `enable_jit_checkpoint`: False
|
| 295 |
+
- `save_on_each_node`: False
|
| 296 |
+
- `save_only_model`: False
|
| 297 |
+
- `restore_callback_states_from_checkpoint`: False
|
| 298 |
+
- `use_cpu`: False
|
| 299 |
+
- `seed`: 42
|
| 300 |
+
- `data_seed`: None
|
| 301 |
+
- `bf16`: False
|
| 302 |
+
- `fp16`: False
|
| 303 |
+
- `bf16_full_eval`: False
|
| 304 |
+
- `fp16_full_eval`: False
|
| 305 |
+
- `tf32`: None
|
| 306 |
+
- `local_rank`: -1
|
| 307 |
+
- `ddp_backend`: None
|
| 308 |
+
- `debug`: []
|
| 309 |
+
- `dataloader_drop_last`: False
|
| 310 |
+
- `dataloader_num_workers`: 0
|
| 311 |
+
- `dataloader_prefetch_factor`: None
|
| 312 |
+
- `disable_tqdm`: False
|
| 313 |
+
- `remove_unused_columns`: True
|
| 314 |
+
- `label_names`: None
|
| 315 |
+
- `load_best_model_at_end`: False
|
| 316 |
+
- `ignore_data_skip`: False
|
| 317 |
+
- `fsdp`: []
|
| 318 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
| 319 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
| 320 |
+
- `parallelism_config`: None
|
| 321 |
+
- `deepspeed`: None
|
| 322 |
+
- `label_smoothing_factor`: 0.0
|
| 323 |
+
- `optim`: adamw_torch_fused
|
| 324 |
+
- `optim_args`: None
|
| 325 |
+
- `group_by_length`: False
|
| 326 |
+
- `length_column_name`: length
|
| 327 |
+
- `project`: huggingface
|
| 328 |
+
- `trackio_space_id`: trackio
|
| 329 |
+
- `ddp_find_unused_parameters`: None
|
| 330 |
+
- `ddp_bucket_cap_mb`: None
|
| 331 |
+
- `ddp_broadcast_buffers`: False
|
| 332 |
+
- `dataloader_pin_memory`: True
|
| 333 |
+
- `dataloader_persistent_workers`: False
|
| 334 |
+
- `skip_memory_metrics`: True
|
| 335 |
+
- `push_to_hub`: False
|
| 336 |
+
- `resume_from_checkpoint`: None
|
| 337 |
+
- `hub_model_id`: None
|
| 338 |
+
- `hub_strategy`: every_save
|
| 339 |
+
- `hub_private_repo`: None
|
| 340 |
+
- `hub_always_push`: False
|
| 341 |
+
- `hub_revision`: None
|
| 342 |
+
- `gradient_checkpointing`: False
|
| 343 |
+
- `gradient_checkpointing_kwargs`: None
|
| 344 |
+
- `include_for_metrics`: []
|
| 345 |
+
- `eval_do_concat_batches`: True
|
| 346 |
+
- `auto_find_batch_size`: False
|
| 347 |
+
- `full_determinism`: False
|
| 348 |
+
- `ddp_timeout`: 1800
|
| 349 |
+
- `torch_compile`: False
|
| 350 |
+
- `torch_compile_backend`: None
|
| 351 |
+
- `torch_compile_mode`: None
|
| 352 |
+
- `include_num_input_tokens_seen`: no
|
| 353 |
+
- `neftune_noise_alpha`: None
|
| 354 |
+
- `optim_target_modules`: None
|
| 355 |
+
- `batch_eval_metrics`: False
|
| 356 |
+
- `eval_on_start`: False
|
| 357 |
+
- `use_liger_kernel`: False
|
| 358 |
+
- `liger_kernel_config`: None
|
| 359 |
+
- `eval_use_gather_object`: False
|
| 360 |
+
- `average_tokens_across_devices`: True
|
| 361 |
+
- `use_cache`: False
|
| 362 |
+
- `prompts`: None
|
| 363 |
+
- `batch_sampler`: batch_sampler
|
| 364 |
+
- `multi_dataset_batch_sampler`: round_robin
|
| 365 |
+
- `router_mapping`: {}
|
| 366 |
+
- `learning_rate_mapping`: {}
|
| 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.3
|
| 393 |
+
- Sentence Transformers: 5.2.2
|
| 394 |
+
- Transformers: 5.0.0
|
| 395 |
+
- PyTorch: 2.10.0+cu128
|
| 396 |
+
- Accelerate: 1.12.0
|
| 397 |
+
- Datasets: 4.5.0
|
| 398 |
+
- Tokenizers: 0.22.2
|
| 399 |
+
|
| 400 |
+
## Citation
|
| 401 |
+
|
| 402 |
+
### BibTeX
|
| 403 |
+
|
| 404 |
+
#### Sentence Transformers
|
| 405 |
+
```bibtex
|
| 406 |
+
@inproceedings{reimers-2019-sentence-bert,
|
| 407 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
| 408 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
| 409 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
| 410 |
+
month = "11",
|
| 411 |
+
year = "2019",
|
| 412 |
+
publisher = "Association for Computational Linguistics",
|
| 413 |
+
url = "https://arxiv.org/abs/1908.10084",
|
| 414 |
+
}
|
| 415 |
+
```
|
| 416 |
+
|
| 417 |
+
#### TripletLoss
|
| 418 |
+
```bibtex
|
| 419 |
+
@misc{hermans2017defense,
|
| 420 |
+
title={In Defense of the Triplet Loss for Person Re-Identification},
|
| 421 |
+
author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
|
| 422 |
+
year={2017},
|
| 423 |
+
eprint={1703.07737},
|
| 424 |
+
archivePrefix={arXiv},
|
| 425 |
+
primaryClass={cs.CV}
|
| 426 |
+
}
|
| 427 |
+
```
|
| 428 |
+
|
| 429 |
+
<!--
|
| 430 |
+
## Glossary
|
| 431 |
+
|
| 432 |
+
*Clearly define terms in order to be accessible across audiences.*
|
| 433 |
+
-->
|
| 434 |
+
|
| 435 |
+
<!--
|
| 436 |
+
## Model Card Authors
|
| 437 |
+
|
| 438 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 439 |
+
-->
|
| 440 |
+
|
| 441 |
+
<!--
|
| 442 |
+
## Model Card Contact
|
| 443 |
+
|
| 444 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 445 |
+
-->
|
config.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"ModernBertModel"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 2,
|
| 8 |
+
"classifier_activation": "gelu",
|
| 9 |
+
"classifier_bias": false,
|
| 10 |
+
"classifier_dropout": 0.0,
|
| 11 |
+
"classifier_pooling": "mean",
|
| 12 |
+
"cls_token_id": 1,
|
| 13 |
+
"decoder_bias": true,
|
| 14 |
+
"deterministic_flash_attn": false,
|
| 15 |
+
"dtype": "bfloat16",
|
| 16 |
+
"embedding_dropout": 0.0,
|
| 17 |
+
"eos_token_id": 1,
|
| 18 |
+
"global_attn_every_n_layers": 3,
|
| 19 |
+
"gradient_checkpointing": false,
|
| 20 |
+
"hidden_activation": "gelu",
|
| 21 |
+
"hidden_size": 768,
|
| 22 |
+
"initializer_cutoff_factor": 2.0,
|
| 23 |
+
"initializer_range": 0.02,
|
| 24 |
+
"intermediate_size": 1152,
|
| 25 |
+
"layer_norm_eps": 1e-05,
|
| 26 |
+
"layer_types": [
|
| 27 |
+
"full_attention",
|
| 28 |
+
"sliding_attention",
|
| 29 |
+
"sliding_attention",
|
| 30 |
+
"full_attention",
|
| 31 |
+
"sliding_attention",
|
| 32 |
+
"sliding_attention",
|
| 33 |
+
"full_attention",
|
| 34 |
+
"sliding_attention",
|
| 35 |
+
"sliding_attention",
|
| 36 |
+
"full_attention",
|
| 37 |
+
"sliding_attention",
|
| 38 |
+
"sliding_attention",
|
| 39 |
+
"full_attention",
|
| 40 |
+
"sliding_attention",
|
| 41 |
+
"sliding_attention",
|
| 42 |
+
"full_attention",
|
| 43 |
+
"sliding_attention",
|
| 44 |
+
"sliding_attention",
|
| 45 |
+
"full_attention",
|
| 46 |
+
"sliding_attention",
|
| 47 |
+
"sliding_attention",
|
| 48 |
+
"full_attention"
|
| 49 |
+
],
|
| 50 |
+
"local_attention": 128,
|
| 51 |
+
"mask_token_id": 4,
|
| 52 |
+
"max_position_embeddings": 32768,
|
| 53 |
+
"mlp_bias": false,
|
| 54 |
+
"mlp_dropout": 0.0,
|
| 55 |
+
"model_type": "modernbert",
|
| 56 |
+
"norm_bias": false,
|
| 57 |
+
"norm_eps": 1e-05,
|
| 58 |
+
"num_attention_heads": 12,
|
| 59 |
+
"num_hidden_layers": 22,
|
| 60 |
+
"pad_token_id": 0,
|
| 61 |
+
"position_embedding_type": "sans_pos",
|
| 62 |
+
"repad_logits_with_grad": false,
|
| 63 |
+
"rope_parameters": {
|
| 64 |
+
"full_attention": {
|
| 65 |
+
"rope_theta": 160000,
|
| 66 |
+
"rope_type": "default"
|
| 67 |
+
},
|
| 68 |
+
"sliding_attention": {
|
| 69 |
+
"rope_theta": 160000,
|
| 70 |
+
"rope_type": "default"
|
| 71 |
+
}
|
| 72 |
+
},
|
| 73 |
+
"sep_token_id": 1,
|
| 74 |
+
"sparse_pred_ignore_index": -100,
|
| 75 |
+
"sparse_prediction": false,
|
| 76 |
+
"tie_word_embeddings": true,
|
| 77 |
+
"transformers_version": "5.0.0",
|
| 78 |
+
"vocab_size": 256000
|
| 79 |
+
}
|
config_sentence_transformers.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "SentenceTransformer",
|
| 3 |
+
"__version__": {
|
| 4 |
+
"sentence_transformers": "5.2.2",
|
| 5 |
+
"transformers": "5.0.0",
|
| 6 |
+
"pytorch": "2.10.0+cu128"
|
| 7 |
+
},
|
| 8 |
+
"prompts": {
|
| 9 |
+
"query": "",
|
| 10 |
+
"document": ""
|
| 11 |
+
},
|
| 12 |
+
"default_prompt_name": null,
|
| 13 |
+
"similarity_fn_name": "cosine"
|
| 14 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f21a7fd24808578a802d202e82a20ea53231c0d026b6bfb1548d2a0fc81a1a64
|
| 3 |
+
size 613892480
|
modules.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"idx": 0,
|
| 4 |
+
"name": "0",
|
| 5 |
+
"path": "",
|
| 6 |
+
"type": "sentence_transformers.models.Transformer"
|
| 7 |
+
},
|
| 8 |
+
{
|
| 9 |
+
"idx": 1,
|
| 10 |
+
"name": "1",
|
| 11 |
+
"path": "1_Pooling",
|
| 12 |
+
"type": "sentence_transformers.models.Pooling"
|
| 13 |
+
}
|
| 14 |
+
]
|
sentence_bert_config.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"max_seq_length": 32768,
|
| 3 |
+
"do_lower_case": false
|
| 4 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5b14c7584d507951e1723f53f4e82cc76db81b7c0df3dc3c48bed45954b0277c
|
| 3 |
+
size 34363443
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"bos_token": "<bos>",
|
| 4 |
+
"clean_up_tokenization_spaces": false,
|
| 5 |
+
"cls_token": "<bos>",
|
| 6 |
+
"eos_token": "<eos>",
|
| 7 |
+
"extra_special_tokens": [
|
| 8 |
+
"<start_of_turn>",
|
| 9 |
+
"<end_of_turn>"
|
| 10 |
+
],
|
| 11 |
+
"is_local": false,
|
| 12 |
+
"mask_token": "<mask>",
|
| 13 |
+
"max_length": 32768,
|
| 14 |
+
"model_input_names": [
|
| 15 |
+
"input_ids",
|
| 16 |
+
"attention_mask"
|
| 17 |
+
],
|
| 18 |
+
"model_max_length": 32768,
|
| 19 |
+
"model_specific_special_tokens": {},
|
| 20 |
+
"pad_to_multiple_of": null,
|
| 21 |
+
"pad_token": "<pad>",
|
| 22 |
+
"pad_token_type_id": 0,
|
| 23 |
+
"padding_side": "right",
|
| 24 |
+
"sep_token": "<eos>",
|
| 25 |
+
"spaces_between_special_tokens": false,
|
| 26 |
+
"stride": 0,
|
| 27 |
+
"tokenizer_class": "TokenizersBackend",
|
| 28 |
+
"truncation_side": "right",
|
| 29 |
+
"truncation_strategy": "longest_first",
|
| 30 |
+
"unk_token": "<unk>"
|
| 31 |
+
}
|