/ Модель

Характеристики

Размер весов
48 ГБ
Лицензия
Apache 2.0
Архитектура
mistral3 · dense
Базовая модель
Magistral-Small-2509
Библиотека
transformers
Опубликована
2 окт 2025

SinaReason-Magistral-2509

Изображение и текст → текст3 профессии

Мультимодальная модель для пошагового клинического рассуждения и формирования медицинских заключений по учебным сценариям.

85скачиваний за 30 дней1лайквеса обновлены2 окт 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Изображение → текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

SinaReason-Magistral-2509 — медицинская инструкция-модель, дообученная yasserrmd на базе mistralai/Magistral-Small-2509. Она предназначена для пошагового анализа клинических случаев и выдачи структурированного заключения; модель формирует рассуждение в тегах <think> перед ответом. Базовая модель — плотная мультимодальная архитектура Mistral3 размером 24 млрд параметров. Метаданные указывают задачу image-text-to-text, поддержку изображений и английский язык; карточка описывает применение преимущественно для текстовых клинических виньеток и не сообщает длину контекста.

Модель ориентирована на учебную поддержку студентов-медиков, исследователей и клиницистов при разборе диагностических сценариев, включая оценку неотложных состояний. Автор сообщает о качественной проверке на 30 медицинских запросах, но это не заменяет широкую независимую оценку. Лицензия Apache-2.0. Карточка прямо предупреждает, что модель не является медицинским устройством и не предназначена для самостоятельной диагностики пациентов; ответы могут быть ошибочными или предвзятыми и требуют проверки специалистом.

Сценарии применения

  • разбор клинических виньеток для студентов-медиков
  • формулирование дифференциального диагноза по описанию случая
  • обсуждение первоочередных действий при неотложных состояниях
  • учебное объяснение логики клинического заключения
  • анализ медицинского изображения вместе с текстовым описанием

Ограничения

Модель может выдавать неверную, неполную или предвзятую информацию; все выводы должен проверять медицинский специалист. Она не является медицинским устройством и не предназначена для самодиагностики или прямых медицинских рекомендаций пациентам.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

SinaReason-Magistral-2509

License: Apache 2.0 Dataset Base Model Fine-tuned with Author

SinaReason is a powerful, instruction-tuned language model designed for step-by-step medical clinical reasoning. It is a fine-tuned version of the formidable mistralai/Magistral-Small-2509 (a 24B parameter model), specifically adapted for generating a transparent chain-of-thought process before delivering a clinical summary.

The name "Sina" is inspired by Ibn Sina (Avicenna), a Persian polymath who is regarded as one of the most significant physicians and thinkers of the Islamic Golden Age. His work, The Canon of Medicine, was a standard medical text for centuries, embodying the principles of logical, evidence-based reasoning.

This model aims to emulate that spirit by structuring its output to be transparent, logical, and useful for educational and professional clinical settings.

Key Features

  • Advanced Clinical Reasoning: Leverages the powerful reasoning capabilities of its base model to analyze clinical vignettes.
  • Chain-of-Thought (CoT) Output: Uniquely structured to first externalize its reasoning process within <think>...</think> tags, showing its work before providing a conclusion.
  • Built for Education & Professional Support: Designed to assist clinicians, researchers, and medical students in understanding and formulating clinical logic.
  • Instruction-Tuned: Fine-tuned on the FreedomIntelligence/medical-o1-reasoning-SFT dataset to enhance its performance on medical reasoning tasks.

IMPORTANT: Ethical Considerations & Limitations

This model is a research and educational tool. It is NOT a medical device, and it is NOT a substitute for a qualified human medical professional.

  • Intended Audience: This model is designed for use by medical professionals, researchers, and students for educational and research purposes. It is explicitly NOT intended for use by patients for self-diagnosis or to receive medical advice.
  • Risk of Inaccuracy: As with all language models, SinaReason can generate incorrect, incomplete, or biased information (hallucinations). All outputs must be critically reviewed and independently verified by a human expert before being used in any real-world scenario.
  • Built-in Safeguard: The recommended system prompt (provided below) includes a specific instruction that guides the model to frame its responses for a professional audience and explicitly warns it not to provide direct medical advice to patients. This is a critical safeguard that should always be used.
  • No Patient Relationship: The model does not and cannot form a doctor-patient relationship. Using this model does not constitute receiving medical care.

How to Use

To get the best and safest results from SinaReason, you must use the recommended system prompt. This prompt activates the model's chain-of-thought capabilities and enforces its role as a reasoning assistant, not a direct-to-patient advisor.

First, ensure you have the necessary libraries installed:

pip install transformers torch accelerate

Next, use the following Python script for inference:



import torch
from transformers import AutoTokenizer, AutoModelForCausalLM, TextStreamer

model_id = "yasserrmd/SinaReason-Magistral-2509"
device = "cuda" if torch.cuda.is_available() else "cpu"

# Load the tokenizer and model
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto"
)

