# HSA-DPO
**Repository Path**: miss-lover/HSA-DPO
## Basic Information
- **Project Name**: HSA-DPO
- **Description**: No description available
- **Primary Language**: Python
- **License**: Apache-2.0
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2025-01-25
- **Last Updated**: 2025-01-25
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
[AAAI 2025] Detecting and Mitigating Hallucination in Large Vision Language Models via Fine-Grained AI Feedback
Wenyi Xiao1* ,
Ziwei Huang1* ,
Leilei Gan1† ,
Wanggui He2
Haoyuan Li2 ,
Zhelun Yu2 ,
Fangxun Shu2 ,
Hao Jiang2 ,
Linchao Zhu1
1 Zhejiang University 2 Alibaba Group  
*Equal contribution   †Corresponding author
## Overview
This repository contains the official implementation of the paper "Detecting and Mitigating Hallucination in Large Vision Language Models via Fine-Grained AI Feedback".

## Getting Started
### Setup
```bash
git clone https://github.com/Mr-Loevan/HSA-DPO.git
cd HSA-DPO
pip install -r requirements.txt
```
### Dataset
```
pip install -U huggingface_hub
huggingface-cli download --repo-type dataset WenyiXiao/HSA-DPO
```
**For hallucination detection:** The image is sourced from [Visual Genome](https://homes.cs.washington.edu/~ranjay/visualgenome/api.html), and the training dataset can be found in `hsa_dpo_detection.jsonl`.
**For hallucination mitigation:** The image is located in `hsa_dpo_imgs.tar.gz`, and the preferences dataset is available in `hsa_dpo_preference_llava1dot5.jsonl`. Note that in llava1dot5, 'rejected' is generated by llava-v1.5.
### Model LoRA Weight
```
pip install -U modelscope
modelscope download --model xiaowenyi/HSA-DPO
```
Refer to [LLaVA repo](https://github.com/haotian-liu/LLaVA) to install inference requirements and use inference code.
### Training Code
The code is currently undergoing internal review. Please stay tuned!
## Todo List
- [x] paper
- [x] detection & mitigation datasets
- [x] model weights
- [ ] training code