Bonsai 2 MLX packs load natively in mlx-vlm 0.7.8 and newer, on stock MLX; no fork is needed. The released mlx-lm (0.32.0) cannot load them yet: its support is merged and ships in the next release, so don’t point
mlx_lm.generate or mlx_lm.server at these packs until then. See Formats & runtime support.Install
setup.sh does this for you in a dedicated virtualenv, .venv-vlm/, with pinned, tested versions (mlx 0.32.3, mlx-vlm 0.7.8, mlx-lm 0.32.0, transformers 5.19.0), and ./scripts/run_mlx.sh and ./scripts/start_mlx_server.sh use it automatically. Re-run ./setup.sh to upgrade an older environment.
Run a chat
Through the demo repo, which applies each size’s recommended sampling:generate() decodes greedily unless you do, and greedy decoding can get stuck reasoning with thinking on.
enable_thinking=False and switch to the non-thinking sampling. The 27B wants presence_penalty=0.0; the smaller sizes want 1.0 over a 64-token window (MLX’s default window is 20). Each model page has both sets (27B, 9B).
Start a server
top_p, and top_k from generation_config.json when a request omits them, but not min_p or the presence penalty, so send the full profile and the thinking mode with every request:
enable_thinking is a top-level field here (on llama-server it goes under chat_template_kwargs), and a thinking budget is thinking_budget, not llama-server’s thinking_budget_tokens. Read the served model ID back from GET /v1/models if your client needs an exact one. For a bounded server run, the launcher passes the server’s own flags through: ./scripts/start_mlx_server.sh --thinking-budget 8192 --max-tokens 32768.
Speculative decoding
The 9B and 4B packs carry their trained multi-token-prediction head undermtp/ as an mlx-vlm drafter. The main model verifies every drafted token, so output matches plain decoding up to float16 near-ties. It helps most on copy-heavy work such as code edits; on general chat it is about as fast as plain decoding or slightly slower, so plain decoding stays the default. MTP.md in each repo has the code; it was validated with the bundled runtime on mlx-vlm 0.6.3 and has not yet been re-checked on 0.7.8.
GGUF or MLX on a Mac?
Both run well on Apple Silicon, and decode speed is comparable: the demo’s M4 Pro measurements put llama.cpp Metal slightly ahead on the 27B. GGUF via llama.cpp is more portable across the wider tooling ecosystem and has the prompt cache; MLX is the native path for Python scripting on Apple Silicon and for the Mac and iOS apps built on it.The mlx-vlm server has no cross-request prompt cache, so multi-turn conversations reprocess the full history (including image tokens) on every turn. For interactive multi-turn use, prefer llama.cpp, which caches the prefix.