We are thrilled to introduce Stable-DiffCoder, which is a strong code diffusion large language model. Built directly on the Seed-Coder architecture, data, and training pipeline, it introduces a block diffusion continual pretraining (CPT) stage with a tailored warmup and block-wise clipped noise schedule.
Under identical architecture and data settings, we systematically analyze and design an efficient diffusion training pipeline that is not only stable but also potentially lifts the model’s performance ceiling. With this recipe, Stable-DiffCoder demonstrates overall performance improvements compared to its autoregressive (AR) counterpart across a broad set of code benchmarks, while any-order modeling improves structured code handling for editing and reasoning, and diffusion-based corruption aids learning for low-resource programming languages.
Notably, with only CPT followed by supervised fine-tuning, Stable-DiffCoder further surpasses many strong ∼8B AR and diffusion-based code models. These results demonstrate that diffusion-based training can improve code modeling quality beyond what AR training alone can achieve, even under tightly controlled data and architecture constraints.
This repo contains the
Stable-DiffCoder-8B-Instruct
model, which has the following features:
You need to install a specific version of
transformers
to adapt to the inference process:
pip install transformers==4.46.2
Explanation of Inference Parameters
steps
: Number of steps for diffusion generation
gen_length
: Maximum length of the generated output
block_length
: Length of the diffusion block, with a default value of 4
temperature
: Temperature for generation, with a default value of 0.0
remasking
: Remasking strategy, optional values are 'low_confidence' or 'random', default value is 'low_confidence' (for principle, refer to
LLADA
)
tokenizer
: Tokenizer used for text encoding and decoding
shift
: Whether to shift the output to the right by one position (similar to AutoRegressive/AR), default value is False
threshold
: Threshold for decoding (range: 0-1.0), default value is None; a smaller value results in faster decoding speed (for principle, refer to
Fast-DLLM
)
eos_id
: ID of the end-of-sequence token, default value is
tokenizer.eos_token_id
Quickstart
Here is a simple example demonstrating how to load the model and generate code.
Stable-DiffCoder-8B-Instruct has been evaluated on a wide range of coding tasks, including code generation, code reasoning, code editing, achieving stronger performance than
a wide range of ∼8B ARs and DLLMs,
This project is licensed under the MIT License. See the
LICENSE file
for details.
Citation
If you find our work helpful, feel free to give us a cite.
@misc{seed2026stablediffcoder,
title={{Stable-DiffCoder}: Pushing the Frontier of Code Diffusion Large Language Model},
author={{ByteDance Seed} and Chenghao Fan and Wen Heng and Bo Li and Sichen Liu and Yuxuan Song and Jing Su and Xiaoye Qu and Kai Shen and Wei Wei},
year={2026}
}
Runs of ByteDance-Seed Stable-DiffCoder-8B-Instruct on huggingface.co
410
Total runs
0
24-hour runs
23
3-day runs
0
7-day runs
27
30-day runs
More Information About Stable-DiffCoder-8B-Instruct huggingface.co Model
More Stable-DiffCoder-8B-Instruct license Visit here:
Stable-DiffCoder-8B-Instruct huggingface.co is an AI model on huggingface.co that provides Stable-DiffCoder-8B-Instruct's model effect (), which can be used instantly with this ByteDance-Seed Stable-DiffCoder-8B-Instruct model. huggingface.co supports a free trial of the Stable-DiffCoder-8B-Instruct model, and also provides paid use of the Stable-DiffCoder-8B-Instruct. Support call Stable-DiffCoder-8B-Instruct model through api, including Node.js, Python, http.
Stable-DiffCoder-8B-Instruct huggingface.co is an online trial and call api platform, which integrates Stable-DiffCoder-8B-Instruct's modeling effects, including api services, and provides a free online trial of Stable-DiffCoder-8B-Instruct, you can try Stable-DiffCoder-8B-Instruct online for free by clicking the link below.
ByteDance-Seed Stable-DiffCoder-8B-Instruct online free url in huggingface.co:
Stable-DiffCoder-8B-Instruct is an open source model from GitHub that offers a free installation service, and any user can find Stable-DiffCoder-8B-Instruct on GitHub to install. At the same time, huggingface.co provides the effect of Stable-DiffCoder-8B-Instruct install, users can directly use Stable-DiffCoder-8B-Instruct installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
Stable-DiffCoder-8B-Instruct install url in huggingface.co: