Image-Text-to-Text
MLX
Safetensors
diffusion_gemma
vision
Mixture of Experts
diffusion-llm
conversational
4-bit precision
Instructions to use ToPo-ToPo/diffusiongemma-26B-A4B-it-mlx-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use ToPo-ToPo/diffusiongemma-26B-A4B-it-mlx-4bit with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("ToPo-ToPo/diffusiongemma-26B-A4B-it-mlx-4bit") config = load_config("ToPo-ToPo/diffusiongemma-26B-A4B-it-mlx-4bit") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use ToPo-ToPo/diffusiongemma-26B-A4B-it-mlx-4bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "ToPo-ToPo/diffusiongemma-26B-A4B-it-mlx-4bit"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "ToPo-ToPo/diffusiongemma-26B-A4B-it-mlx-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use ToPo-ToPo/diffusiongemma-26B-A4B-it-mlx-4bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "ToPo-ToPo/diffusiongemma-26B-A4B-it-mlx-4bit"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "ToPo-ToPo/diffusiongemma-26B-A4B-it-mlx-4bit" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Hermes Agent
How to use ToPo-ToPo/diffusiongemma-26B-A4B-it-mlx-4bit with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "ToPo-ToPo/diffusiongemma-26B-A4B-it-mlx-4bit"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default ToPo-ToPo/diffusiongemma-26B-A4B-it-mlx-4bit
Run Hermes
hermes
- Atomic Chat
| license: apache-2.0 | |
| base_model: google/diffusiongemma-26B-A4B-it | |
| library_name: mlx | |
| tags: [mlx, vision, moe, diffusion-llm] | |
| pipeline_tag: image-text-to-text | |
| # ToPo-ToPo/diffusiongemma-26B-A4B-it-mlx-4bit | |
| MLX **4bit** conversion of [`google/diffusiongemma-26B-A4B-it`](https://huggingface.co/google/diffusiongemma-26B-A4B-it) (mlx-vlm). | |
| Block-diffusion LM built on Gemma 4 (25.2B total / 3.8B active, MoE 128+1 experts, vision). | |
| ## Provenance (self-converted) | |
| - Source: `google/diffusiongemma-26B-A4B-it` (license: apache-2.0) | |
| - Tool: mlx-vlm 0.6.9 `mlx_vlm.convert` (4bit affine, group_size=64), ~5.130 bpw | |
| - `model_type: diffusion_gemma` is supported natively by mlx-vlm 0.6.9; no patch needed. | |
| - `chat_template.jinja` is **not** the base repo's copy: it is the patched *Gemma 4 Canonical | |
| Chat Template* from [`ToPo-ToPo/gemma-4-26B-A4B-it-mlx-4bit`](https://huggingface.co/ToPo-ToPo/gemma-4-26B-A4B-it-mlx-4bit), | |
| which suppresses the thinking channel when `enable_thinking` is false (otherwise the literal | |
| word `thought` leaks into the answer). Thinking is off by default. Weights are unaffected — | |
| restore the base repo's template for stock behaviour. | |
| ## Usage | |
| ```python | |
| from mlx_vlm import load | |
| model, processor = load("ToPo-ToPo/diffusiongemma-26B-A4B-it-mlx-4bit") | |
| ``` | |
| Diffusion generation takes its own flags: | |
| ```bash | |
| python -m mlx_vlm generate --model ToPo-ToPo/diffusiongemma-26B-A4B-it-mlx-4bit \ | |
| --prompt "Why is the sky blue?" \ | |
| --max-tokens 256 --max-denoising-steps 48 --diffusion-sampler entropy-bound | |
| ``` | |