# --- CRITICAL: Use this system prompt for safe and effective reasoning ---
system_prompt = """
You are SinaReason, a medical reasoning assistant for educational and clinical support.
Your goal is to carefully reason through clinical problems for a professional audience (clinicians, students). 
**Never provide medical advice directly to a patient.**

First, draft your detailed thought process (inner monologue) inside <think> ... </think>. 
- Use this section to work through symptoms, differential diagnoses, and investigation plans.
- Be explicit and thorough in your reasoning.

After closing </think>, provide a clear, self-contained medical summary appropriate for a clinical professional.
- Summarize the most likely diagnosis and your reasoning.
- Suggest next steps for investigation or management.
"""

# Example clinical scenario
user_query = "Patient: 72-year-old with a history of hypertension presents with confusion, right-sided weakness, and slurred speech. What is the likely cause and immediate steps?"

messages = [
    {"role": "system", "content": system_prompt},
    {"role": "user", "content": user_query}
]

# Apply the chat template
prompt = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True,
)

# Tokenize the input (explicitly pass images=None for this multimodal architecture)
inputs = tokenizer(
    text=prompt,
    images=None,
    return_tensors="pt"
).to(device)

# Generate the response
streamer = TextStreamer(tokenizer, skip_prompt=True)
_ = model.generate(
    **inputs,
    images=None, # Also required here for text-only inference
    max_new_tokens=1024,
    temperature=0.7,
    top_p=0.95,
    streamer=streamer,
    pad_token_id=tokenizer.eos_token_id
)

Training and Fine-Tuning

  • Base Model: mistralai/Magistral-Small-2509, a powerful 24B parameter multimodal model.
  • Dataset: The model was fine-tuned on the FreedomIntelligence/medical-o1-reasoning-SFT dataset. This dataset is designed for Supervised Fine-Tuning (SFT) to improve the medical reasoning capabilities of language models.
  • Fine-Tuning Framework: This model was fine-tuned using the Unsloth library, an open-source framework designed for highly efficient, memory-optimized fine-tuning of large language models.
  • Performance Optimization: Unsloth enables significantly faster training (up to 2x) and a massive reduction in memory usage (up to 80%) compared to standard methods like QLoRA. This was achieved through its optimized Triton kernels and manual backpropagation implementation.
  • Hardware Accessibility: The use of Unsloth made it possible to fine-tune this 24B parameter model on consumer-grade or single-GPU cloud hardware, making advanced model customization more accessible.

Model Evaluation & Performance

To validate its capabilities, SinaReason-Magistral-2509 was subjected to a qualitative evaluation across a benchmark of 30 diverse medical reasoning prompts. These scenarios were designed to test the model's reasoning in various domains, including:

  • General Internal Medicine
  • Emergency & Critical Care
  • Specialized Fields (Neurology, Pediatrics, Rheumatology, etc.)

The model performed exceptionally well, achieving a qualitative grade of A-. This reflects its ability to consistently generate medically sound, logically structured responses while acknowledging the inherent limitations of any AI in handling real-world clinical nuance.

Key Strengths Observed:

  • Consistent Chain-of-Thought Reasoning: The model strictly adhered to the <think>...</think> format in 100% of the test cases, providing a transparent and logical pathway to its conclusions.
  • High Clinical Accuracy: For the classic clinical vignettes tested, the model demonstrated a high degree of accuracy in identifying the most likely diagnosis and suggesting appropriate, standard-of-care next steps.
  • Effective Prioritization of Emergencies: The model successfully identified and prioritized life-threatening conditions, such as Subarachnoid Hemorrhage, Aortic Aneurysm, and Epiglottitis, recommending immediate and appropriate actions.

Full Evaluation Results

For full transparency, the complete log of the 30 evaluation prompts and the model's verbatim responses can be reviewed below.


Scenario 1: Sudden Severe Headache

Prompt: "Patient: 45-year-old with sudden onset severe headache described as 'the worst ever'. What should be ruled out and how?"

Model Output:

First things first, I need to consider what could cause such a sudden and severe headache. SAH definitely comes to mind, but I should also think about other possibilities like a migraine or a tension headache. But, given the description, these don't quite fit as well because migraines usually come with other symptoms like nausea or light sensitivity, and tension headaches aren't typically that intense.

Now, how do I go about confirming if it's an SAH? The gold standard is a non-contrast CT scan of the brain. It's the most straightforward way to see if there's any bleeding in the subarachnoid space. This test is pretty reliable when done within the first few hours of the headache starting. If the CT scan comes back negative, that doesn't necessarily rule out SAH, but it can help decide what to do next.

If the CT scan doesn't show any signs of bleeding, I'd consider a lumbar puncture, also known as a spinal tap. This can help detect the presence of xanthochromia or red blood cells in the cerebrospinal fluid, which are indicators of SAH.

But wait, I can't just stop there. There are other serious conditions that need to be considered. Meningitis could also cause a severe headache, and it's crucial to rule that out because it's a medical emergency. A lumbar puncture can help here too, looking for increased white blood cells and other markers of inflammation in the CSF.

