Image-Text-to-Text
Transformers
Safetensors
diffusionvl_qwenvl
text-generation
diffusion
vision-language
document-recognition
qwen2.5-vl
block-diffusion
conversational
custom_code
Instructions to use MingxuChai/PA-BDM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MingxuChai/PA-BDM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="MingxuChai/PA-BDM", trust_remote_code=True) 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 AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("MingxuChai/PA-BDM", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use MingxuChai/PA-BDM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MingxuChai/PA-BDM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MingxuChai/PA-BDM", "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/MingxuChai/PA-BDM
- SGLang
How to use MingxuChai/PA-BDM 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 "MingxuChai/PA-BDM" \ --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": "MingxuChai/PA-BDM", "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 "MingxuChai/PA-BDM" \ --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": "MingxuChai/PA-BDM", "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 MingxuChai/PA-BDM with Docker Model Runner:
docker model run hf.co/MingxuChai/PA-BDM
Overwrite PA-BDM model files
Browse files- README.md +43 -31
- model-00001-of-00002.safetensors +1 -1
- model-00002-of-00002.safetensors +1 -1
README.md
CHANGED
|
@@ -3,70 +3,82 @@ license: apache-2.0
|
|
| 3 |
tags:
|
| 4 |
- diffusion
|
| 5 |
- vision-language
|
| 6 |
-
- document-recognition
|
| 7 |
- qwen2.5-vl
|
| 8 |
-
- block-diffusion
|
| 9 |
pipeline_tag: image-text-to-text
|
| 10 |
library_name: transformers
|
| 11 |
---
|
| 12 |
|
|
|
|
| 13 |
<div align="center">
|
| 14 |
|
| 15 |
-
<h1>
|
|
|
|
|
|
|
| 16 |
|
| 17 |
-
**
|
| 18 |
|
| 19 |
-
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
<a href="https://huggingface.co/
|
| 24 |
|
| 25 |
</div>
|
| 26 |
|
| 27 |
## π° News
|
| 28 |
|
| 29 |
-
- **[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
## π Introduction
|
| 32 |
|
| 33 |
-
|
| 34 |
|
| 35 |
-
**
|
| 36 |
|
| 37 |
## β¨ Highlights
|
| 38 |
|
| 39 |
-
- **
|
| 40 |
|
| 41 |
-
- **
|
| 42 |
|
| 43 |
-
- **
|
| 44 |
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
-
## π
|
| 48 |
|
| 49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
-
- GitHub: https://github.com/SII-sc22mc/PA-BDM
|
| 52 |
-
- Model: https://huggingface.co/MingxuChai/PA-BDM
|
| 53 |
-
- Paper: https://arxiv.org/pdf/2605.16861
|
| 54 |
|
| 55 |
## β€οΈ Acknowledgements
|
| 56 |
|
| 57 |
-
This
|
| 58 |
|
| 59 |
## π Citation
|
| 60 |
-
|
| 61 |
If you find our work useful, please cite our paper:
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
eprint={2605.16861},
|
| 69 |
archivePrefix={arXiv},
|
| 70 |
primaryClass={cs.CV},
|
| 71 |
-
url={https://arxiv.org/abs/
|
| 72 |
-
}
|
|
|
|
|
|
| 3 |
tags:
|
| 4 |
- diffusion
|
| 5 |
- vision-language
|
|
|
|
| 6 |
- qwen2.5-vl
|
|
|
|
| 7 |
pipeline_tag: image-text-to-text
|
| 8 |
library_name: transformers
|
| 9 |
---
|
| 10 |
|
| 11 |
+
|
| 12 |
<div align="center">
|
| 13 |
|
| 14 |
+
<h1>DiffusionVL: Translating Any Autoregressive Models into <br> Diffusion Vision Language Models</h1>
|
| 15 |
+
|
| 16 |
+
**_SOTA dVLM Performance with <5% Data & 2.0Γ Inference Speedup!_**
|
| 17 |
|
| 18 |
+
[Lunbin Zeng](https://github.com/xiazhi1)<sup>1,\*</sup>, [Jingfeng Yao](https://github.com/JingfengYao)<sup>1,\*</sup>, [Bencheng Liao](https://github.com/LegendBC)<sup>1</sup>, [Hongyuan Tao](https://github.com/Hongyuan-Tao)<sup>1</sup>, [Wenyu Liu](https://scholar.google.com/citations?user=D7jDk7gAAAAJ&hl=en)<sup>1</sup>, [Xinggang Wang](https://xwcv.github.io)<sup>1, βοΈ</sup>
|
| 19 |
|
| 20 |
+
<sup>1</sup>Huazhong University of Science and Technology
|
| 21 |
|
| 22 |
+
<sup>*</sup>equal contribution, <sup>βοΈ</sup>corresponding author, xgwang@hust.edu.cn
|
| 23 |
+
|
| 24 |
+
[](https://arxiv.org/abs/2512.15713) [](https://huggingface.co/papers/2512.15713) <a href="https://github.com/hustvl/DiffusionVL"><img src="https://img.shields.io/badge/GitHub-Repository-black?logo=github" alt="GitHub"></a> <a href="https://huggingface.co/collections/hustvl/diffusionvl"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Models-blue" alt="Hugging Face"></a>
|
| 25 |
|
| 26 |
</div>
|
| 27 |
|
| 28 |
## π° News
|
| 29 |
|
| 30 |
+
- **[2025.12.25]** π We have completed our release plan ahead of schedule. **DiffusionVL is now fully open-sourced.** Merry Christmas to the community!
|
| 31 |
+
- **[2025.12.18]** π Our paper **DiffusionVL** is released on arXiv! We also release the DiffusionVL models translated from Qwen2.5VL on Hugging Face.
|
| 32 |
+
|
| 33 |
+
## π Release Plan
|
| 34 |
+
- [x] Release paper
|
| 35 |
+
- [x] Release DiffusionVL model weights (translated from AR-VLMs)
|
| 36 |
+
- [x] Release DiffusionVL model weights (translated from AR-LMs)
|
| 37 |
+
- [x] Release evaluation code
|
| 38 |
+
- [x] Release training code
|
| 39 |
|
| 40 |
## π Introduction
|
| 41 |
|
| 42 |
+
The diffusion paradigm has emerged as a promising alternative to autoregressive (AR) models, offering the potential for efficient parallel decoding. However, existing diffusion vision language models (dVLMs) largely lag behind mainstream autoregressive vision language models in performance, primarily due to the capability limitations of their base diffusion language models.
|
| 43 |
|
| 44 |
+
DiffusionVL bridges this gap by answering a fundamental question: ***Can we directly translate any existing autoregressive models into powerful diffusion vision language models?*** We propose a diffusion finetuning framework that "translates" any pretrained AR model into a diffusion vision language model through a simple paradigm shift and modality shift. Unlike prior dVLMs restricted by fixed generation lengths, DiffusionVL introduces a novel block decoding strategy. This allows for arbitrary-length generation and KV-cache reuse. With this integrated design, despite training with less than 5% of the training data required by previous methods, DiffusionVL translated from AR-VLMs achieves a state-of-the-art performance among exsiting dVLMs and delivers a 2.0Γ inference speedup.
|
| 45 |
|
| 46 |
## β¨ Highlights
|
| 47 |
|
| 48 |
+
- **Universal Translation Framework:** Translate any AR models into dVLMs with a simple yet effective approach.
|
| 49 |
|
| 50 |
+
- **Superior Performance:** Achieve SOTA dVLM performance using <5% training data (738K vs 16.5M samples).
|
| 51 |
|
| 52 |
+
- **2.0Γ Faster Inference:** Block decoding strategy enables KV-cache reuse and 2.0Γ speedup over previous dVLMs.
|
| 53 |
|
| 54 |
+
<div align="center">
|
| 55 |
+
<img src="https://github.com/hustvl/DiffusionVL/raw/main/assets/benchmark.png" alt="Benchmark Image" width="800">
|
| 56 |
+
<img src="https://github.com/hustvl/DiffusionVL/raw/main/assets/framework.png" alt="Framework" width="800">
|
| 57 |
+
</div>
|
| 58 |
|
| 59 |
+
## π Get Started
|
| 60 |
|
| 61 |
+
| Document | Description |
|
| 62 |
+
| :--- | :--- |
|
| 63 |
+
| [Installation](https://github.com/hustvl/DiffusionVL/raw/main/docs/INSTALLATION.md) | Environment setup, data and model preparation |
|
| 64 |
+
| [Training & Evaluation](https://github.com/hustvl/DiffusionVL/raw/main/docs/TRAINING_EVALUATION.md) | Train and evaluate DiffusionVL models |
|
| 65 |
+
| [Inference](https://github.com/hustvl/DiffusionVL/raw/main/docs/INFERENCE.md) | Quick inference with pre-trained models |
|
| 66 |
|
|
|
|
|
|
|
|
|
|
| 67 |
|
| 68 |
## β€οΈ Acknowledgements
|
| 69 |
|
| 70 |
+
This repo is mainly built on [Qwen2.5-VL](https://github.com/QwenLM/Qwen3-VL), [LLaDA-V](https://github.com/ML-GSAI/LLaDA-V), [BD3LMs](https://github.com/kuleshov-group/bd3lms) and [SDAR](https://github.com/JetAstra/SDAR), [lmms-eval](https://github.com/EvolvingLMMs-Lab/lmms-eval). We thank the authors for their open-source contributions.
|
| 71 |
|
| 72 |
## π Citation
|
|
|
|
| 73 |
If you find our work useful, please cite our paper:
|
| 74 |
+
```
|
| 75 |
+
@misc{zeng2025diffusionvltranslatingautoregressivemodels,
|
| 76 |
+
title={DiffusionVL: Translating Any Autoregressive Models into Diffusion Vision Language Models},
|
| 77 |
+
author={Lunbin Zeng and Jingfeng Yao and Bencheng Liao and Hongyuan Tao and Wenyu Liu and Xinggang Wang},
|
| 78 |
+
year={2025},
|
| 79 |
+
eprint={2512.15713},
|
|
|
|
| 80 |
archivePrefix={arXiv},
|
| 81 |
primaryClass={cs.CV},
|
| 82 |
+
url={https://arxiv.org/abs/2512.15713},
|
| 83 |
+
}
|
| 84 |
+
```
|
model-00001-of-00002.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4957560304
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:90d09331c2cf6cc632a2677ab85a7b262b428eb230db75b913c04f9cd8e3178b
|
| 3 |
size 4957560304
|
model-00002-of-00002.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3174117400
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f5be4c3a6e9f8e42699b1d6d27bb13fffc65532d0d1c37e3852aba99d60ba991
|
| 3 |
size 3174117400
|