--- license: other license_name: modilify-open-model-license-1.0 license_link: LICENSE library_name: mlx pipeline_tag: image-text-to-text base_model: modilify/Modilify-Mk1 tags: - mlx - diffusion - multimodal - image-text-to-text - mixture-of-experts --- ![LOGO](assets/01-LOGO.jpg) # Modilify Mk1 MLX Native MLX runtime for [Modilify Mk1](https://huggingface.co/modilify/Modilify-Mk1). `model_type` is `modilify_mk1`. This package does not rewrite the checkpoint as another architecture and does not install into oMLX. The published `model-*.safetensors` shards are a server-side copy of the official Mk1 weights. `modilify_mlx.load` remaps PyTorch parameter names at load time, so you do not need a second converted 49GB checkpoint on the Hub. ## Layout - `modilify_mlx/` — config, latent deliberation, exclusive commit policy, trunk wrapper, generate loop - `convert_modilify_mk1_mlx.py` — official safetensors → MLX shards - `generate_modilify.py` — standalone text trial inference The heavy decoder / vision trunk is composed from mlx-vlm's DiffusionGemma layers as an internal dependency. Router top-k and the RMS-capped latent merge are Mk1's own forwards. ## Convert Use the oMLX bundled interpreter only as a Python that already has `mlx`: ```bash export PYTHONHOME=/Applications/oMLX.app/Contents/Resources/Python/cpython-3.11 export PYTHONPATH=/Applications/oMLX.app/Contents/Resources:/Applications/oMLX.app/Contents/Resources/Python/framework-mlx-base/lib/python3.11/site-packages /Applications/oMLX.app/Contents/Resources/Python/cpython-3.11/bin/python3 \ ~/Modilify-Mk1-MLX/convert_modilify_mk1_mlx.py \ --source ~/Modilify-Mk1 \ --destination ~/Modilify-Mk1-MLX ``` ## Generate Official Mk1 shards and locally remapped MLX shards both load. Parameter names are remapped in `modilify_mlx.load`. ```bash /Applications/oMLX.app/Contents/Resources/Python/cpython-3.11/bin/python3 \ ~/Modilify-Mk1-MLX/generate_modilify.py \ --model ~/Modilify-Mk1-MLX \ --prompt "Explain why the sky is blue." \ --max-new-tokens 128 ``` Default is bf16 (`--expert-bits 16`). Add `--profile` to print per-phase denoise timings. Full-graph `mx.compile` of the decoder is blocked by MoE gather/router slices.