⚠️ Intended use & limitation
Research and education only. Must NOT be used for real clinical decisions,
diagnosis, or treatment. Outputs are uncalibrated and may be confidently wrong.
Training
- Base model: Qwen/Qwen2.5-7B-Instruct
- Method: 4-bit QLoRA (nf4, double quant), LoRA r=16, alpha=32, dropout=0.05
- Trainable params: 40,370,176 / 4,393,342,464 (0.918894%)
- Data: MedMCQA, N=5000 (seeded subsample), 1 epoch
- Seed: 42 · LR: 0.0002 · eff. batch = 1×16
- Final train loss: 0.868
Evaluation (EleutherAI lm-evaluation-harness, matched 200-item subsample)
Table with columns: Model, MedMCQA (in-domain), PubMedQA (out-of-domain)| Model | MedMCQA (in-domain) | PubMedQA (out-of-domain) |
|---|
| Base 0-shot | 47.5 | 48.0 |
| QLoRA 5K | 50.0 | 64.5 |
In-domain is flat (within noise) — strong instruction tuning already near-saturates
MedMCQA; the OOD gain is likely an answer-selection/format effect, not new
knowledge. See the repo for the full methodology and honest write-up.
Usage
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-7B-Instruct", device_map="auto", load_in_4bit=True)
model = PeftModel.from_pretrained(base, "Udit013/qwen2.5-7b-medmcqa-qlora-5k")
tok = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-7B-Instruct")