CoolFace
Modelpublic

patilshrinivas/Qwen2.5-3B-Instruct-drug-ade-relation-extractor

sourceHugging Faceupdated 21d agoView on Hugging Face
0likes372downloads
Model Card

Qwen2.5-3B ADE Relation Extractor

Standalone merged version of a QLoRA fine-tuned Qwen/Qwen2.5-3B-Instruct model for extracting drug–adverse drug event (ADE) relations from clinical sentences.

Model

  • —Base model: Qwen/Qwen2.5-3B-Instruct
  • —Task: ADE relation extraction
  • —Fine-tuning: QLoRA
  • —Dataset: ADE Corpus V2
  • —Train / Validation / Test: 5,570 / 500 / 500
  • —LoRA: r=16, alpha=32, dropout=0.05
  • —Quantization during training: 4-bit NF4
  • —Compute dtype: BF16

This repository contains the LoRA adapter merged into the base model and can be loaded directly with Transformers.

Results

MetricFine-tuned Model
Strict Pair F171.98%
Drug F192.82%
Effect F176.44%
JSON Validity99.00%
Relaxed Pair F184.82%
G-Eval Average Correctness Score0.8749

G-Eval was performed with DeepEval using gpt-4o-mini.

Usage

python
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "patilshrinivas/Qwen2.5-3B-Instruct-drug-ade-relation-extractor"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    dtype="bfloat16",
    device_map="auto",
)

For generation, use the model with the same clinical extraction prompt/schema described in the project documentation.

Intended Use

This model is intended for research and experimentation in structured clinical information extraction.

It is not a medical diagnostic system and does not replace clinical judgement.