Command Palette
Search for a command to run...
DiffuCode-7B-cpGRPO: A Code Generation Model Based on Mask Diffusion Technology
Date
Size
12.8 MB
License
Other
GitHub
Paper URL

1. Tutorial Introduction

DiffuCoder-7B-cpGRPO, first proposed by Apple's team in a paper published on June 25, 2025, is a masked diffusion-based code generation model (dLLM). It was trained on over 20,000 carefully selected coding examples. This model aims to generate and edit code through iterative noise reduction, rather than the traditional left-to-right autoregressive generation. A significant feature of DiffuCoder-7B-cpGRPO is its non-strict reliance on left-to-right generation, which resulted in a 4.41 TP3T improvement in scores on mainstream programming benchmarks compared to other diffusion-based programming models. This non-sequential code generation capability makes it more flexible and efficient in code editing and generation tasks. The related paper results are as follows: DiffuCoder: Understanding and Improving Masked Diffusion Models for Code Generation .
This tutorial uses resources for a single RTX 4090 card.
2. Project Examples

3. Operation steps
1. After starting the container, click the API address to enter the Web interface

2. Usage steps
If "Bad Gateway" is displayed, it means the model is initializing. Since the model is large, please wait about 2-3 minutes and refresh the page.

Parameter Description
- Advanced Settings:
- Temperature: controls the generation diversity, the higher the more random, the lower the more deterministic.
- Top-p: The cumulative threshold of probability sampling. The smaller the value, the more conservative the generation.
- Max-tokens: Limits the maximum length of a single generation of the model.
4. Discussion
🖌️ If you see a high-quality project, please leave a message in the background to recommend it! In addition, we have also established a tutorial exchange group. Welcome friends to scan the QR code and remark [SD Tutorial] to join the group to discuss various technical issues and share application effects↓

Citation Information
The citation information for this project is as follows:
@article{gong2025diffucoder,
title={DiffuCoder: Understanding and Improving Masked Diffusion Models for Code Generation},
author={Shansan Gong, Ruixiang Zhang, Huangjie Zheng, Jiatao Gu, Navdeep Jaitly, Lingpeng Kong, Yizhe Zhang},
year={2025},
eprint={2506.20639},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2506.20639},
}Build AI with AI
From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.