Instructions to use ZhenbangDu/R2-dLLM-LLaDA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ZhenbangDu/R2-dLLM-LLaDA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ZhenbangDu/R2-dLLM-LLaDA", 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-LLaDA", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ZhenbangDu/R2-dLLM-LLaDA with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ZhenbangDu/R2-dLLM-LLaDA" # 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-LLaDA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ZhenbangDu/R2-dLLM-LLaDA
- SGLang
How to use ZhenbangDu/R2-dLLM-LLaDA 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-LLaDA" \ --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-LLaDA", "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-LLaDA" \ --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-LLaDA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ZhenbangDu/R2-dLLM-LLaDA with Docker Model Runner:
docker model run hf.co/ZhenbangDu/R2-dLLM-LLaDA
$R^2$-dLLM-LLaDA
$R^2$-dLLM is a unified framework for reducing decoding redundancy in Diffusion Large Language Models (dLLMs) from both inference and training perspectives. This specific checkpoint is a redundancy-aware supervised fine-tuned version of LLaDA-Instruct-8B.
- Paper: $R^2$-dLLM: Accelerating Diffusion Large Language Models via Spatio-Temporal Redundancy Reduction
- Code: Official GitHub Repository
Description
Diffusion Large Language Models (dLLMs) enable parallel token prediction but often suffer from high inference latency due to decoding redundancy. $R^2$-dLLM addresses this by:
- Inference-time rules: Aggregating local confidence and finalized predictions to avoid redundant decoding steps.
- Redundancy-aware SFT: Aligning the model with efficient decoding trajectories during training.
Experiments demonstrate that $R^2$-dLLM consistently reduces the number of decoding steps by up to 88% compared to existing decoding strategies, while maintaining competitive generation quality across different models and tasks.
Citation
@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
- 29