Instructions to use ZhenbangDu/R2-dLLM-Dream with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ZhenbangDu/R2-dLLM-Dream with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ZhenbangDu/R2-dLLM-Dream", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ZhenbangDu/R2-dLLM-Dream", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ZhenbangDu/R2-dLLM-Dream with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ZhenbangDu/R2-dLLM-Dream" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ZhenbangDu/R2-dLLM-Dream", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ZhenbangDu/R2-dLLM-Dream
- SGLang
How to use ZhenbangDu/R2-dLLM-Dream 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 "ZhenbangDu/R2-dLLM-Dream" \ --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": "ZhenbangDu/R2-dLLM-Dream", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "ZhenbangDu/R2-dLLM-Dream" \ --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": "ZhenbangDu/R2-dLLM-Dream", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ZhenbangDu/R2-dLLM-Dream with Docker Model Runner:
docker model run hf.co/ZhenbangDu/R2-dLLM-Dream
$R^2$-dLLM-Dream
This repository contains the $R^2$-dLLM-Dream model, an accelerated Diffusion Large Language Model (dLLM) introduced in the paper $R^2$-dLLM: Accelerating Diffusion Large Language Models via Spatio-Temporal Redundancy Reduction.
$R^2$-dLLM is a unified framework for reducing decoding redundancy in dLLMs from both inference and training perspectives. This specific checkpoint is a redundancy-aware supervised fine-tuned (SFT) version based on Dream-v0-Instruct-7B.
- Code: GATECH-EIC/R2-dLLM
- Paper: arXiv:2604.18995
Summary
Diffusion Large Language Models (dLLMs) enable parallel token prediction but often suffer from high inference latency due to recurring spatial and temporal redundancy during decoding. $R^2$-dLLM addresses this through:
- Inference-time decoding rules: Training-free rules that aggregate local confidence and finalize temporally stable tokens to avoid redundant decoding steps.
- Redundancy-aware SFT: A fine-tuning pipeline that aligns the model with efficient decoding trajectories.
Experiments demonstrate that $R^2$-dLLM can reduce the number of decoding steps by up to 88% compared to existing strategies while maintaining competitive generation quality.
Citation
If you find this work useful for your research, please cite:
@article{du2026r,
title={$R^{2}$-dLLM: Accelerating Diffusion Large Language Models via Spatio-Temporal Redundancy Reduction},
author={Du, Zhenbang and Xia, Kejing and Zhong, Xinrui and Fu, Yonggan and Oswald, Nicolai and Ji, Binfei and Khailany, Brucek and Molchanov, Pavlo and Lin, Yingyan},
journal={arXiv preprint arXiv:2604.18995},
year={2026}
}
- Downloads last month
- 48
Model tree for ZhenbangDu/R2-dLLM-Dream
Base model
Dream-org/Dream-v0-Instruct-7B