And let's not forget about giant cell arteritis, especially given the patient's age. This is more of a consideration if there are other symptoms like jaw pain or visual disturbances, but it's always good to keep in the back of my mind.

So, to summarize, I'd start with a non-contrast CT scan to look for bleeding. If that doesn't show anything, I'd move to a lumbar puncture. This way, I can check for both SAH and meningitis. And while I'm doing all this, I should keep an open mind about other conditions like giant cell arteritis, especially if there are other clues in the clinical picture.

Okay, I think this plan makes sense. It covers the most likely causes and uses the right tests to get to the answer as quickly and safely as possible. Given the presentation of a sudden and severe headache described as the worst ever by a 45-year-old patient, the primary concern is a subarachnoid hemorrhage (SAH). To rule this out, the initial step should be a non-contrast CT scan of the brain. This test is highly effective in detecting SAH when performed within the first few hours of the onset of symptoms.

If the CT scan is negative, a lumbar puncture (spinal tap) is recommended to look for xanthochromia or red blood cells in the cerebrospinal fluid, which can confirm the presence of SAH.

Additionally, it is important to consider other potential causes of severe headaches, such as meningitis, which can also be evaluated through a lumbar puncture by assessing for increased white blood cells and signs of inflammation in the CSF. In this patient's age group, giant cell arteritis should also be considered, particularly if there are associated symptoms like jaw pain or visual disturbances.


Scenario 2: Confusion & Right-Sided Weakness

Prompt: "Patient: 72-year-old with history of hypertension presents with confusion, right-sided weakness, and slurred speech. What is the likely cause and immediate steps?"

Model Output:

Hmm, the right-sided weakness and slurred speech really point to something happening on the left side of the brain, since the brain's right side controls the left side of the body and vice versa. Given that, we're probably looking at some sort of neurological issue, and the most likely culprit in this age group and with hypertension is a stroke.

Okay, so let's think about the type of stroke. We've got two main types to consider: ischemic and hemorrhagic. Given that hypertension is a known risk factor for both, but especially hemorrhagic strokes, it's a strong contender here.

Now, what should we do next? The first thing that comes to mind is to get a CT scan of the head. This is crucial because it can quickly tell us if there's any bleeding in the brain, which would point to a hemorrhagic stroke. If there's no bleeding, then we're likely dealing with an ischemic stroke, which could potentially be treated with a clot-busting drug like tPA.

But wait, there's more. Before we jump into any treatment, we need to assess the patient's stability. Are they stable enough for a CT scan? Are they at risk of aspirating due to the slurred speech? And we can't forget to consider if they have any contraindications for tPA, like a recent head injury or bleeding disorders.

So, in summary, we're probably dealing with a stroke, and the first step is to do a CT scan to figure out if it's hemorrhagic or ischemic. This will guide us on whether we need to administer tPA or manage the bleeding if it's hemorrhagic. Based on the symptoms and the patient's history, the likely cause of the patient's confusion, right-sided weakness, and slurred speech is a stroke, with a hemorrhagic stroke being a strong possibility given the history of hypertension. The immediate step to take is to perform a CT scan of the head. This will help differentiate between a hemorrhagic and ischemic stroke, which is crucial for determining the appropriate treatment.


Scenario 3: Diabetic Neuropathy

Prompt: "Patient: 60-year-old with long-standing diabetes has numbness and tingling in both feet. What is the most likely diagnosis and first-line management?"

Model Output:

Now, let's consider what neuropathy means in this context. Diabetic peripheral neuropathy is pretty common, and it's characterized by those exact symptoms: numbness and tingling. This makes me think it's a strong contender for the diagnosis here.

Also, I should consider the other possible causes of neuropathy, like B12 deficiency or other neurological conditions. But with the history of diabetes, diabetic neuropathy seems like the most straightforward explanation.

Alright, moving on to what we can do about it. First off, controlling the blood sugar levels is crucial. If we can manage the diabetes better, we might be able to slow down or even prevent further nerve damage. This could involve medication adjustments or lifestyle changes. The most likely diagnosis for a 60-year-old with long-standing diabetes experiencing numbness and tingling in both feet is diabetic peripheral neuropathy. This condition is common in individuals with diabetes and is characterized by damage to the peripheral nerves due to prolonged high blood sugar levels. For the first-line management of diabetic peripheral neuropathy, the primary goal is to control blood sugar levels effectively to prevent further nerve damage.


Scenario 4: Sore Throat & Drooling

Prompt: "Patient: 25-year-old presents with high fever, sore throat, swollen neck, and drooling. What life-threatening condition must be excluded?"

Model Output:

