[ICLR'26] Official code of paper "d2Cache: Accelerating Diffusion-based LLMs via Dual Adaptive Caching"
Python
188
34 commits
updated May 14, 2026
Codebase for Diffusion Language Models Research
Research dLLM is a research-focused library for Diffusion Language Models (dLLMs), providing a comprehensive collection of baseline methods (primarily KV caching and decoding strategies) for reproducible experiments.
[25/9/30] We released code reading guides, hoping this can help you to grasp our work :)
[25/10/13] Now, batch inference is supported!
[25/12/6] 🚀 We are looking for help to reproduce our experimental results using A100 GPUs. Please contact us if you can assist with the benchmarking.
[26/5/2] We now support SDAR series models, more block diffusion dLLMs will be added in the future!
The following models are supported out-of-the-box:
| Model | Paper | Original Code Repo |
|---|---|---|
LLaDA-8B (llada-base, llada-inst) | ||
LLaDA-1.5 (llada-1.5) | ||
Dream-v0-7B (dream-base, dream-inst) | ||
SDAR-8B (sdar-8b-chat) |
The corresponding usages can be found here.
| Method | Paper | Original Code Repo |
|---|---|---|
| PrefixCache / DualCache | | |
| dLLM Cache | | |
| d2Cache | | This Repo |
| BlockDiffusion Cache | |
The corresponding usages can be found here.
| Method | Paper | Original Code Repo |
|---|---|---|
| Auto-regressive | - | - |
| Vanilla / Semi-AR | ||
| Parallel | | |
| PC-Sampler | ||
| Certainty Prior Decoding | | This Repo |
| KLASS | ||
| EB-Sampler | Not release | |
| WINO | |
# Create and activate the environment
conda create -n d2cache python=3.11 -y
conda activate d2cache
# Install dependencies
pip install -r requirements/common.txt
# Prepare dotenv file, and set model path manually
cp .env.example .env
Please check docs/ for detailed instructions on how to run evaluations with different methods. A quick example is shown in srcipts/run_eval.sh.
Available models:
Available datasets:
lm-eval are available)[!IMPORTANT] To evaluate humaneval dataset on Dream-v0-Instruct-7B, please use its corresponding instruct variants, i.e.,
humaneval_instruct.
Additional general arguments can be specified in configs/generation/*.yaml. If gen_args_script is provided, dynamic defaults will be loaded from that script.
If you find d²Cache or this repository useful for your research and applications, please cite using this BibTeX:
@article{jiang2025d2cache,
title={d $\^{} 2$ Cache: Accelerating Diffusion-Based LLMs via Dual Adaptive Caching},
author={Jiang, Yuchu and Cai, Yue and Luo, Xiangzhong and Fu, Jiale and Wang, Jiarui and Liu, Chonghan and Yang, Xu},
journal={arXiv preprint arXiv:2509.23094},
year={2025}
}
We would like to thank the authors of all models and baseline methods for their excellent work and open-source contributions.
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.
34 commits
Python
99.8%
[ICLR'26] Official code of paper "d2Cache: Accelerating Diffusion-based LLMs via Dual Adaptive Caching"
Python
188
34 commits
updated May 14, 2026
Codebase for Diffusion Language Models Research
Research dLLM is a research-focused library for Diffusion Language Models (dLLMs), providing a comprehensive collection of baseline methods (primarily KV caching and decoding strategies) for reproducible experiments.
[25/9/30] We released code reading guides, hoping this can help you to grasp our work :)
[25/10/13] Now, batch inference is supported!
[25/12/6] 🚀 We are looking for help to reproduce our experimental results using A100 GPUs. Please contact us if you can assist with the benchmarking.
[26/5/2] We now support SDAR series models, more block diffusion dLLMs will be added in the future!
The following models are supported out-of-the-box:
| Model | Paper | Original Code Repo |
|---|---|---|
LLaDA-8B (llada-base, llada-inst) | ||
LLaDA-1.5 (llada-1.5) | ||
Dream-v0-7B (dream-base, dream-inst) | ||
SDAR-8B (sdar-8b-chat) |
The corresponding usages can be found here.
| Method | Paper | Original Code Repo |
|---|---|---|
| PrefixCache / DualCache | | |
| dLLM Cache | | |
| d2Cache | | This Repo |
| BlockDiffusion Cache | |
The corresponding usages can be found here.
| Method | Paper | Original Code Repo |
|---|---|---|
| Auto-regressive | - | - |
| Vanilla / Semi-AR | ||
| Parallel | | |
| PC-Sampler | ||
| Certainty Prior Decoding | | This Repo |
| KLASS | ||
| EB-Sampler | Not release | |
| WINO | |
# Create and activate the environment
conda create -n d2cache python=3.11 -y
conda activate d2cache
# Install dependencies
pip install -r requirements/common.txt
# Prepare dotenv file, and set model path manually
cp .env.example .env
Please check docs/ for detailed instructions on how to run evaluations with different methods. A quick example is shown in srcipts/run_eval.sh.
Available models:
Available datasets:
lm-eval are available)[!IMPORTANT] To evaluate humaneval dataset on Dream-v0-Instruct-7B, please use its corresponding instruct variants, i.e.,
humaneval_instruct.
Additional general arguments can be specified in configs/generation/*.yaml. If gen_args_script is provided, dynamic defaults will be loaded from that script.
If you find d²Cache or this repository useful for your research and applications, please cite using this BibTeX:
@article{jiang2025d2cache,
title={d $\^{} 2$ Cache: Accelerating Diffusion-Based LLMs via Dual Adaptive Caching},
author={Jiang, Yuchu and Cai, Yue and Luo, Xiangzhong and Fu, Jiale and Wang, Jiarui and Liu, Chonghan and Yang, Xu},
journal={arXiv preprint arXiv:2509.23094},
year={2025}
}
We would like to thank the authors of all models and baseline methods for their excellent work and open-source contributions.
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.
34 commits
Python
99.8%