Files changed (1) hide show
  1. README.md +224 -0
README.md ADDED
@@ -0,0 +1,224 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ library_name: transformers
4
+ pipeline_tag: image-text-to-text
5
+ language:
6
+ - en
7
+ - zh
8
+ tags:
9
+ - Bard-VL
10
+ - MLLM
11
+ - vision-language
12
+ - multimodal
13
+ - discrete-diffusion
14
+ - masked-decoding
15
+ - custom_code
16
+ metrics:
17
+ - accuracy
18
+ ---
19
+
20
+ <h1 align="center">BARD: Bridging AutoRegressive and Diffusion Vision-Language Models Via Highly Efficient Progressive Block Merging and Stage-Wise Distillation</h1>
21
+
22
+ <p align="center">
23
+ <a href="https://github.com/cbyzju">Baoyou Chen</a><sup>1,3</sup> ·
24
+ <a href="https://github.com/1ring2rta">Hanchen Xia</a><sup>1</sup> ·
25
+ <a href="https://github.com/yhpengtu-rgb">Peng Tu</a><sup>1</sup> ·
26
+ <a href="https://github.com/Theseus-427">Haojun Shi</a><sup>1</sup> ·
27
+ <a href="https://github.com/AricGamma">Liwei Zhang</a><sup>1</sup> ·
28
+ <a href="https://github.com/weihaosky">Weihao Yuan</a><sup>4</sup> ·
29
+ <a href="https://sites.google.com/site/zhusiyucs/home">Siyu Zhu</a><sup>1,2,3,†</sup>
30
+ </p>
31
+
32
+ <p align="center">
33
+ <sup>1</sup>Shanghai Academy of AI for Science
34
+ &nbsp;&nbsp;·&nbsp;&nbsp;
35
+ <sup>2</sup>Shanghai Innovation Institute
36
+ &nbsp;&nbsp;·&nbsp;&nbsp;
37
+ <sup>3</sup>Fudan University
38
+ &nbsp;&nbsp;·&nbsp;&nbsp;
39
+ <sup>4</sup>Nanjing University
40
+ </p>
41
+
42
+ <p align="center">
43
+ 🤗 <a href="https://huggingface.co/fudan-generative-ai/Bard-VL-B16-Mask-4B-Distil-Instruct">Model</a>
44
+ &nbsp;&nbsp;|&nbsp;&nbsp;
45
+ 🏠 <a href="https://fudan-generative-vision.github.io/Bard-VL">Project Page</a>
46
+ &nbsp;&nbsp;|&nbsp;&nbsp;
47
+ 📑 <a href="https://huggingface.co/papers/2604.16514">Paper</a>
48
+ &nbsp;&nbsp;|&nbsp;&nbsp;
49
+ ✨ <a href="https://github.com/fudan-generative-vision/Bard-VL">Code</a>
50
+ </p>
51
+
52
+ <p align="center">
53
+ <img src="https://img.shields.io/badge/Params-4B-0ea5e9" alt="Params">
54
+ <img src="https://img.shields.io/badge/Input-Multimodal-10b981" alt="Input">
55
+ <img src="https://img.shields.io/badge/Decoding-Masked%20Diffusion-f59e0b" alt="Decoding">
56
+ <img src="https://img.shields.io/badge/Language-EN%20%7C%20ZH-8b5cf6" alt="Language">
57
+ <img src="https://img.shields.io/badge/License-MIT-64748b" alt="License">
58
+ </p>
59
+
60
+ <p align="center">
61
+ 🧠 Multimodal Understanding &nbsp;&nbsp;|&nbsp;&nbsp; 🧩 Blockwise Denoising &nbsp;&nbsp;|&nbsp;&nbsp; ⚡ Diffusion-Style Decoding
62
+ </p>
63
+
64
+ # Bard-VL-B16-Mask-4B-Distil-Instruct
65
+
66
+ **Bard-VL-B16-Mask-4B-Distil-Instruct** is a 4B-class distilled multimodal instruction model with **masked discrete-diffusion-style decoding**.
67
+
68
+ It is part of the **BARD-VL** family and is designed to bridge autoregressive and diffusion-style multimodal large language models through **Progressive Block Merging (PBM)** and **Stage-Wise Distillation (SWD)**.
69
+
70
+ Compared with a standard autoregressive VLM release style, Bard-VL emphasizes:
71
+
72
+ - **a distilled design for stronger efficiency-quality tradeoffs under larger block sizes**
73
+ - **masked / diffusion-style decoding**
74
+ - **controllable response generation through blockwise denoising**
75
+ - **multimodal understanding under a unified visual-language interface**
76
+
77
+ ---
78
+
79
+ ## ✨ Highlights
80
+
81
+ - **Discrete Diffusion MLLM**: Bard-VL replaces standard left-to-right decoding with masked blockwise denoising.
82
+ - **PBM + SWD**: the BARD family combines progressive block merging and stage-wise distillation to bridge AR and diffusion VLMs.
83
+ - **Distilled Variant**: this checkpoint is tuned for a stronger efficiency-quality tradeoff when running with larger block sizes.
84
+ - **Multimodal Understanding**: Bard-VL is built as a general visual-language model rather than a modality-specific demo.
85
+ - **Controllable Decoding**: generation quality and speed can be controlled through `block_size`, `denoising_steps`, and remasking strategy.
86
+
87
+ ---
88
+
89
+ ## 📊 Evaluation Results
90
+
91
+ ### AutoRegressive Vision-Language Models
92
+
93
+ | Model | Parameters | MMMU<sub>val</sub> | MMMU-Pro<sub>standard</sub> | MME<sub>sum</sub> | RealWorldQA | MMStar | AI2D | ChartQA |
94
+ |---|---:|---:|---:|---:|---:|---:|---:|---:|
95
+ | Qwen3-VL | 4B | 47.9 | 35.0 | 2297 | 70.5 | 56.9 | 81.0 | 80.9 |
96
+ | Qwen3-VL | 8B | 53.0 | 36.0 | 2379 | 69.5 | 59.9 | 83.5 | 84.0 |
97
+ | InternVL3.5 | 4B | 57.4 | 38.2 | 2236 | 66.7 | 65.6 | 80.6 | 86.2 |
98
+ | InternVL3.5 | 8B | 57.2 | 41.0 | 2359 | 63.1 | 66.3 | 82.1 | 87.0 |
99
+
100
+ ### Diffusion Vision-Language Models
101
+
102
+ | Model | Parameters | MMMU<sub>val</sub> | MMMU-Pro<sub>standard</sub> | MME<sub>sum</sub> | RealWorldQA | MMStar | AI2D | ChartQA |
103
+ |---|---:|---:|---:|---:|---:|---:|---:|---:|
104
+ | LLaDA-V | 8B | 48.8 | 35.4 | 1998 | 63.4 | 60.4 | 77.8 | 78.2 |
105
+ | Dream-VL | 7B | 51.6 | 25.0 | 2179 | 67.7 | 59.9 | 80.4 | 86.2 |
106
+ | LaviDa | 8B | 44.2 | 28.6 | 1711 | 40.3 | 47.0 | 70.1 | 64.6 |
107
+ | SDAR-VL | 8B | 44.0 | 28.2 | 2142 | 66.1 | 53.3 | 79.6 | 82.4 |
108
+ | MMaDA | 8B | 30.2 | 21.5 | 1287 | 28.2 | 25.7 | 54.9 | 43.2 |
109
+ | Dimple-VL | 7B | 46.4 | 24.1 | 1924 | 51.9 | 47.7 | 74.2 | 58.4 |
110
+
111
+ ### BARD-VL Converted from Qwen3-VL
112
+
113
+ | Model | Parameters | MMMU<sub>val</sub> | MMMU-Pro<sub>standard</sub> | MME<sub>sum</sub> | RealWorldQA | MMStar | AI2D | ChartQA |
114
+ |---|---:|---:|---:|---:|---:|---:|---:|---:|
115
+ | BARD-VL (*B* = 32) | 2B | 42.0 | 27.9 | 2045 | 64.6 | 53.1 | 72.6 | 76.8 |
116
+ | BARD-VL (*B* = 32) | 4B | 53.0 | 34.2 | 2305 | 71.9 | 63.6 | 82.8 | 80.2 |
117
+ | BARD-VL (*B* = 32) | 8B | 54.6 | 37.6 | 2393 | 70.7 | 65.0 | 83.2 | 84.6 |
118
+
119
+ ---
120
+
121
+ ## 🛠️ Environment
122
+
123
+ Make sure your environment includes versions close to the following:
124
+
125
+ ```bash
126
+ transformers>=4.46
127
+ torch>=2.5
128
+ accelerate>=1.6
129
+ python>=3.10
130
+ ```
131
+
132
+ Recommended runtime settings in the local repository:
133
+
134
+ ```bash
135
+ dtype = bfloat16
136
+ attn_implementation = sdpa
137
+ block_size = 16
138
+ denoising_steps = 16
139
+ ```
140
+
141
+ ---
142
+
143
+ ## 🚀 Inference Example
144
+
145
+ ```python
146
+ import torch
147
+ from transformers import AutoProcessor, AutoModel
148
+ from PIL import Image
149
+
150
+ model_name = "fudan-generative-ai/Bard-VL-B16-Mask-4B-Distil-Instruct"
151
+
152
+ processor = AutoProcessor.from_pretrained(
153
+ model_name,
154
+ trust_remote_code=True,
155
+ )
156
+
157
+ model = AutoModel.from_pretrained(
158
+ model_name,
159
+ torch_dtype=torch.bfloat16,
160
+ trust_remote_code=True,
161
+ )
162
+
163
+ messages = [
164
+ {
165
+ "role": "system",
166
+ "content": "You are a helpful assistant.",
167
+ },
168
+ {
169
+ "role": "user",
170
+ "content": [
171
+ {"type": "image", "image": "assets/puzzle.jpg"},
172
+ {"type": "text", "text": "Please describe this image and explain the key visual evidence."},
173
+ ],
174
+ },
175
+ ]
176
+
177
+ text = processor.apply_chat_template(
178
+ messages,
179
+ tokenize=False,
180
+ add_generation_prompt=True,
181
+ )
182
+
183
+ inputs = processor(
184
+ text=[text],
185
+ images=[Image.open("assets/puzzle.jpg").convert("RGB")],
186
+ return_tensors="pt",
187
+ )
188
+
189
+ input_ids = inputs.pop("input_ids")
190
+
191
+ outputs = model.generate(
192
+ input_ids=input_ids,
193
+ max_new_tokens=512,
194
+ block_size=16,
195
+ denoising_steps=16,
196
+ temperature=0.0,
197
+ top_k=0,
198
+ top_p=1.0,
199
+ remasking_strategy="low_confidence_dynamic",
200
+ confidence_threshold=0.5,
201
+ **inputs,
202
+ )
203
+
204
+ generation = processor.tokenizer.decode(
205
+ outputs[0][len(input_ids[0]):].tolist(),
206
+ skip_special_tokens=True,
207
+ )
208
+
209
+ print(generation)
210
+ ```
211
+
212
+
213
+ ---
214
+
215
+ ## 📚 Citation
216
+
217
+ ```bibtex
218
+ @article{chen2026bard,
219
+ title={BARD: Bridging AutoRegressive and Diffusion Vision-Language Models Via Highly Efficient Progressive Block Merging and Stage-Wise Distillation},
220
+ author={Baoyou Chen and Hanchen Xia and Peng Tu and Haojun Shi and Liwei Zhang and Weihao Yuan and Siyu Zhu},
221
+ journal={arXiv preprint arXiv:2604.16514},
222
+ year={2026}
223
+ }
224
+ ```