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
[Bug] diffusiongemma not OpenAI-v1 compatible #6732
Did you update? pip install --upgrade unsloth unsloth_zoo - yes
Colab or Kaggle or local / cloud - N/A
Number GPUs used, use nvidia-smi - Apple silicon
Which notebook? Please link! - N/A
Which Unsloth version, TRL version, transformers version, PyTorch version? US 2026.6.9
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.
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.
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?
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.
Activity
Jakeshadow commentedon Jul 1, 2026
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/
black-snow commentedon Jul 1, 2026
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?
Jakeshadow commentedon Jul 3, 2026
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/
black-snow commentedon Jul 3, 2026
How can both be true? 👼