Instructions to use TidasSilva/OPD with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use TidasSilva/OPD with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-1.5B-Instruct") model = PeftModel.from_pretrained(base_model, "TidasSilva/OPD") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from TidasSilva/OPD: direct link, hf CLI and curl.
- Browser
- Download file 1.29 kB
-
https://huggingface.co/TidasSilva/OPD/resolve/main/README.md
- Command line
-
hf download hf://TidasSilva/OPD/README.md
-
curl -L -o README.md https://huggingface.co/TidasSilva/OPD/resolve/main/README.md
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.