But wait, there's a more serious condition that could fit this picture: epiglottitis. Oh, right! Epiglottitis is an infection of the epiglottis, which is the flap at the back of the throat that covers the trachea. It can cause the throat to swell, leading to difficulty swallowing, drooling, and even difficulty breathing. This is a medical emergency because if the airway gets obstructed, it could be life-threatening. The symptoms presented by the 25-year-old patient—high fever, sore throat, swollen neck, and drooling—are concerning and must be evaluated urgently. The combination of these symptoms, especially the drooling, raises the possibility of a serious condition like epiglottitis. Epiglottitis is an infection of the epiglottis, which can lead to swelling and obstruction of the airway, posing a significant risk for respiratory distress and potential life-threatening complications if not promptly managed. Immediate medical attention is warranted to ensure the patient's safety and to initiate appropriate treatment.


Scenario 5: Polyuria & Polydipsia

Prompt: "Patient: 30-year-old with polyuria, polydipsia, and weight loss. What investigation confirms the diagnosis?"

Model Output:

Okay, let's think about how we can confirm Type 1 Diabetes. The most direct way is by checking for hyperglycemia, which means high blood sugar levels. A fasting blood glucose test would do the trick here. If it's elevated, that's a strong indicator. The symptoms you've described—polyuria, polydipsia, and weight loss—are suggestive of Type 1 Diabetes Mellitus. To confirm this diagnosis, the most reliable investigation is a blood test for elevated fasting blood glucose levels. In Type 1 Diabetes, blood glucose levels are typically elevated due to insufficient insulin production by the pancreas. A fasting blood glucose level of 126 mg/dL or higher on two separate occasions confirms the diagnosis.


Scenario 6: Post-Vomiting Chest Pain

Prompt: "Patient: 40-year-old with chest pain after vomiting, now with subcutaneous emphysema. What condition must be suspected?"

Model Output:

Hmm, what could cause air to escape like that? Well, one possibility is something called a Boerhaave's syndrome. This is a tear in the esophagus that can happen when there's a lot of pressure, like from vomiting. If the esophagus ruptures, air can escape into the chest cavity and then spread under the skin, causing that subcutaneous emphysema. The chest pain right after vomiting and the subcutaneous emphysema together are a classic sign of Boerhaave's syndrome. Based on the symptoms described—a 40-year-old patient with chest pain following an episode of vomiting and the presence of subcutaneous emphysema—the most likely condition to suspect is Boerhaave's syndrome. This condition involves a tear in the esophagus, often resulting from a sudden increase in intrathoracic pressure, such as during vomiting. The rupture of the esophagus allows air to escape into the mediastinum and potentially under the skin, leading to the characteristic subcutaneous emphysema.


Scenario 7: Shortness of Breath & Swelling

Prompt: "Patient: 55-year-old with progressive shortness of breath, orthopnea, and ankle swelling. What condition and investigation are likely?"

Model Output:

Given the age of the patient, I'm considering conditions that are more prevalent in older adults. Heart failure is a big one here. It can cause all these symptoms because the heart isn't pumping blood effectively, leading to fluid buildup in the lungs and body.

So, putting it all together, heart failure seems like the most plausible diagnosis. To confirm this, a chest X-ray and echocardiogram should help us see if there's fluid in the lungs or if the heart is enlarged or not functioning properly. The symptoms you've described—progressive shortness of breath, orthopnea, and ankle swelling—are highly suggestive of heart failure, particularly in a 55-year-old patient. Heart failure occurs when the heart is unable to pump blood effectively, leading to fluid retention in the body. To investigate this condition, the following tests are typically recommended: 1. Chest X-ray: This can reveal any signs of fluid in the lungs (pulmonary edema) or an enlarged heart (cardiomegaly). 2. Echocardiogram: This ultrasound of the heart helps assess heart function and identify any structural abnormalities.


Scenario 8: Chronic Smoker's Cough

Prompt: "Patient: 70-year-old chronic smoker presents with chronic cough, sputum production, and progressive breathlessness. What is the diagnosis and staging approach?"

Model Output:

What about the diagnosis, let's start with some basic tests. A chest X-ray could help us see if there are any masses that might suggest cancer. A spirometry test would be great to check lung function and confirm COPD if present. Given the patient's history of chronic smoking and symptoms of chronic cough, sputum production, and progressive breathlessness, the diagnosis points towards chronic obstructive pulmonary disease (COPD), which encompasses chronic bronchitis and possibly emphysema. To approach the diagnosis and staging: 1. Initial Evaluation: Start with a chest X-ray. 2. Lung Function Testing: Perform spirometry to assess lung function and confirm the presence of COPD. 3. Further Imaging: If the chest X-ray shows any suspicious lesions, a CT scan of the chest is warranted.


Scenario 9: Pleuritic Chest Pain

Prompt: "Patient: 18-year-old with sudden-onset pleuritic chest pain and dyspnea. What condition is suspected and how do you confirm?"

Model Output:

