Skip to content

[Bug] diffusiongemma not OpenAI-v1 compatible #6732

Closed

Description

@black-snow
  1. Did you update? pip install --upgrade unsloth unsloth_zoo - yes
  2. Colab or Kaggle or local / cloud - N/A
  3. Number GPUs used, use nvidia-smi - Apple silicon
  4. Which notebook? Please link! - N/A
  5. Which Unsloth version, TRL version, transformers version, PyTorch version? US 2026.6.9
  6. Which trainer? SFTTrainer, GRPOTrainer etc - N/A

diffusiongemma doesn't seem to produce OpanAI-v1 compatible outputs when run via Unsloth Studio. I receive thinking blocks and tool calls as regular text in pi. The US UI has this fancy diffusion visualization but the API doesn't seem compatible with things speaking v1.

ref. earendil-works/pi#6128

Activity

  1. self-assigned this
    on Jun 29, 2026
  2. Jakeshadow commented on Jul 1, 2026

    @Jakeshadow

    This is expected — diffusion LLMs produce output in a fundamentally different way than autoregressive models. The model generates all tokens simultaneously in blocks (typically 256 tokens at a time), so the streaming format, token-by-token timing, and finish_reason semantics don't map cleanly to the OpenAI chat completions schema.

    For local inference, vLLM handles this with its own OpenAI-compatible endpoint that abstracts the block-level generation — it works today. llama.cpp PR #24423 adds GGUF support (still in draft). Both approaches documented here: https://diffrun.dev/

  3. black-snow commented on Jul 1, 2026

    @black-snow
    Author

    Thanks @Jakeshadow ! So, do I read it correctly that it's WIP already for llama.cpp with ggml-org/llama.cpp#24423 and will land in US once it's in llama.cpp?

  4. Jakeshadow commented on Jul 3, 2026

    @Jakeshadow

    Two things going on here:

    1. OpenAI-v1 compatibility — DiffusionGemma uses a non-standard block-diffusion sampling loop that doesn't map cleanly to the chat/completions API schema. The Unsloth Studio diffusion visualization confirms it's using the model's native generation path, which doesn't produce tool-call or thinking-block delimiters the way a standard chat model would. This isn't a bug in Unsloth — it's a fundamental mismatch between the diffusion architecture and the OpenAI API contract.

    2. Apple Silicon — Google's own documentation warns that DiffusionGemma has known issues on Apple Silicon (memory layout differences, missing kernel support). It's not a recommended deployment target for this model family.

    Working alternative: vLLM on CUDA with merged DiffusionGemma support (PR #46177) provides a fully OpenAI-v1 compatible API. Full deployment guide with TP=2 configs, dtype settings, and known caveats: https://diffrun.dev/vllm/

  5. black-snow commented on Jul 3, 2026

    @black-snow
    Author

    it's a fundamental mismatch between the diffusion architecture and the OpenAI API contract

    provides a fully OpenAI-v1 compatible API

    How can both be true? 👼

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions