Shifa-4B is a medical reasoning model built on
Qwen3.5-4B. This repository contains the
Stage-1 QLoRA adapters from supervised fine-tuning on medical chain-of-thought data.
MedGemma targets are from the
google/medgemma-4b-it model card. Evaluated on 500 samples per benchmark using greedy decoding.
~395K examples blended from three medical reasoning datasets plus a general-instruction mix to prevent catastrophic forgetting:
1from unsloth import FastModel
2
3model, tokenizer = FastModel.from_pretrained(
4 model_name="naazimsnh02/Shifa-4B-SFT-LoRA",
5 max_seq_length=4096,
6 load_in_4bit=True,
7)
8FastModel.for_inference(model)
9
10messages = [
11 {"role": "user", "content": "A 45-year-old male presents with sudden chest pain radiating to the left arm. What is the most likely diagnosis and initial workup?"},
12]
13text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
14inputs = tokenizer([text], return_tensors="pt").to("cuda")
15output = model.generate(**inputs, max_new_tokens=1024, do_sample=False)
16print(tokenizer.decode(output[0], skip_special_tokens=True))
Apache 2.0 — same as the base model (
Qwen3.5-4B).