This repository demonstrates the RRG-DPO method (from the paper "RRG-DPO: Direct Preference Optimization for Clinically Accurate Radiology Report Generation") using R2Gen as an example. The example shows how to integrate RRG-DPO into a report-generation model as a post-training step.
-
Download the preference dataset from: https://drive.google.com/file/d/13zdP6qXNaVzAWVowv7DgAdJLrJ6Em-e1/view?usp=drive_link
-
Train the supervised fine-tuned (SFT) R2Gen model by running main.py.
-
Configure main_dpo.py: set the data path and model path to the locations from steps 1–2, then execute the DPO training stage (6,000–9,000 steps is enough).
-
Configure main.py: Set the checkpoint path for testing and run the test script. The prediction results will be saved as a .pkl file in the checkpoint directory.