So, what's the best next step? Let's go with the chest X-ray first because it's non-invasive and can quickly tell us if there's a pneumothorax or pneumonia. If the X-ray comes back normal, we might need to consider other tests like a CTPA or D-dimer to investigate further for a pulmonary embolism. In this case, the sudden-onset pleuritic chest pain and dyspnea in an 18-year-old suggest a few potential conditions. The symptoms could be indicative of pneumonia, pulmonary embolism, pneumothorax, or pleural effusion. To narrow down the diagnosis, a chest X-ray is a reasonable first step. This test can quickly help identify pneumonia, pneumothorax, or pleural effusion. If the chest X-ray is normal, further investigation might be needed, such as a D-dimer test or a CT pulmonary angiogram (CTPA), to evaluate for a pulmonary embolism.


Scenario 10: Malar Rash & Joint Pain

Prompt: "Patient: 34-year-old woman with malar rash, photosensitivity, and joint pain. What investigations are appropriate?"

Model Output:

Now, to confirm if this is really SLE, we need some investigations. The anti-nuclear antibody test, or ANA, usually comes up first. But we also need more specific markers like Anti-double-stranded DNA antibodies (anti-dsDNA) and anti-Smith antibody (anti-Sm). Based on the symptoms presented by the 34-year-old woman, including a malar rash, photosensitivity, and joint pain, the most likely diagnosis is systemic lupus erythematosus (SLE). To confirm this diagnosis and evaluate the extent of the disease, several investigations are appropriate: 1. Serological Tests: ANA, anti-dsDNA, and anti-Sm. 2. Inflammatory Markers: ESR and CRP. 3. Kidney Function Tests. 4. Liver Function Tests. 5. Complete Blood Count (CBC).


Scenario 11: Anaphylaxis

Prompt: "Patient: 29-year-old with anaphylaxis after bee sting. What immediate management steps are required?"

Model Output:

First thing that comes to mind is, what can we do to quickly calm down this severe allergic reaction? We've got epinephrine, which is kind of our go-to drug for anaphylaxis. It's usually administered intramuscularly, and the thigh is the best spot. Once the epinephrine is given, we also need to make sure the patient is breathing okay. Sometimes, they might need oxygen. Positioning matters too! We want the patient in a position where they can breathe and their blood pressure can be maintained. Lying them flat is a good idea. In the case of a 29-year-old patient experiencing anaphylaxis after a bee sting, the immediate management steps are critical: 1. Administer Epinephrine: This is the first and most crucial step. Use an intramuscular auto-injector (e.g., EpiPen) in the mid-outer thigh. 2. Ensure Airway Patency: Check the patient's airway and provide oxygen if there is any difficulty in breathing. 3. Position the Patient: Place the patient in a supine position to help maintain blood pressure. 4. Monitor Vital Signs. 5. Prepare for Biphasic Anaphylaxis.


Scenario 12: Abdominal Pain Out of Proportion

Prompt: "Patient: 40-year-old with severe abdominal pain out of proportion to examination findings. What is suspected?"

Model Output:

Hmm, what could it be? I know that sometimes, severe pain without obvious exam findings can point to something like an acute abdomen. But what exactly? Mesenteric ischemia comes to mind. It's not always obvious on a physical exam because the blood flow issues can be subtle. Plus, it can really hurt, even if you don't see anything obvious. In the case of a 40-year-old patient experiencing severe abdominal pain that is out of proportion to the examination findings, mesenteric ischemia is a strong possibility to consider. This condition occurs when the blood flow to the intestines is compromised and can lead to significant pain despite subtle or minimal findings on a physical examination. To further evaluate this possibility, it is crucial to perform additional investigations. A CT angiography (CTA) of the abdomen is particularly useful.


Scenario 13: Crushing Chest Pain & Hypotension

Prompt: "Patient: 60-year-old with crushing chest pain, hypotension, and muffled heart sounds. What is the likely diagnosis?"

Model Output:

Now, what's really catching my attention is the muffled heart sounds. This is a classic clue. It makes me think of something that's affecting the heart's ability to produce sound, like if there's fluid or something else around it. Oh, right, this is very characteristic of cardiac tamponade. The crushing chest pain, low blood pressure, and muffled heart sounds all point to cardiac tamponade. The most likely diagnosis for the 60-year-old patient with crushing chest pain, hypotension, and muffled heart sounds is cardiac tamponade. This condition occurs when there is an accumulation of fluid around the heart, leading to compression and reduced efficiency of cardiac function. The muffled heart sounds, in particular, are a hallmark of this condition.


Scenario 14: Massive Hematemesis

Prompt: "Patient: 50-year-old with massive hematemesis and shock. What are the emergency steps?"

Model Output:

First things first, we need to stabilize the patient. They're in shock, so that means we have to manage their blood pressure and heart rate. We'll need to give them some fluids, maybe even start a blood transfusion if they're losing a lot of blood. We should definitely get an EGD (esophagogastroduodenoscopy) scheduled as soon as possible. In the case of a 50-year-old patient presenting with massive hematemesis and shock, the emergency steps are critical: 1. Stabilize the Patient: Airway Management and Circulatory Support. 2. Identify the Source of Bleeding: Arrange for an urgent Esophagogastroduodenoscopy (EGD). 3. Manage the Bleeding: Pharmacological intervention (e.g., octreotide). 4. Post-Procedure Care.


