Downloads · 30 days
17
11% of all-time downloads
erjui/CheXagent-2-3b-csrrg-impression
CheXagent-2-3b-csrrg-impression is a image-text-to-text model from erjui. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as cc-by-4.0.
This model is a fine-tuned version of StanfordAIMI/CheXagent-2-3b for generating the IMPRESSION section of contextualized structured chest X-ray radiology reports. It was trained using LoRA (Low-Rank Adaptation) on th…
Downloads · 30 days
17
11% of all-time downloads
All-time downloads
153
Public
Parameters
3.1B
6.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors6.3 GB · 100%
How the weights are stored.
BF163.1B · 100%
From the Hugging Face model README
This model is a fine-tuned version of StanfordAIMI/CheXagent-2-3b for generating the IMPRESSION section of contextualized structured chest X-ray radiology reports. It was trained using LoRA (Low-Rank Adaptation) on the csrrg_ift_dataset containing instruction-following examples from MIMIC-CXR and CheXpert+ datasets.
This model performs Contextualized Structured Radiology Report Generation (CSRRG) for chest X-rays, generating concise impression sections with rich clinical context including patient history, imaging technique, comparison to prior studies, and temporal reasoning.
Key characteristics:
Fine-tuning method: LoRA (Low-Rank Adaptation)
LoRA Configuration:
q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_projTraining hyperparameters:
Hardware:
from transformers import AutoProcessor, AutoModelForVision2Seq
from PIL import Image
import torch
# Load model and processor
model_name = "erjui/CheXagent-2-3b-csrrg-impression"
model = AutoModelForVision2Seq.from_pretrained(
model_name,
trust_remote_code=True,
torch_dtype=torch.bfloat16,
device_map="auto"
)
processor = AutoProcessor.from_pretrained("StanfordAIMI/CheXagent-2-3b", trust_remote_code=True)
# Load chest X-ray images (current and prior studies)
# CSRRG models support multiple images for temporal comparison (max_images_per_sample: 2)
current_image = Image.open("current_xray.jpg")
# Prepare input with clinical context
messages = [
{
"role": "system",
"content": [{"type": "text", "text": "You are an expert radiologist."}]
},
{
"role": "user",
"content": [
{
"type": "text",
"text": """Analyze the chest X-ray images and write the IMPRESSION section of a radiology report. Provide a concise clinical summary and diagnosis based on the imaging findings. Consider the available clinical contexts when formulating your impression.
=== CLINICAL HISTORY/INDICATION ===
Male patient with leukocytosis and fever, query pneumonia.
=== TECHNIQUE ===
Portable anteroposterior chest radiograph.
=== COMPARISON ===
None.
=== CURRENT IMAGES ==="""
},
{"type": "image"} # Current image (supports multiple images for temporal comparison)
]
}
]
# Process and generate
inputs = processor(images=current_image, text=messages, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
generated_text = processor.decode(outputs[0], skip_special_tokens=True)
print(generated_text)
IMPRESSION:
1. Right apical rounded opacity concerning for infection or malignancy.
2. Recommend repeat dedicated AP and lateral chest radiograph, or CT for further evaluation.
If you use this model, please cite:
@article{kang2025automated,
title={Automated Structured Radiology Report Generation with Rich Clinical Context},
author={Kang, Seongjae and Lee, Dong Bok and Jung, Juho and Kim, Dongseop and Kim, Won Hwa and Joo, Sunghoon},
journal={arXiv preprint arXiv:2510.00428},
year={2025}
}
Also cite the base model:
@article{chen2024chexagent,
title={Chexagent: Towards a foundation model for chest x-ray interpretation},
author={Chen, Zhihong and Varma, Maya and Delbrouck, Jean-Benoit and Paschali, Magdalini and Blankemeier, Louis and Van Veen, Dave and Valanarasu, Jeya Maria Jose and Youssef, Alaa and Cohen, Joseph Paul and Reis, Eduardo Pontes and others},
journal={arXiv preprint arXiv:2401.12208},
year={2024}
}
Seongjae Kang (erjui)
For questions or issues, please open an issue on the model repository.