[ICML 2026] Residual Context Diffusion (RCD): Repurposing discarded signals as structured priors for high-performance reasoning in dLLMs.
61
stars
17
commits
Python
primary language
Jun 28, 2026
updated
Project Page | arXiv | OpenReview | Models


Example generation on AIME24. RCD increases parallelism by 4x while maintaining the baseline's peak accuracy.
This repository contains the code to replicate our study in "Residual Context Diffusion Language Models". In this study, we point out that diffusion Large Language Models (dLLMs) enable parallel decoding but often trail autoregressive models in accuracy. A key culprit is the inference-time remasking strategy that commits only high-confidence tokens and discards the rest, wasting intermediate computation.
RCD introduces a residual denoising mechanism that turns discarded token distributions into contextual residuals and injects them into the next denoising step. With a two-stage training pipeline, RCD avoids backprop-through-time memory costs while preserving the benefits of residual feedback.
jetengine/.TL;DR: RCD consistently improves diffusion reasoning accuracy over Sequential Denoising (SeqD) across both SDAR and LLaDA, with the biggest gains on harder competition-style benchmarks (AIME24/25) and MinervaMath.
| Model | Variant | GSM8K1 | MATH500 | AIME24 | AIME25 |
|---|---|---|---|---|---|
| SDAR-4B-b32 | Chat2 | 86.13 | 50.20 | 5.83 | 2.50 |
| SDAR-4B-b32 | SeqD | 81.73 | 61.20 | 6.04 | 11.88 |
| SDAR-4B-b32 | RCD | 84.91 | 65.40 | 9.17 | 17.08 |
| SDAR-4B-b64 | Chat2 | 85.90 | 49.80 | 6.25 | 1.67 |
| SDAR-4B-b64 | SeqD | 78.85 | 56.80 | 4.17 | 7.29 |
| SDAR-4B-b64 | RCD | 87.04 | 68.40 | 11.04 | 14.79 |
| SDAR-8B-b32 | Chat2 | 88.40 | 50.00 | 6.46 | 4.17 |
| SDAR-8B-b32 | SeqD | 86.50 | 65.80 | 11.67 | 14.79 |
| SDAR-8B-b32 | RCD | 90.45 | 76.20 | 18.96 | 20.00 |
| SDAR-8B-b64 | Chat2 | 88.32 | 51.60 | 5.20 | 2.50 |
| SDAR-8B-b64 | SeqD | 82.87 | 64.20 | 7.08 | 9.79 |
| SDAR-8B-b64 | RCD | 86.05 | 74.40 | 18.75 | 16.04 |
| Model | Variant | GSM8K | MinervaMath |
|---|---|---|---|
| LLaDA | Base3 | 70.30 | 31.40 |
| LLaDA | SeqD | 75.74 | 31.10 |
| LLaDA | RCD | 78.09 | 37.00 |
All checkpoints are available on HuggingFace.
| Name | URL |
|---|---|
| SeqD-SDAR-4B-b32-Thinking | model |
| SeqD-SDAR-4B-b64-Thinking | model |
| SeqD-SDAR-8B-b32-Thinking | model |
| SeqD-SDAR-8B-b64-Thinking | model |
| SeqD-LLaDA-8B-Instruct | model |
Since June 2026, RCD inference uses cold-start initialization and no longer requires a separate draft/reference model at generation time.
| Name | URL |
|---|---|
| RCD-SDAR-4B-b32-Thinking | model |
| RCD-SDAR-4B-b64-Thinking | model |
| RCD-SDAR-8B-b32-Thinking | model |
| RCD-SDAR-8B-b64-Thinking | model |
| RCD-LLaDA-8B-Instruct | model |
The standalone generation scripts require only transformers:
pip install transformers==4.52.3
# Sequential Denoising (baseline)
CUDA_VISIBLE_DEVICES=0 python seqd-sdar/generate.py \
--model_dir yuezhouhu/SeqD-SDAR-4B-b64-Thinking \
--trust_remote_code \
--block_length 64 \
--denoising_steps 64 \
--temperature 0 \
--dtype bfloat16 \
--confidence_threshold 0.85
# Residual Context Diffusion (ours)
CUDA_VISIBLE_DEVICES=0 python rcd-sdar/generate.py \
--model_dir yuezhouhu/RCD-SDAR-4B-b64-Thinking \
--trust_remote_code \
--block_length 64 \
--denoising_steps 64 \
--temperature 0 \
--dtype bfloat16 \
--confidence_threshold 0.85
residual-context-diffusion/
├── rcd-sdar/ # RCD on SDAR backbone
│ ├── generate.py # Standalone generation
│ ├── lighteval/ # Evaluation harness
│ ├── recipes/ # Training recipes
│ ├── eval_simple.sh # Eval: GSM8K + MATH500
│ └── eval_aime.sh # Eval: AIME24 + AIME25
│
├── seqd-sdar/ # SeqD on SDAR backbone (baseline)
│ ├── generate.py
│ ├── lighteval/
│ ├── recipes/
│ ├── eval_simple.sh
│ └── eval_aime.sh
│
├── rcd-llada/ # RCD on LLaDA backbone
│ ├── examples/ # Eval and training examples
│ └── dllm/ # dLLM model code
│
├── seqd-llada/ # SeqD on LLaDA backbone (baseline)
│ ├── examples/
│ └── dllm/
│
├── jetengine/ # High-performance inference engine
│ ├── rcd/ # RCD engine (with residual guidance)
│ ├── seqd/ # SeqD engine (baseline)
│ └── README.md
│
└── assets/ # Figures and diagrams
Each sub-project is self-contained and has its own environment. Follow the per-directory README for setup:
rcd-sdar/README.mdseqd-sdar/README.mdrcd-llada/README.mdseqd-llada/README.mdrcd-sdar/eval_simple.sh / rcd-sdar/eval_aime.sh (RCD) and corresponding scripts under seqd-sdar/rcd-llada/examples/llada/eval_openmathinstruct.sh and seqd-llada/examples/llada/eval_openmathinstruct.shFor batched, high-throughput inference or RL training loops, see jetengine/README.md. JetEngine provides:
Training recipes are in each method's directory:
rcd-sdar/recipes/ (RCD) and seqd-sdar/recipes/ (SeqD)rcd-llada/examples/llada/ and seqd-llada/examples/llada/@misc{hu2026residualcontextdiffusionlanguage,
title={Residual Context Diffusion Language Models},
author={Yuezhou Hu and Harman Singh and Monishwaran Maheswaran and Haocheng Xi and Coleman Hooper and Jintao Zhang and Aditya Tomar and Michael W. Mahoney and Sewon Min and Mehrdad Farajtabar and Kurt Keutzer and Amir Gholami and Chenfeng Xu},
year={2026},
eprint={2601.22954},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2601.22954},
}
17 commits
Python
96.7%
MDX
1.3%
Jupyter Notebook
1.1%
[ICML 2026] Residual Context Diffusion (RCD): Repurposing discarded signals as structured priors for high-performance reasoning in dLLMs.
61
stars
17
commits
Python
primary language
Jun 28, 2026
updated
Project Page | arXiv | OpenReview | Models


