🫁 MedPAO-Fast

This repository contains the LoRA adapters used by MedPAO-Fast, a faster and lightweight version of the original MedPAO framework for structuring chest X-ray radiology reports according to the ABCDEF protocol.

⚑ MedPAO-Fast is designed to reduce computational and deployment requirements while maintaining comparable performance to the original MedPAO framework. It enables deployment on low-resource and consumer-grade GPUs.

🧠 Base Model

Both adapters are trained on:

Qwen/Qwen3-4B-Instruct-2507

ℹ️ The base model is not included in this repository and should be downloaded separately from Hugging Face.

🧩 Included LoRA Adapters

This repository contains two LoRA adapters:

1️⃣ Concept Extractor

πŸ“ Location: concept_extractor/

🎯 Purpose: Extracts medical concepts and their corresponding source sentences from free-text radiology reports.

2️⃣ Concept Categorizer

πŸ“ Location: concept_categorizer/

🎯 Purpose: Categorizes extracted medical concepts according to the ABCDEF chest X-ray interpretation protocol.

πŸš€ Loading the Adapters

Install the required packages:

pip install transformers peft accelerate bitsandbytes

Load the base model:

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
from peft import PeftModel

base_model_id = "Qwen/Qwen3-4B-Instruct-2507"

tokenizer = AutoTokenizer.from_pretrained(base_model_id)

bnb_config = BitsAndBytesConfig(
    load_in_4bit=True,
    bnb_4bit_quant_type="nf4",
    bnb_4bit_compute_dtype=torch.bfloat16,
    bnb_4bit_use_double_quant=True,
)

base_model = AutoModelForCausalLM.from_pretrained(
    base_model_id,
    quantization_config=bnb_config,
    device_map="auto",
)

Load the concept extraction adapter:

model = PeftModel.from_pretrained(
    base_model,
    "shrishSVaidya/medpao-fast-models",
    subfolder="concept_extractor",
    adapter_name="get_concept",
)

Load the concept categorization adapter:

model.load_adapter(
    "shrishSVaidya/medpao-fast-models",
    subfolder="concept_categorizer",
    adapter_name="concept_categorizer",
)

Select an adapter for inference:

model.set_adapter("get_concept")

or:

model.set_adapter("concept_categorizer")

🩻 MedPAO-Fast

The complete MedPAO-Fast agent implementation is available in the project repository:

πŸ”— GitHub: MiRL-IITM/medpao-fast

πŸ“œ Original MedPAO

MedPAO is the original protocol-driven agent for structuring medical reports.

πŸ“„ Paper: here

πŸ“š arXiv: here

βš•οΈ Intended Use

These adapters are provided for research and development purposes. They are not intended to provide medical diagnosis, treatment recommendations, or other clinical decisions without appropriate expert oversight.

πŸ“ Citation

If you use MedPAO-Fast in your research, please cite the original MedPAO work:

@InProceedings{10.1007/978-3-032-06004-4_4,
author="Vaidya, Shrish Shrinath
and Palani, Gowthamaan
and Ramesh, Sidharth
and Balasubramanian, Velmurugan
and Selvam, Minmini
and Srinivasaraja, Gokulraja
and Krishnamurthi, Ganapathy",
editor="Qiu, Jianing
and Wu, Jinlin
and Langlotz, Curtis
and Huang, Baoru
and Lei, Zhen
and Wu, Honghan
and Liu, Hongbin
and Xie, Weidi",
title="MedPAO: A Protocol-Driven Agent for Structuring Medical Reports",
booktitle="AI for Clinical Applications",
year="2026",
publisher="Springer Nature Switzerland",
address="Cham",
pages="33--45",
abstract="The deployment of Large Language Models (LLMs) for structuring clinical data is critically hindered by their tendency to hallucinate facts and their inability to follow domain-specific rules. To address this, we introduce MedPAO, a novel agentic framework that ensures accuracy and verifiable reasoning by grounding its operation in established clinical protocols such as the ABCDEF protocol for CXR analysis. MedPAO decomposes the report structuring task into a transparent process managed by a Plan-Act-Observe (PAO) loop and specialized tools. This protocol-driven method provides a verifiable alternative to opaque, monolithic models. The efficacy of our approach is demonstrated through rigorous evaluation: MedPAO achieves an F1-score of 0.96 on the critical sub-task of concept categorization. Notably, expert radiologists and clinicians rated the final structured outputs with an average score of 4.52 out of 5, indicating a level of reliability that surpasses baseline approaches relying solely on LLM-based foundation models. The code is available at: https://github.com/MiRL-IITM/medpao-agent.",
isbn="978-3-032-06004-4"
}
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for shrishSVaidya/medpao-fast-models

Adapter
(5854)
this model

Space using shrishSVaidya/medpao-fast-models 1

Paper for shrishSVaidya/medpao-fast-models