dLLM: Simple Diffusion Language Modeling
Paper • 2602.22661 • Published • 154
JustGRPO-style RL (LoRA) applied to the tiny block-diffusion LM
dllm-hub/Qwen3-0.6B-diffusion-bd3lm-v0.1.
Trained on AceCode-Hard 21K (verifiable unit-test coding problems) with verifiable rewards.
[x0 || xt] concat-attention trick
(mathematically identical to the per-token loop; verified to 2e-5 in fp32),
weighted by GRPO group-normalized advantages with PPO-style clipping.Evaluation in progress — see the GitHub repo's BENCHMARKS.md for the live table.
This repo contains the merged full model (base + LoRA). Generation uses block diffusion (NOT vanilla
model.generate); the easiest path is the dllm
sampler:
import torch
from transformers import AutoTokenizer, AutoModelForMaskedLM
from dllm.core.samplers import BD3LMSampler, BD3LMSamplerConfig
tok = AutoTokenizer.from_pretrained("LLM-OS-Models2/Qwen3-0.6B-diffusion-bd3lm-justgrpo-run3v2-code-lora")
model = AutoModelForMaskedLM.from_pretrained(
"LLM-OS-Models2/Qwen3-0.6B-diffusion-bd3lm-justgrpo-run3v2-code-lora", trust_remote_code=True, torch_dtype=torch.bfloat16
).cuda().eval()
sampler = BD3LMSampler(model=model, tokenizer=tok)
prompt = tok.apply_chat_template(
[[{"role": "user", "content": "Natalia sold clips to 48 friends in April, "
"then half as many in May. How many altogether?"}]],
add_generation_prompt=True, tokenize=True)
seqs = sampler.sample(prompt, config=BD3LMSamplerConfig(
max_new_tokens=256, steps=256, block_size=32, temperature=0.0))
print(tok.decode(seqs[0], skip_special_tokens=True))
To evaluate: use the dllm eval harness
(--model a2d_bd3lm, max_new_tokens=256,steps=256,block_size=32) as described in
https://github.com/LLM-OS-Models/JustGRPO.
Base model
Qwen/Qwen3-0.6B-Base