license: apache-2.0
base_model: prism-ml/Ternary-Bonsai-2.5-27B-mlx-2bit
library_name: mlx
pipeline_tag: image-text-to-text
tags:
- mlx-vlm
- apple-silicon
- bonsai
- heretic
- ternary
- 2-bit
- vision
- tool-calling
- reasoning
Bonsai 2.5 27B · Heretic v2.1 Compact
27B on Apple Silicon · 8.41 GB of core weights · Text, vision, thinking, and tools
A local multimodal checkpoint built from Prism ML's Bonsai 2.5 with a fresh Heretic v2.1.0 ARA fit. It keeps the same weight-file size as the earlier Bonsai 2 Heretic v2 Compact. The package includes a chat template, a vision-capable loader, and a small set of reproducible checks. Prism ML base, Heretic v2.1.0, v2 Compact predecessor
Pick your runtime
| What you want to do | How to run it |
|---|---|
| Chat or use images on an Apple Silicon Mac | Use the MLX quickstart below. |
| Use this exact checkpoint in Unsloth Studio Data Recipes, Open WebUI, or another API client | Run the local MLX server, then point the client at its OpenAI-compatible endpoint. |
| Import weights directly into a desktop app | Check your app's MLX loader for prism_hadamard_qwen35 and the mixed-precision vision tower. Direct LM Studio and Unsloth imports are unverified for this release. |
| Train with Unsloth or run on a CUDA or GGUF stack | Start from a checkpoint your engine supports. See Unsloth and other runtimes. |
Run on Apple Silicon
Use Python 3.11. The commands below download the pack, install the reference runtime, and run a text prompt. Use hf auth login first if you have private access to the repository.
python3.11 -m venv .venv-bonsai
source .venv-bonsai/bin/activate
python -m pip install 'huggingface-hub==1.33.0'
hf download 3hs4n/Ternary-Bonsai-2.5-27B-Uncensored-heretic-v2.1-mlx-2bit-compact \
--local-dir bonsai-25-heretic-compact
cd bonsai-25-heretic-compact
python -m pip install -r runtime/requirements.txt
python quickstart.py 'What is the capital of France? Answer with the city only.'
Try the included chart. The fixture answer is B.

