Reference · rapid-mlx 0.10.3 · ← Back to README

Optional install extras

A bare pip install rapid-mlx==0.10.3 is enough to serve any text model. The optional extras below unlock specific capabilities — vision, MTP speculative decoding, embeddings, audio, dev tooling — without paying their disk cost by default.

Source of truth. This page is a direct transcription of [project.optional-dependencies] from pyproject.toml in rapid-mlx 0.10.3. If a package name doesn't appear here, it isn't in an official extra.

How to install an extra

Bracket syntax; quote for zsh:

$ pip install "rapid-mlx[vision]==0.10.3"
$ pip install "rapid-mlx[vision,mtp]==0.10.3"    # combine
$ pip install "rapid-mlx[all]==0.10.3"           # vision + chat + embeddings

User-facing extras

[vision] — multimodal models (Gemma 4, Qwen VL, etc.)

Adds roughly 322 MB of dependencies. Required for any model with vision input; text-only models work without this.

$ pip install "rapid-mlx[vision]==0.10.3"

[mtp] — MTP speculative decoding (Gemma 4 external assistant path)

Adds the sidecar-path dependency for --spec-decode mtp --mtp-sidecar <path>. The assistant-drafter loader transitively imports mlx_lm.utilstransformers, which reaches for PIL when the sidecar checkpoint has an image-processor preprocessor_config.json. Without PIL on PYTHONPATH, boot fails with a misleading ModuleNotFoundError: No module named 'PIL'.

$ pip install "rapid-mlx[mtp]==0.10.3"

For Gemma 4 targets specifically (as opposed to just MTP wiring), also install [vision] — the Gemma 4 text-target constructor surfaces its own actionable ImportError with a size-tiered install hint. Combine as rapid-mlx[mtp,vision]==0.10.3.

Homebrew note. The Homebrew formula does not auto-install [mtp]. On Homebrew installs, add pillow>=10.0.0 manually into /opt/homebrew/Cellar/rapid-mlx/<v>/libexec or run rapid-mlx from a pip venv where you can pass the extra directly.

[dflash] — DFlash speculative decoding for Qwen 3.5/3.6 dense 8bit

Adds ~1-4 GB at runtime (drafter weights) and depends on mlx-vlm's spec-decode runtime. Text-only — does not pull torch / cv2 like [vision]. Only enable if you serve a DFlash-eligible alias (e.g. qwen3.5-27b-8bit) with --enable-dflash.

$ pip install "rapid-mlx[dflash]==0.10.3"

[embeddings] — /v1/embeddings endpoint

Unlocks --embedding-model at serve time. Required to preload an embedding model like mlx-community/embeddinggemma-300m-6bit.

$ pip install "rapid-mlx[embeddings]==0.10.3"

[chat] — Gradio chat UI

Adds the rapid-mlx-chat Gradio front-end (separate from the REPL you get from rapid-mlx chat).

$ pip install "rapid-mlx[chat]==0.10.3"

[audio] — TTS and STT (kokoro, whisper, parakeet, vibevoice, voxcpm, chatterbox, dia)

Every audio alias (see the audio registry) needs this extra. Ships upper-cap pins the audio surface has actually been dogfooded against — notably mlx-audio is pinned <0.4.4 because 0.4.4 regressed Kokoro's istftnet so every Kokoro request 500s.

Kokoro imports misaki.espeak which calls EspeakWrapper.set_data_path(...) — the legacy 3.2-era API. Vanilla phonemizer>=3.3.0 removed it in favour of a property-only data_path accessor, so phonemizer-fork is required (not just preferred).

$ pip install "rapid-mlx[audio]==0.10.3"

[guided] — outlines-based structured JSON output

Enables guided decoding for schemas.

$ pip install "rapid-mlx[guided]==0.10.3"

[all] — vision + chat + embeddings union

One-shot install of the three user-facing runtime extras. Expanded inline (not rapid-mlx[vision,chat,embeddings]) to avoid the self-dependency pitfall that breaks editable installs.

$ pip install "rapid-mlx[all]==0.10.3"

Note: [all] does not include [audio], [mtp], [dflash], [guided], [vllm], [test], or [dev] — add those explicitly if you need them.

Contributor / test extras

[test] — minimum pytest runtime

What pytest tests/ needs to import + collect every test cleanly. Kept narrow on purpose so pr_validate can rebuild a venv without the linter toolchain.

$ pip install "rapid-mlx[test]==0.10.3"

[dev] — test runtime + linters + type-checker

Mirrors [test] and adds Black, Ruff, mypy. A unit test in tests/test_pr_validate_test_env.py asserts every [test] dep is also in [dev] so a future drift can't silently break the "install dev, run pytest" workflow.

$ pip install "rapid-mlx[dev]==0.10.3"

[vllm] — vLLM plugin path

Registers rapid-mlx as a vLLM platform plugin.

$ pip install "rapid-mlx[vllm]==0.10.3"

Verify what's installed

rapid-mlx doctor surfaces each optional extra's status:

◆ Optional Packages
  ⚠ mlx-vlm (vision extras) not installed (`pip install 'rapid-mlx[vision]'`)
  ⚠ mlx-audio (audio extras) not installed (`pip install 'rapid-mlx[audio]'`)
  ⚠ mlx-embeddings (embeddings extras) not installed (`pip install 'rapid-mlx[embeddings]'`)
  ⚠ mlx-vlm 0.5.0+ (dflash extras) not installed or too old

Next steps