LoRA fine-tune of
Qwen3.5-9B on synthetic clinical triage Q&A pairs generated from PubMed Central open-access papers. The model is specialized for
emergency-medicine decision-making: triaging patients, applying clinical decision rules, and generating protocol-grounded triage recommendations.
1from peft import PeftModel
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4base = "Qwen/Qwen3.5-9B"
5adapter = "vadimbelsky/qwen3.5-medical-ft"
6
7tokenizer = AutoTokenizer.from_pretrained(base)
8model = AutoModelForCausalLM.from_pretrained(base, torch_dtype="auto", device_map="auto")
9model = PeftModel.from_pretrained(model, adapter)
10model.eval()
11
12prompt = (
13 "A 67-year-old male presents with sudden onset crushing chest pain radiating to "
14 "the left arm, diaphoresis, and mild dyspnea. BP 145/90, HR 102, SpO2 96%. "
15 "What is the triage priority and initial management?"
16)
17inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
18output = model.generate(**inputs, max_new_tokens=512, temperature=0.3, do_sample=True)
19print(tokenizer.decode(output[0], skip_special_tokens=True))
Zero-shot evaluation of the quantized base model (Q4_K_M GGUF) using
lm-evaluation-harness:
The LoRA adapters add ~40 M trainable parameters (~0.4% of base model).