python -m mlx_vlm.generate --model . --image fixtures/chart_tallest.png \
--prompt 'Which bar is tallest? Reply with only A, B, or C.' \
--temperature 0 --max-tokens 32
The text Quickstart uses the pack's chat template with thinking off, temperature 1.0, top-p 0.95, and top-k 20. For repeatable checks, set temperature to 0 in the MLX CLI or API. Add --enable-thinking in the CLI when you want reasoning, and allow more output tokens. Start with short chat history and one image. The weight-file size describes disk use. Runtime memory also includes the prompt cache and image processing. Clean-install validation summary, MLX-VLM 0.7.2 commands
Serve a local API
Run this from the downloaded pack with the same Python environment active. The server listens on loopback.
PORT=8083 # example port
python -m mlx_vlm.server --model . --host 127.0.0.1 --port "$PORT"
In another terminal, list the model IDs. Copy the returned ID exactly into your client.
PORT=8083 # use the same port as the server
curl -fsS "http://127.0.0.1:${PORT}/v1/models"
| Client setting | Value |
|---|---|
| API type | OpenAI-compatible |
| Base URL on the same Mac | http://127.0.0.1:PORT/v1, with PORT set to your server's port |
| Model | The id printed by /v1/models |
| Authentication | None for this local setup |
| First test | Ask for a short text reply with temperature: 0 and enable_thinking: false |
Image requests use an image_url content part. For tool calls, pass a tools schema and return each tool's result in the conversation. Tool execution happens in the client. Use the bundled chat template for both.
Unsloth and other runtimes
Use this exact model in Unsloth Studio Data Recipes. Start the MLX server, then add a Model provider block for an OpenAI-compatible endpoint. Enter the base URL above and put the returned model ID in a Model Config block. Connect it to an LLM Text block and preview one row before running a dataset. 127.0.0.1 points to the machine or container running Studio. If Studio runs elsewhere, use an endpoint reachable from Studio. The MLX API was smoke-tested, and the Studio setup follows Unsloth's provider documentation. Unsloth Data Recipes
Train with Unsloth. Use a supported Transformers-format starting checkpoint for LoRA or QLoRA, such as a compatible copy of the upstream Qwen3.8-27B model. This release uses Prism ML's Hadamard-rotated packed MLX weights and ships as an inference checkpoint. Adapters trained on the upstream Qwen checkpoint target that checkpoint. Moving an edit into this ternary pack requires a separate bake and validation. Unsloth fine-tuning guide, Qwen3.8-27B
Run a GGUF model with Unsloth, llama.cpp, or Ollama. Choose a GGUF and runtime pair supported by its publisher. For example, Unsloth documents unsloth run --model unsloth/Qwen3.8-27B-GGUF:UD-Q4_K_XL. Prism ML also publishes an official Bonsai 2.5 GGUF with per-format runtime instructions. Both are separate checkpoints with their own behavior. This repository distributes the MLX build. Unsloth Qwen3.8 guide, Prism ML GGUF
What we measured
| Check | Result |
|---|---|
| Text, bounded thinking, native tool call with round trip, vision, and OCR | 20/20 for both this build and the v2 Compact predecessor |
| Full-vision build versus this Compact build | 20/20 identical outputs, including tool round trips |
| Refusal-marker hits on the local screen | 16/16 → 2/16 against the official Bonsai 2.5 base |
| Ordinary-prompt marker hits | 1/24 for both |
| Legitimate requests, manually reviewed | 0/16 false refusals in both the greedy run and a fixed-seed Quickstart run |
| First-token KL from official base to this build | 0.00832 nats mean over 100 prompts |
The legitimate-request suite covers defensive security, safety communication, non-graphic fiction, and Japanese and Spanish requests. A separate review found 0/24 false refusals on the ordinary prompts. This checkpoint's one ordinary keyword hit came from an appropriate answer about lacking a physical daily routine. Some answers reached the output cap or missed a requested detail. Aggregate validation results
The fixtures run on Apple Silicon with ordinary decoding. Marker counts track wording on a small sample. General accuracy, long-context performance, and minimum RAM are unmeasured for this release. The optional upstream MTP head is included for experimentation, with speculative acceptance and speed unmeasured on these edited weights. Outputs can be inaccurate, and tool actions should be reviewed before execution.
Build and files
The base is Prism ML's Bonsai 2.5 MLX checkpoint at revision aa432fd0e17612f6684e728d4d3c42b6656bcabb. A bridge supplies MLX writer captures to the unmodified ARA.modify_model in Heretic v2.1.0, commit 4f89482c0d63f2552a582215939910f9f45a3e5f. The rank-50 fit uses fixed parameters from the earlier development study. The 800 fit prompt rows were matched against two public datasets, and sampled activations were replayed and matched to the archived capture. The fixed-grid bake changed 217,091,176 ternary codes across 126 language matrices with the original scale and bias tensors. Build summary
The Compact recipe quantizes 22 vision MLP expansion layers to affine 2-bit, group 128. Vision blocks 0, 1, 2, 20, and 26 retain FP16 expansion weights. model.safetensors is 8,408,001,336 bytes (7.83 GiB), about 187 MB smaller than the full-vision build. The separate MTP head adds approximately 266 MB to a full download. To verify the files after downloading, run shasum -a 256 -c SHA256SUMS. Build summary, SHA-256 manifest
Created using Bonsai by Prism ML, with the Qwen3.8-27B lineage from Alibaba Cloud and Heretic from Philipp Emanuel Weidmann and contributors. Apache 2.0 license, notices