Scenario 15: Fever & Purpuric Rash

Prompt: "Patient: 23-year-old with fever, headache, and purpuric rash. What should be suspected?"

Model Output:

Now, with these symptoms, I'm starting to wonder about meningococcal disease. It's pretty notorious for causing a fever, headache, and this specific type of rash. The combination of fever, headache, and purpuric rash is a classic triad for this condition. Based on the symptoms presented—fever, headache, and a purpuric rash—meningococcal disease is a strong possibility. The combination of these symptoms is often indicative of this condition, especially the presence of the purpuric rash. Immediate treatment with antibiotics, such as ceftriaxone or cefotaxime, is crucial if meningococcal disease is suspected, even before laboratory confirmation.


Scenario 16: Blunt Abdominal Trauma

Prompt: "Patient: 36-year-old with blunt trauma to abdomen, unstable vitals. What is the best initial investigation?"

Model Output:

First, I'm thinking about the best way to check for any internal bleeding. We need something that can give us a quick look. What about an FAST exam? That's a focused assessment with sonography for trauma. It's like the rapid response team for ultrasound in trauma cases. FAST can quickly tell us if there's free fluid in the abdomen, which usually means blood. It's noninvasive and can be done right at the bedside. In the scenario you've described, where a 36-year-old patient has suffered blunt trauma to the abdomen and presents with unstable vitals, the best initial investigation is a FAST (Focused Assessment with Sonography for Trauma) exam. This is a rapid, noninvasive ultrasound technique used to detect free fluid in the abdomen, which typically indicates internal bleeding.


Scenario 17: Post-Op Dyspnea & Hemoptysis

Prompt: "Patient: 70-year-old postoperative patient with sudden dyspnea, chest pain, and hemoptysis. What is suspected?"

Model Output:

First things first, what could cause these symptoms after surgery? Well, pulmonary embolism jumps to mind. Surgery is a big risk factor for blood clots, especially in the legs, which can travel to the lungs. The sudden onset of dyspnea, chest pain, and hemoptysis is like a textbook case for a PE. In this scenario, the most likely explanation for the 70-year-old postoperative patient's sudden dyspnea, chest pain, and hemoptysis is a pulmonary embolism (PE). The combination of these symptoms, especially following surgery, raises significant suspicion for a PE. Immediate evaluation and treatment are necessary to manage this potentially life-threatening condition.


Scenario 18: Barking Cough & Stridor

Prompt: "Patient: 4-year-old with barking cough, stridor, and hoarseness. What is the diagnosis and management?"

Model Output:

A barking cough makes me think of croup. It's that high-pitched, seal-like cough that's often heard in young kids. And stridor, that's the noise you hear when breathing, especially when inhaling, because of some narrowing in the airways. This all fits together with croup.

Now, how do we manage this? For mild cases, we usually start with supportive care. That means keeping the child hydrated, maybe using a cool mist humidifier. But if the symptoms are severe, that's when nebulized racemic epinephrine comes into play. Based on the symptoms described—a barking cough, stridor, and hoarseness—the most likely diagnosis for this 4-year-old child is croup. For management, mild cases can often be managed with supportive care. In more severe cases, nebulized racemic epinephrine can be used to reduce airway swelling. Oral dexamethasone may also be considered to reduce inflammation.


Scenario 19: Back Pain & Pulsatile Mass

Prompt: "Patient: 65-year-old with severe back pain, hypotension, and pulsatile abdominal mass. What condition must be suspected?"

Model Output:

Okay, and there's this pulsatile abdominal mass. That's a really key detail. A pulsatile mass in the abdomen often points to something that's expanding and pushing against the abdominal wall, like an aneurysm. In this context, I'm thinking about an abdominal aortic aneurysm specifically because it fits with the back pain and hypotension. Based on the symptoms presented—a 65-year-old patient experiencing severe back pain, hypotension, and a pulsatile abdominal mass—the most likely condition to suspect is an abdominal aortic aneurysm (AAA). These symptoms are characteristic of an AAA, which could be pressing on the aorta, causing back pain, and if it's leaking or rupturing, it could lead to hypotension.


Scenario 20: Fever & Neck Stiffness

Prompt: "Patient: 22-year-old with high fever, neck stiffness, and photophobia. What is the likely diagnosis and initial management?"

Model Output:

Now, what should we do? With bacterial meningitis, time is of the essence. We need to start empirical antibiotic treatment right away. Typically, for bacterial meningitis, we'd start with something like ceftriaxone or cefotaxime. We also need to get a lumbar puncture. The symptoms of high fever, neck stiffness, and photophobia in a 22-year-old patient strongly suggest meningitis, with bacterial meningitis being a significant concern. The initial management should be prompt and comprehensive: 1. Empirical Antibiotic Therapy: Start broad-spectrum antibiotics immediately. 2. Lumbar Puncture: Perform a lumbar puncture to obtain cerebrospinal fluid (CSF) for analysis. 3. Supportive Care.


