Skip to content

[Question] How to finetune and do GPRO for LLada MoE model with Open R1 Math #3375

Closed

Description

@MengAiDev

How to finetune and do GPRO for LLada MoE model with Open R1 Math?

Activity

  1. shimmyshimmer commented on Sep 27, 2025

    @shimmyshimmer
    Member

    Unfortunately because the model is not transformers supported, it is unlikely for us to support it at the moment.

  2. MengAiDev commented on Oct 3, 2025

    @MengAiDev
    ContributorAuthor

    @shimmyshimmer But I can see the owner's github project said finetuning it only change a few code, https://github.com/ML-GSAI/LLaDA

  3. kabachuha commented on Feb 24, 2026

    @kabachuha
  4. self-assigned this
    on Oct 9, 2026
  5. danielhanchen commented on Oct 9, 2026

    @danielhanchen
    Member

    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:

    from unsloth import FastModel, DiffusionTrainer, DiffusionConfig
    model, tokenizer = FastModel.from_pretrained("inclusionAI/LLaDA-MoE-7B-A1B-Instruct", trust_remote_code = True)
    model = FastModel.get_peft_model(model, r = 16, lora_alpha = 32)
    trainer = DiffusionTrainer(model = model, processing_class = tokenizer, train_dataset = dataset,
                               args = DiffusionConfig(completion_only_loss = True, output_dir = "outputs"))
    trainer.train()

    GRPO for diffusion models (diffu-GRPO) is not supported yet. Until then, dllm (examples/rl) and d1 have diffu-GRPO recipes for LLaDA.

  6. danielhanchen commented on Oct 10, 2026

    @danielhanchen
    Member

    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.

  7. danielhanchen commented on Oct 11, 2026

    @danielhanchen
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions