You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Question] How to finetune and do GPRO for LLada MoE model with Open R1 Math #3375
Hey! Sorry on the delay. Unsloth supports fine-tuning diffusion language models via DiffusionGemma (Google's 26B-A4B block-diffusion MoE). FastModel.from_pretrained auto-detects it and you add LoRA as usual.
We also found the notebook's training loop passed the noisy canvas under the wrong argument name, so the fix moves it onto a proper DiffusionTrainer with the reference objective (unslothai/notebooks#393).
For LLaDA-MoE specifically: #13157 adds DiffusionTrainer recipes for LLaDA, LLaDA-MoE, LLaDA2.x, Dream, Nemotron-Labs-Diffusion and SDAR, with losses matched against each model's official training code. Once that is merged, SFT on Open R1 Math works like this:
Fine-tuning for LLaDA-MoE is now supported via #13157, along with LLaDA, LLaDA2.x, Dream, Nemotron-Labs-Diffusion, SDAR and DiffusionGemma. FastModel.from_pretrained("inclusionAI/LLaDA-MoE-7B-A1B-Instruct", trust_remote_code = True) routes to the diffusion loader, and DiffusionTrainer / DiffusionConfig train with the LLaDA SFT objective on the usual chat or prompt / completion datasets. It also fixes LLaDA-MoE loading with zeroed RoPE buffers on transformers 5, which made training start at a much higher loss.
To update: uv pip install --upgrade unsloth unsloth_zoo --force-reinstall --no-cache-dir (if it's not in the current release yet it'll be in the next one).
GRPO for diffusion models needs its own rollout and log-probability estimator, so it is not in yet. I'll keep this open for that part.
Closing this for now. Diffusion language models, including LLaDA-MoE, now support SFT in Unsloth via DiffusionTrainer (#13157), so fine-tuning inclusionAI/LLaDA-MoE-7B-A1B-Instruct on Open R1 Math works with LoRA. GRPO for diffusion models is not supported yet, since it needs its own rollout sampler and log-probability estimator. Until then, dllm and d1 have diffu-GRPO recipes for LLaDA.
To update: uv pip install --upgrade unsloth unsloth_zoo --force-reinstall --no-cache-dir (if it's not in the current release yet it'll be in the next one). Reopen if it still happens.
Activity
shimmyshimmer commentedon Sep 27, 2025
Unfortunately because the model is not transformers supported, it is unlikely for us to support it at the moment.
MengAiDev commentedon Oct 3, 2025
@shimmyshimmer But I can see the owner's github project said finetuning it only change a few code, https://github.com/ML-GSAI/LLaDA
kabachuha commentedon Feb 24, 2026
Official training code from LLaDA 2's authors https://github.com/inclusionAI/dFactory
danielhanchen commentedon Oct 9, 2026
Hey! Sorry on the delay. Unsloth supports fine-tuning diffusion language models via DiffusionGemma (Google's 26B-A4B block-diffusion MoE).
FastModel.from_pretrainedauto-detects it and you add LoRA as usual.We also found the notebook's training loop passed the noisy canvas under the wrong argument name, so the fix moves it onto a proper
DiffusionTrainerwith the reference objective (unslothai/notebooks#393).For LLaDA-MoE specifically: #13157 adds
DiffusionTrainerrecipes for LLaDA, LLaDA-MoE, LLaDA2.x, Dream, Nemotron-Labs-Diffusion and SDAR, with losses matched against each model's official training code. Once that is merged, SFT on Open R1 Math works like this:GRPO for diffusion models (diffu-GRPO) is not supported yet. Until then, dllm (
examples/rl) and d1 have diffu-GRPO recipes for LLaDA.danielhanchen commentedon Oct 10, 2026
Fine-tuning for LLaDA-MoE is now supported via #13157, along with LLaDA, LLaDA2.x, Dream, Nemotron-Labs-Diffusion, SDAR and DiffusionGemma.
FastModel.from_pretrained("inclusionAI/LLaDA-MoE-7B-A1B-Instruct", trust_remote_code = True)routes to the diffusion loader, andDiffusionTrainer/DiffusionConfigtrain with the LLaDA SFT objective on the usual chat or prompt / completion datasets. It also fixes LLaDA-MoE loading with zeroed RoPE buffers on transformers 5, which made training start at a much higher loss.To update:
uv pip install --upgrade unsloth unsloth_zoo --force-reinstall --no-cache-dir(if it's not in the current release yet it'll be in the next one).GRPO for diffusion models needs its own rollout and log-probability estimator, so it is not in yet. I'll keep this open for that part.
danielhanchen commentedon Oct 11, 2026
Closing this for now. Diffusion language models, including LLaDA-MoE, now support SFT in Unsloth via
DiffusionTrainer(#13157), so fine-tuninginclusionAI/LLaDA-MoE-7B-A1B-Instructon Open R1 Math works with LoRA. GRPO for diffusion models is not supported yet, since it needs its own rollout sampler and log-probability estimator. Until then, dllm and d1 have diffu-GRPO recipes for LLaDA.To update:
uv pip install --upgrade unsloth unsloth_zoo --force-reinstall --no-cache-dir(if it's not in the current release yet it'll be in the next one). Reopen if it still happens.