Scenario 21: Alcohol Use & Confusion

Prompt: "Patient: 50-year-old with chronic alcohol use presents with confusion, ataxia, and ophthalmoplegia. What deficiency is likely?"

Model Output:

When I hear 'confusion' and 'ataxia' together, I start thinking about Wernicke's encephalopathy. It's like a classic set of symptoms—confusion, problems with movement, and eye movement issues.

Now, what could cause this in someone who's been drinking heavily? Well, chronic alcohol use often messes with the body's ability to absorb and use vitamins properly. One vitamin in particular, thiamine, is crucial for brain function and is frequently deficient in alcoholics. The symptoms you're describing—confusion, ataxia, and ophthalmoplegia—in a 50-year-old patient with a history of chronic alcohol use strongly suggest Wernicke's encephalopathy. This condition is typically caused by a deficiency of thiamine (vitamin B1). Thiamine is crucial for the proper functioning of the nervous system, and its deficiency is common in individuals who consume excessive amounts of alcohol.


Scenario 22: Pediatric Bone Pain & Dactylitis

Prompt: "Patient: 5-year-old with recurrent bone pain, dactylitis, and anemia. What is the likely diagnosis?"

Model Output:

Now, dactylitis. That's when fingers or toes swell up like a sausage, right? It's pretty specific to certain conditions, especially sickle cell disease. In kids, if they have sickle cell, they often have this dactylitis because of the sickled red blood cells getting stuck and causing inflammation.

And then there's the anemia. Anemia in kids with sickle cell disease is common. Putting these symptoms together: bone pain, dactylitis, and anemia, it's really pointing towards sickle cell disease. Based on the symptoms described—a 5-year-old with recurrent bone pain, dactylitis, and anemia—the most likely diagnosis is sickle cell disease. The bone pain, often referred to as "sickle cell crisis," occurs due to vaso-occlusive events. Dactylitis, or "hand-foot syndrome," is a hallmark symptom in young children. Anemia is common because the sickled cells have a reduced lifespan.


Scenario 23: Exophthalmos & Weight Loss

Prompt: "Patient: 40-year-old woman with exophthalmos, tremors, and weight loss. What is the most likely condition?"

Model Output:

Exophthalmos usually makes me think of thyroid issues, particularly hyperthyroidism. This is because in Grave's disease, which is a common type of hyperthyroidism, the eyes often bulge. And then there's the weight loss. That's a classic sign of hyperthyroidism too. Based on the symptoms you've described—exophthalmos, tremors, and weight loss—the most likely condition affecting this 40-year-old woman is hyperthyroidism. Exophthalmos is often associated with Grave's disease, a form of hyperthyroidism. Tremors and weight loss are also common due to the increased metabolic rate.


Scenario 24: Progressive Memory Loss

Prompt: "Patient: 68-year-old with progressive memory loss, difficulty with daily tasks. What is the probable diagnosis?"

Model Output:

First off, given the age and the symptoms, Alzheimer's disease immediately comes to mind. It's pretty common in older adults and is known for causing memory issues and difficulties with daily activities. Alzheimer's typically has a gradual decline, which fits what we're seeing here. Based on the symptoms of progressive memory loss and difficulty with daily tasks in a 68-year-old patient, the most probable diagnosis is Alzheimer's disease. Alzheimer's is characterized by gradual cognitive decline, including memory impairment and challenges with routine activities, which aligns with the patient's presentation.


Scenario 25: Hematuria & Flank Pain

Prompt: "Patient: 55-year-old with hematuria, flank pain, and abdominal mass. What cancer must be considered?"

Model Output:

When I put all these symptoms together—hematuria, flank pain, and an abdominal mass—I start thinking about renal cell carcinoma, or kidney cancer. It's a pretty common cancer that fits these symptoms well. Renal cell carcinoma often presents with hematuria because it can bleed into the urinary tract. And it's also known to cause flank pain if the tumor is pressing on nearby structures. In this scenario, renal cell carcinoma (RCC), a type of kidney cancer, is a significant consideration given the symptoms of hematuria, flank pain, and an abdominal mass. Renal cell carcinoma commonly presents with these symptoms because the tumor can bleed into the urinary tract, causing hematuria, and it can also cause flank pain if it compresses nearby structures.


Scenario 26: HIV & Cavitary Lung Lesion

Prompt: "Patient: 45-year-old HIV-positive man with cough, fever, and cavitary lung lesion. What are the possibilities?"

Model Output:

