MSALab-PKU
PerceptionDLM
Python✨ New

Official Repo For PerceptionDLM Codebase

Last updated Jul 6, 2026
73
Stars
4
Forks
0
Issues
+2
Stars/day
Attention Score
59
Language breakdown
Python 99.4%
Jupyter Notebook 0.5%
CSS 0.0%
Shell 0.0%
Makefile 0.0%
HTML 0.0%
β–Έ Files click to expand
README

PerceptionDLM

Parallel Region Perception with Multimodal Diffusion Language Models

Paper Project Page Hugging Face Models Hugging Face Dataset Hugging Face Benchmark Code License

Highlights β€’ News β€’ Installation β€’ Models & Datasets β€’ Quick Start β€’ Training β€’ Evaluation β€’ Citation

PerceptionDLM teaser

🎬 Demos

Parallel region captioning in action β€” given multiple masks, PerceptionDLM describes all regions simultaneously in a single denoising pass:

https://github.com/user-attachments/assets/cd078bbc-d24b-4c55-b8ee-4ac86685d831

https://github.com/user-attachments/assets/269b186c-468b-49f4-b25a-88f1be3d8bdf

If the videos do not play inline, click to view: demo 0 Β· demo 1.

PerceptionDLM is a multimodal diffusion language model optimized for efficient parallel region perception. Built upon a strong foundational baseline (PerceptionDLM-Base), it fully leverages the parallel decoding nature of diffusion language models (DLMs): given an image and multiple region masks, it generates descriptions for all regions simultaneously within a single denoising process β€” avoiding the linear latency growth of autoregressive (AR) region captioners.

✨ Highlights

  • 🧩 Parallel region captioning. Describe many masked regions in a single denoising pass, achieving up to 3.4Γ— throughput speedup in dense multi-region scenarios.
  • πŸ† Strong diffusion VLM baseline. PerceptionDLM-Base outperforms LLaDA-V on 15 / 16 multimodal benchmarks, establishing a new state of the art among open discrete diffusion VLMs.
  • πŸ“Š New benchmark β€” ParaDLC-Bench. A multi-region localized captioning benchmark that jointly evaluates caption quality and inference efficiency.
  • πŸ” Fully open. Code, model weights, training data recipe, and evaluation suite are released.
PerceptionDLM architecture

πŸ“° News

  • [2026-6] πŸŽ‰ PerceptionDLM is released! Paper, code, models, and ParaDLC-Bench are now public.

πŸ“¦ Installation

We use uv for fast and reproducible Python environment management.

# 1. Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

2. Clone the repository

git clone https://github.com/MSALab-PKU/PerceptionDLM.git cd PerceptionDLM

3. Sync the environment for the model you want to use

uv sync --extra=dmllm # for PerceptionDLM-Base uv sync --extra=pdmllm # for PerceptionDLM (parallel region perception)

After syncing, activate the virtual environment (e.g., source .venv/bin/activate).

πŸ€— Models & Datasets

| Type | Name | Link | | :--- | :--- | :--- | | Model | PerceptionDLM-Base (8B) | πŸ€— MSALab/PerceptionDLM-Base | | Model | PerceptionDLM (8B) | πŸ€— MSALab/PerceptionDLM | | Backbone | LLaDA-8B-Instruct (HF format) | πŸ€— MSALab/LLaDA-8B-Instruct-HF | | Data | PerceptionDLM-Data (training data) | πŸ€— MSALab/PerceptionDLM-Data | | Benchmark | ParaDLC-Bench | πŸ€— MSALab/ParaDLC-Bench Β· evaluation/ParaDLC-Bench |

πŸš€ Quick Start

Run direct inference on the provided sample images in assets/.

PerceptionDLM-Base (image-level understanding)

python demo/infer_dmllm.py \
  --model-path MSALab/PerceptionDLM-Base \
  --image assets/demo.jpg \
  --prompt "What color shirt is the man in the picture wearing?" \
  --gen-length 64 --block-length 64 --steps 64

PerceptionDLM (parallel region captioning)

Generate captions for one or more binary masks in parallel:

python demo/infer_pdmllm.py \
  --model-path MSALab/PerceptionDLM \
  --image assets/demo.jpg \
  --masks assets/demomask0.jpg \
          assets/demomask1.jpg \
          assets/demomask2.jpg \
  --gen-length 32 --steps 32 --temperature 0.0 --top-p 1.0
πŸ’‘ A web demo is also available under demo/gradio.

πŸ“š Data Preparation

Download the datasets from Hugging Face and organize them as shown below:

