OPD / README.md
TidasSilva's picture
Replace repo with OPD-LLM v11 adapters
52a71c3 verified
|
Raw History Blame Contribute Delete
1.29 kB
metadata
base_model: Qwen/Qwen2.5-1.5B-Instruct
library_name: peft
license: apache-2.0
tags:
  - medical
  - lora
  - qwen2.5
  - grpo
  - research

OPD-LLM v11

LoRA adapters on Qwen/Qwen2.5-1.5B-Instruct (SFT on MedMCQA/PubMedQA, then GRPO-style RL on MedQA-USMLE). The root of this repo is the RL adapter. adapter_sft/ is the SFT-only adapter, adapter_vl/ is a Qwen2-VL-2B LoRA trained on VQA-RAD / PathVQA.

Results (MedQA-USMLE test, n=200, greedy)

Stage Accuracy 95% CI Format fail
Pretrained 0.395 [0.33, 0.464] 0.06
After SFT 0.375 [0.311, 0.444] 0.08
After RL 0.455 [0.387, 0.524] 0.0
After RL + notes 0.435 [0.368, 0.504] 0.01

Vision: {'vqa_rad_yes_no_acc_on_100': 0.64, 'train_steps': 87}

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-1.5B-Instruct", torch_dtype="auto", device_map="auto")
model = PeftModel.from_pretrained(base, "TidasSilva/OPD")
tok = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-1.5B-Instruct")

Limitations

Research use only. Not clinically validated, not approved for patient care. Exam-style MCQ accuracy only; differences under ~7 points at n=200 are within noise.