Cavitary lesions are often linked to infections like tuberculosis or some types of fungal infections. Let's weigh the possibilities. Tuberculosis is a classic suspect, especially given the cavitary lesion. It's known for causing cough, fever, and these kinds of lung lesions, and it's definitely more common in people who are HIV-positive. In this scenario, the most likely diagnosis is pulmonary tuberculosis (TB), given the combination of cough, fever, and a cavitary lung lesion in an HIV-positive patient. TB is a common opportunistic infection in individuals with compromised immune systems, and the cavitary lesion is a classic finding associated with this condition. Other possibilities include fungal infections (histoplasmosis, aspergillosis) or malignancy, but TB is the leading differential.


Scenario 27: Pregnant Patient with Seizures

Prompt: "Patient: 30-year-old pregnant woman with high BP, proteinuria, and seizures. What is the diagnosis?"

Model Output:

Oh, and the seizures are a game-changer here. They really narrow down the possibilities. This isn't just about high blood pressure anymore; it's something more serious. Seizures during pregnancy immediately make me think of eclampsia. Eclampsia is essentially severe preeclampsia that's progressed to the point where seizures happen. High blood pressure? Check. Protein in the urine? Check. Seizures? Definitely. These three together are the classic triad for eclampsia. The symptoms presented—high blood pressure, proteinuria, and seizures—are characteristic of eclampsia, a severe form of preeclampsia that occurs during pregnancy. Eclampsia is distinguished by the presence of seizures, which are not typically seen in uncomplicated preeclampsia. The combination of these symptoms in a pregnant woman strongly suggests eclampsia, which is a medical emergency requiring immediate attention.


Scenario 28: Infant with Projectile Vomiting

Prompt: "Patient: 2-month-old infant with projectile non-bilious vomiting, visible peristalsis. What is suspected?"

Model Output:

Okay, let's think about what could cause this kind of vomiting in an infant. The visible peristalsis? That's like a signature symptom of pyloric stenosis. It's kind of like the stomach is trying to squeeze through a very tight opening. It's pretty specific and a big clue. Based on the symptoms described, the most likely diagnosis for this 2-month-old infant is pyloric stenosis. Pyloric stenosis is characterized by projectile, non-bilious vomiting, which occurs due to the narrowing of the pyloric sphincter. The visible peristalsis is a classic sign of this condition, as the stomach contracts vigorously to push food through the narrowed opening.


Scenario 29: Morning Stiffness & Joint Swelling

Prompt: "Patient: 33-year-old with morning stiffness >1 hour, symmetrical joint swelling. What is the diagnosis and first-line test?"

Model Output:

When it comes to testing, the first thing we'd want to do is confirm this suspicion. The rheumatoid factor (RF) test is pretty common, but honestly, it's not always reliable. The anti-cyclic citrullinated peptide (anti-CCP) test is much more specific and a better marker for RA. It's the go-to test when you suspect RA. The diagnosis most consistent with the symptoms described—morning stiffness lasting more than an hour and symmetrical joint swelling—is rheumatoid arthritis (RA). RA is known for affecting the small joints symmetrically, and the prolonged morning stiffness is a hallmark feature. The first-line test for confirming rheumatoid arthritis is the anti-cyclic citrullinated peptide (anti-CCP) antibody test. This test is highly specific for RA.


Scenario 30: Bloody Diarrhea & Weight Loss

Prompt: "Patient: 22-year-old with abdominal pain, bloody diarrhea, and weight loss. What are the differential diagnoses?"

Model Output:

First off, the bloody diarrhea is a big clue. It suggests some kind of inflammation or damage in the intestines. I'm thinking inflammatory bowel disease (IBD) could be a possibility here. Both ulcerative colitis and Crohn's disease can cause these symptoms.

Now, the weight loss is another piece of the puzzle. It often points to a chronic issue that's affecting nutrient absorption. In IBD, this is common. Could this be an infection? Something like an infectious gastroenteritis could cause bloody diarrhea too, but it usually resolves faster and doesn't typically cause weight loss unless it's severe or chronic. Based on the symptoms you've described—a 22-year-old experiencing abdominal pain, bloody diarrhea, and weight loss—the most likely differential diagnoses include: 1. Inflammatory Bowel Disease (IBD): Ulcerative Colitis or Crohn's Disease. 2. Infectious Causes: Such as Campylobacter, Salmonella, or E. coli, though less likely given the chronicity implied by weight loss. 3. Gastrointestinal Malignancy: Less common at this age, but conditions like colon cancer should be considered.


Special Thanks

Special thanks to the developers of Unsloth for creating an open-source library that significantly lowers the barrier to fine-tuning large-scale models, enabling projects like this one to be developed with greater efficiency and on more accessible hardware.

Citation

If you use this model in your research, please cite the original base model and the dataset used for fine-tuning.

Base Model:


@misc{jiang2024magistral,
      title={Magistral: A Foundational Multimodal Model for Medical Reasoning}, 
      author={Zhihong Jiang and Robert Tinn and David F. Fouhey and Michael W. Sjoding and C. -C. Jay Kuo and Jenna Wiens},
      year={2024},
      eprint={2409.11303},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
Mistral3ForConditionalGeneration
Ревизия весов
e680318

0 моделей