Views
No views yet

<think></think> tags, following established clinical reasoning frameworks| Model | Size | MMLU Pro (Medical) | MedMCQA | MedQA | PubMedQA |
|---|---|---|---|---|---|
| Gazal-R1 (Final) | 32B | 81.6 | 71.9 | 87.1 | 79.6 |
| Gazal-R1 (SFT-only) | 32B | 79.3 | 72.3 | 86.9 | 77.6 |
| Llama 3.1 405B Instruct | 405B | 70.2 | 75.8 | 81.9 | 74.6 |
| Qwen 2.5 72B Instruct | 72B | 72.1 | 66.2 | 72.7 | 71.7 |
| Med42-Llama3.1-70B | 70B | 66.1 | 72.4 | 80.4 | 77.6 |
| Llama 3.1 70B Instruct | 70B | 74.5 | 72.5 | 78.4 | 78.5 |
| QwQ 32B | 32B | 70.1 | 65.6 | 72.3 | 73.7 |
| Qwen 3 32B | 32B | 78.4 | 71.6 | 84.4 | 76.7 |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "TachyHealth/Gazal-R1-32B-GRPO-preview"
4
5# Load the tokenizer and model
6tokenizer = AutoTokenizer.from_pretrained(model_name)
7model = AutoModelForCausalLM.from_pretrained(
8 model_name,
9 torch_dtype="auto",
10 device_map="auto"
11)
12
13# Medical reasoning prompt
14prompt = """A 65-year-old male presents with chest pain, shortness of breath, and elevated troponin levels.
15ECG shows ST-segment elevation in leads II, III, and aVF. What is the most likely diagnosis and immediate management?"""
16
17messages = [
18 {"role": "user", "content": prompt}
19]
20
21text = tokenizer.apply_chat_template(
22 messages,
23 tokenize=False,
24 add_generation_prompt=True
25)
26
27model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
28
29# Generate response with medical reasoning
30generated_ids = model.generate(
31 **model_inputs,
32 max_new_tokens=2048,
33 temperature=0.7,
34 top_p=0.8,
35 top_k=20
36)
37
38output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()
39response = tokenizer.decode(output_ids, skip_special_tokens=True)
40
41print("Medical Assessment:", response)<think>
Step 1: Analyze presenting symptoms - chest pain, dyspnea, troponin elevation
Step 2: Interpret ECG findings - ST elevation in inferior leads
Step 3: Consider differential diagnoses - STEMI vs NSTEMI vs unstable angina
Step 4: Identify culprit vessel - likely RCA given inferior lead changes
Step 5: Assess urgency - emergent intervention required
Step 6: Plan immediate management - dual antiplatelet, anticoagulation, cath lab
</think>
## Clinical Assessment
**Primary Diagnosis**: ST-Elevation Myocardial Infarction (STEMI), inferior wall
**Reasoning**: The combination of chest pain, elevated troponin, and ST-elevation in leads II, III, and aVF is pathognomonic for inferior STEMI, likely involving the right coronary artery (RCA).
**Immediate Management**:
1. **Reperfusion therapy**: Emergency cardiac catheterization with primary PCI
2. **Antiplatelet therapy**: Aspirin 325mg + P2Y12 inhibitor (clopidogrel/ticagrelor)
3. **Anticoagulation**: Heparin or bivalirudin
4. **Supportive care**: O2 if hypoxic, nitroglycerin for pain (avoid if hypotensive)
**Follow-up**: Post-PCI monitoring, echocardiogram, cardiac rehabilitation referral1@article{gazal-r1-2025,
2 title={Gazal-R1: Achieving State-of-the-Art Medical Reasoning with Parameter-Efficient Two-Stage Training},
3 author={Ahmed M. Adly and Mostafa Samy and Amr Fawzy},
4 journal={arXiv preprint arXiv:2506.21594},
5 year={2025},
6 url={https://arxiv.org/abs/2506.21594}
7}