./
β”œβ”€β”€ datasets/                              # PerceptionDLM-Base (4-stage) training data
β”‚   β”œβ”€β”€ Bee-Training-Data-Stage1/
β”‚   β”œβ”€β”€ Bee-Training-Data-Stage2/
β”‚   β”œβ”€β”€ LLaVA-OneVision-1.5-Instruct-Data/
β”‚   └── Honey-Data-15M/
β”œβ”€β”€ annotations/                           # region mask/caption annotations (PerceptionDLM)
β”‚   β”œβ”€β”€ dam_dataset.json
β”‚   β”œβ”€β”€ coconut_dataset.json
β”‚   └── sam_dataset.json
└── images/                                # corresponding image files
πŸ“„ For detailed dataset formats and config structures, see datasets.md.

Model Conversion (optional)

To train from the original LLaDA weights, convert them to our format first (or simply use the pre-converted MSALab/LLaDA-8B-Instruct-HF on Hugging Face, which is the default in all configs):

python scripts/convert.py \
  --model_path /path/to/LLaDA-8B-Instruct \
  --output /path/to/LLaDA-8B-Instruct-HF

πŸ‹οΈ Training

Training configurations (data configs and train configs) live in the configs/ directory.

export WANDBAPIKEY="yourwandbapikeyhere"

Example: 8 GPUs per node

bash scripts/dmllmmultirun.sh train <dataconfig> <trainingconfig> 8

Reproducing our training setup

  • PerceptionDLM-Base: full 4-stage pipeline on 32Γ— NVIDIA H100 (80GB) GPUs (~3 weeks total).
  • PerceptionDLM: initialized from PerceptionDLM-Base and trained on the full ParaCaption corpus in ~2 days on 32Γ— H100.
See datasets.md and the paper appendix for the exact per-stage hyper-parameters.

πŸ“ˆ Evaluation

We provide a comprehensive evaluation suite covering both Multimodal Benchmarks (via VLMEvalKit) and Dense Grounded Captioning (ParaDLC-Bench & DLC-Bench). Our ParaDLC-Bench is available on Hugging Face: πŸ€— MSALab/ParaDLC-Bench.

πŸ‘‰ See the dedicated Evaluation Guide for setup, commands, and judge configuration.

πŸ“Š Main Results

PerceptionDLM-Base β€” General Multimodal Understanding

PerceptionDLM-Base establishes a strong open diffusion VLM baseline, outperforming LLaDA-V on 15 / 16 benchmarks and staying competitive with leading AR VLMs at the same scale.

PerceptionDLM-Base multimodal benchmark comparison

Bold = best score in each row. "–" = not reported; $^\dagger$ / $^\star$ = re-evaluated by us (official scripts / VLMEvalKit). See the paper for the full protocol.

PerceptionDLM β€” Parallel Region Perception

PerceptionDLM achieves a strong accuracy–efficiency trade-off on multi-region captioning:

| Method | Type | ParaDLC-Bench Avg (%) | TPF ↑ | Time (s) ↓ | | :--- | :--- | :---: | :---: | :---: | | GAR-8B | AR (sequential) | 69.5 | 1.0 | 479 | | LLaDA-V-8B | Diffusion | 35.2 | 1.0 | 3241 | | PerceptionDLM-8B | Diffusion (parallel) | 62.4 | 2.9 | 276 |

TPF = Tokens Per Forward (higher means more parallel). Full tables are reported in the paper.

πŸ™ Acknowledgements

This project builds upon the excellent work of LLaDA, LLaVA, VLMEvalKit, DAM, and GAR. We thank the authors of the Open-Bee and LLaVA-OneVision-1.5 datasets for their open contributions.

πŸ“ Citation

If you find PerceptionDLM useful for your research, please consider citing:

@article{sun2026perceptiondlm,
  title   = {PerceptionDLM: Parallel Region Perception with Multimodal Diffusion Language Models},
  author  = {Sun, Yueyi and Wang, Yuhao and Li, Jason and Tian, Ye and Zhang, Tao and Mai, Jacky and Wang, Yihan and Wang, Haochen and Bai, Jinbin and Yang, Ling and Tong, Yunhai},
  journal = {arXiv preprint arXiv:2606.19534},
  year    = {2026},
  eprint  = {2606.19534},
  archivePrefix = {arXiv},
  primaryClass  = {cs.CV},
  url     = {https://arxiv.org/abs/2606.19534}
}

πŸ“„ License

This project is released under the Apache License 2.0.

Β© 2026 GitRepoTrend Β· MSALab-PKU/PerceptionDLM Β· Updated daily from GitHub