Example generation on AIME24. RCD increases parallelism by 4x while maintaining the baseline's peak accuracy.
This repository contains the code to replicate our study in "Residual Context Diffusion Language Models". In this study, we point out that diffusion Large Language Models (dLLMs) enable parallel decoding but often trail autoregressive models in accuracy. A key culprit is the inference-time remasking strategy that commits only high-confidence tokens and discards the rest, wasting intermediate computation.
RCD introduces a residual denoising mechanism that turns discarded token distributions into contextual residuals and injects them into the next denoising step. With a two-stage training pipeline, RCD avoids backprop-through-time memory costs while preserving the benefits of residual feedback.
jetengine/.TL;DR: RCD consistently improves diffusion reasoning accuracy over Sequential Denoising (SeqD) across both SDAR and LLaDA, with the biggest gains on harder competition-style benchmarks (AIME24/25) and MinervaMath.
| Model | Variant | GSM8K1 | MATH500 | AIME24 | AIME25 |
|---|---|---|---|---|---|
| SDAR-4B-b32 | Chat2 | 86.13 | 50.20 | 5.83 | 2.50 |
| SDAR-4B-b32 | SeqD | 81.73 | 61.20 | 6.04 | 11.88 |
| SDAR-4B-b32 | RCD | 84.91 | 65.40 | 9.17 | 17.08 |
| SDAR-4B-b64 | Chat2 | 85.90 | 49.80 | 6.25 | 1.67 |
| SDAR-4B-b64 | SeqD | 78.85 | 56.80 | 4.17 | 7.29 |
| SDAR-4B-b64 | RCD | 87.04 | 68.40 | 11.04 | 14.79 |
| SDAR-8B-b32 | Chat2 | 88.40 | 50.00 | 6.46 | 4.17 |
| SDAR-8B-b32 | SeqD | 86.50 | 65.80 | 11.67 | 14.79 |
| SDAR-8B-b32 | RCD | 90.45 | 76.20 | 18.96 | 20.00 |
| SDAR-8B-b64 | Chat2 | 88.32 | 51.60 | 5.20 | 2.50 |
| SDAR-8B-b64 | SeqD | 82.87 | 64.20 | 7.08 | 9.79 |
| SDAR-8B-b64 | RCD | 86.05 | 74.40 | 18.75 | 16.04 |
| Model | Variant | GSM8K | MinervaMath |
|---|---|---|---|
| LLaDA | Base3 | 70.30 | 31.40 |
| LLaDA | SeqD | 75.74 | 31.10 |
| LLaDA | RCD | 78.09 | 37.00 |
All checkpoints are available on HuggingFace.
| Name | URL |
|---|---|
| SeqD-SDAR-4B-b32-Thinking | model |
| SeqD-SDAR-4B-b64-Thinking | model |
| SeqD-SDAR-8B-b32-Thinking | model |
| SeqD-SDAR-8B-b64-Thinking | model |
| SeqD-LLaDA-8B-Instruct | model |
Since June 2026, RCD inference uses cold-start initialization and no longer requires a separate draft/reference model at generation time.
| Name | URL |
|---|---|
| RCD-SDAR-4B-b32-Thinking | model |
| RCD-SDAR-4B-b64-Thinking | model |
| RCD-SDAR-8B-b32-Thinking | model |
| RCD-SDAR-8B-b64-Thinking | model |
| RCD-LLaDA-8B-Instruct | model |
The standalone generation scripts require only transformers:
pip install transformers==4.52.3
# Sequential Denoising (baseline)
CUDA_VISIBLE_DEVICES=0 python seqd-sdar/generate.py \
--model_dir yuezhouhu/SeqD-SDAR-4B-b64-Thinking \
--trust_remote_code \
--block_length 64 \
--denoising_steps 64 \
--temperature 0 \
--dtype bfloat16 \
--confidence_threshold 0.85
# Residual Context Diffusion (ours)
CUDA_VISIBLE_DEVICES=0 python rcd-sdar/generate.py \
--model_dir yuezhouhu/RCD-SDAR-4B-b64-Thinking \
--trust_remote_code \
--block_length 64 \
--denoising_steps 64 \
--temperature 0 \
--dtype bfloat16 \
--confidence_threshold 0.85
residual-context-diffusion/
├── rcd-sdar/ # RCD on SDAR backbone
│ ├── generate.py # Standalone generation
│ ├── lighteval/ # Evaluation harness
│ ├── recipes/ # Training recipes
│ ├── eval_simple.sh # Eval: GSM8K + MATH500
│ └── eval_aime.sh # Eval: AIME24 + AIME25
│
├── seqd-sdar/ # SeqD on SDAR backbone (baseline)
│ ├── generate.py
│ ├── lighteval/
│ ├── recipes/
│ ├── eval_simple.sh
│ └── eval_aime.sh
│
├── rcd-llada/ # RCD on LLaDA backbone
│ ├── examples/ # Eval and training examples
│ └── dllm/ # dLLM model code
│
├── seqd-llada/ # SeqD on LLaDA backbone (baseline)
│ ├── examples/
│ └── dllm/
│
├── jetengine/ # High-performance inference engine
│ ├── rcd/ # RCD engine (with residual guidance)
│ ├── seqd/ # SeqD engine (baseline)
│ └── README.md
│
└── assets/ # Figures and diagrams
Each sub-project is self-contained and has its own environment. Follow the per-directory README for setup:
rcd-sdar/README.mdseqd-sdar/README.mdrcd-llada/README.mdseqd-llada/README.mdrcd-sdar/eval_simple.sh / rcd-sdar/eval_aime.sh (RCD) and corresponding scripts under seqd-sdar/rcd-llada/examples/llada/eval_openmathinstruct.sh and seqd-llada/examples/llada/eval_openmathinstruct.shFor batched, high-throughput inference or RL training loops, see jetengine/README.md. JetEngine provides:
Training recipes are in each method's directory:
rcd-sdar/recipes/ (RCD) and seqd-sdar/recipes/ (SeqD)rcd-llada/examples/llada/ and seqd-llada/examples/llada/@misc{hu2026residualcontextdiffusionlanguage,
title={Residual Context Diffusion Language Models},
author={Yuezhou Hu and Harman Singh and Monishwaran Maheswaran and Haocheng Xi and Coleman Hooper and Jintao Zhang and Aditya Tomar and Michael W. Mahoney and Sewon Min and Mehrdad Farajtabar and Kurt Keutzer and Amir Gholami and Chenfeng Xu},
year={2026},
eprint={2601.22954},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2601.22954},
}
17 commits
Python
96.7%
MDX
1.3%
Jupyter Notebook
1.1%