Instructions to use tsunghanwu/reverse_qwen25_vl with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tsunghanwu/reverse_qwen25_vl with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="tsunghanwu/reverse_qwen25_vl") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("tsunghanwu/reverse_qwen25_vl") model = AutoModelForImageTextToText.from_pretrained("tsunghanwu/reverse_qwen25_vl") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use tsunghanwu/reverse_qwen25_vl with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tsunghanwu/reverse_qwen25_vl" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tsunghanwu/reverse_qwen25_vl", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/tsunghanwu/reverse_qwen25_vl
- SGLang
How to use tsunghanwu/reverse_qwen25_vl with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "tsunghanwu/reverse_qwen25_vl" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tsunghanwu/reverse_qwen25_vl", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "tsunghanwu/reverse_qwen25_vl" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tsunghanwu/reverse_qwen25_vl", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use tsunghanwu/reverse_qwen25_vl with Docker Model Runner:
docker model run hf.co/tsunghanwu/reverse_qwen25_vl
REVERSE-Qwen2.5-VL-3B
Model Summary
REVERSE-Qwen2.5-VL-3B is a novel open-source vision-language model (VLM) that performs both next-token predictioin and self-verification / self-correction during the generation process. Built on top of Qwen2.5-VL-3B-Instruct, it is fine-tuned using the 100k-subset of REVERSE Visual Instruct 1.3M dataset and equipped with a retrospective resampling mechanism that allows it to detect and correct hallucinations during generation. The model is trained in early May, 2025.
Performance
REVERSE achieves state-of-the-art hallucination reduction across diverse captioning and open-ended visual question answering benchmarks. To ensure the apple-to-apple comparison, we fine-tune the released Qwen2.5-VL-3B model using both the LLaVA-FT setup and our REVERSE recipe, applying both on the same 100k subset. This allows us to directly compare the impact of our method against the LLaVA-FT baseline under consistent conditions as the Qwen2.5-VL's instruction tuning data is not publicly available.
| Benchmark | Metric | Qwen2.5-VL-FT | REVERSE (Ï„=0.01) |
|---|---|---|---|
| CHAIR-MSCOCO | CHAIRi (↓) | 12.2 | 10.5 |
| CHAIRs (↓) | 45.8 | 39.4 | |
| AMBER-G | CHAIR (↓) | 7.7 | 7.5 |
| Coverage (↑) | 51.7 | 51.5 | |
| MMHal-Bench | Score (↑) | 2.89 | 3.15 |
| Hallucination Rate (↓) | 0.43 | 0.29 | |
| HaloQuest | Avg. Accuracy (↑) | 33.5 | 45.1 |
| False Premise Acc. (↑) | 25.4 | 42.9 | |
| Visual Challenging Acc. (↑) | 51.6 | 41.8 | |
| Insufficient Context Acc. (↑) | 26.4 | 55.5 |
It also performs competitively on discriminative tasks compared with the base VLM.
| Benchmark | Metric | Qwen2.5-VL-FT | REVERSE (Ï„=0.5) |
|---|---|---|---|
| AMBER-D | F1 Score (↑) | 85.0 | 85.7 |
| POPE | F1 Score (↑) | 87.1 | 86.5 |
| MME-Hall | Score (↑) | 550.4 | 589.5 |
Usage
Please refer to the installation guide on GitHub to get started:
👉 Installation Guide
Additional Resources
- 📄 Project Page: https://reverse-vlm.github.io/
- 🧾 Dataset: REVERSE Visual Instruct 1.3M
- 🔧 Ask Questions: GitHub Issues
Intended Use
Primary Use Cases:
- Reducing hallucination in image captioning and VQA tasks
- Benchmarking hallucination-aware generation
- Research on grounded vision-language generation and self-correction
Target Users:
Researchers, developers, and students working in computer vision, NLP, and multimodal AI.
- Downloads last month
- 18
Model tree for tsunghanwu/reverse_qwen25_vl
Base model
Qwen/Qwen2.5-VL-3B-Instruct