Downloads · 30 days
0
shrishSVaidya/medpao-fast-models
medpao-fast-models is a machine learning model from shrishSVaidya. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
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.
Downloads · 30 days
0
Access
Public
Updated Sep 23, 2026
Repo size
816 MB
Likes
0
Public
Click a slice to open those files.
.safetensors793 MB · 97%
From the Hugging Face model README
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.
Both adapters are trained on:
ℹ️ The base model is not included in this repository and should be downloaded separately from Hugging Face.
This repository contains two LoRA adapters:
📁 Location: concept_extractor/
🎯 Purpose: Extracts medical concepts and their corresponding source sentences from free-text radiology reports.
📁 Location: concept_categorizer/
🎯 Purpose: Categorizes extracted medical concepts according to the ABCDEF chest X-ray interpretation protocol.
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")
The complete MedPAO-Fast agent implementation is available in the project repository:
🔗 GitHub: MiRL-IITM/medpao-fast
MedPAO is the original protocol-driven agent for structuring medical reports.
📄 Paper: here
📚 arXiv: here
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.
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"
}