/ Модель

Характеристики

Контекст
262 144 токена
Лицензия
Apache 2.0
Архитектура
prism_hadamard_qwen35 · dense
Базовая модель
Ternary-Bonsai-2-9B-mlx-2bit
Опубликована
12 ноя 2026

Ternary-Bonsai-2-9B-MTPLX

Генерация текстаТекст → текст10 профессий

Перепаковка мультимодальной 9B-модели Prism ML с 2-битным квантованием для локального диалога, анализа изображений и агентного программирования на Apple Silicon.

188скачиваний за 30 дней0лайковвеса обновлены12 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

EngineeringWithJay подготовила перепаковку мультимодальной модели Ternary Bonsai 2 9B от Prism ML в формат MTPLX для запуска с нативным спекулятивным декодированием MTP на Apple Silicon. Весовые данные не изменялись; README описывает перенос MTP-головы и обновление конфигурации и метаданных упаковки. Модель использует плотную архитектуру prism_hadamard_qwen35, 9 млрд параметров и 2-битное тернарное квантование основной части; MTP-голова квантована до 4 бит. Она принимает текст и изображения и предназначена для диалога, анализа изображений и агентного программирования. Заявленный нативный контекст — 262 144 токена; на указанной системе с 16 ГБ памяти самый большой принятый запрос составлял 63 133 токена.

Для запуска требуется MTPLX 2.12 или новее; обычный mlx-lm этот пакет загрузить не может. В README приведены измерения скорости на одном компьютере, но отдельная таблица точности MTP не опубликована. Это базовая модель, а не дообученная Swift-версия. Лицензия — Apache-2.0.

Сценарии применения

  • диалог с локальной языковой моделью на Apple Silicon
  • анализ изображений в запросах к модели
  • визуальная помощь при написании и разборе кода
  • запуск спекулятивного декодирования MTP через MTPLX

Ограничения

Для загрузки требуется MTPLX 2.12 или новее, обычный mlx-lm не поддерживается. Это базовая модель без постобучения Swift; поведение с видео и несколькими изображениями не проверялось, а отдельные показатели принятия MTP не опубликованы.

Для каких профессий подходит10

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Ternary Bonsai 2 9B — MTPLX pack (EngineeringWithJay)

This is our own repackaging of Prism ML's official Ternary-Bonsai-2-9B-mlx-2bit into the MTPLX pack contract, so that the 9B can be served with native MTP speculative decoding on Apple silicon instead of only through Prism's bundled mlx-vlm runtime.

No weight bytes were changed. The trunk is byte-identical to the upstream pack (model.safetensors sha256 b8ebd13459dcd53504432a4a0a797287…, 3,462,149,260 bytes) and the MTP head is Prism's own qwen3_5_mtp 4-bit g64 head with its 31 tensors unchanged. We changed packaging and identity metadata only.

Why we made it

We wanted a fast local model for visual agentic coding. On this Mac (M5 Air, 16 GB) the 27B Swift pack we serve reaches ~23 t/s and needs 8.2 GB of weights; this 9B needs 3.4 GB and runs at 53.4 t/s, which leaves room in the same 16 GB for a long KV cache. The trade is knowledge: this is the base Ternary Bonsai 2 9B, not a Swift (DPO) derivative.

Measured on this machine

All numbers from one M5 Air (16 GB unified memory), MTPLX 2.12.3, one model resident, thinking disabled:

measurementresult
text decode53.4 t/s
decode with an image in the prompt30.4 t/s
largest prompt accepted63,133 tokens (a fresh ~95K prefill hit a 507 insufficient-memory abort on this 16 GB host)
conversation turn after the first0.6 s for a 16K-token conversation, because the KV prefix is restored from the session bank instead of re-prefilled (14.1 s on the first turn)
visionread GROUND TRUTH 42 verbatim from a rendered PNG; read all four ANSI-coloured test verdicts (FAIL/PASS/WARN) by colour from a terminal image; read every value of a real UI viewport screenshot correctly

Vision

This pack carries Prism's genuine vision tower for the Ternary Bonsai 2 9B lineage (hidden 4096, 27 blocks, 1152-wide, 4-bit HQQ), so it is a real vision-language model rather than a text model with a grafted tower. Images go in through the OpenAI-compatible API as image_url parts with a data: URL.

How to serve it

Requires MTPLX 2.12+ (mtplx serve). Plain mlx-lm cannot load this pack: its model_type is prism_hadamard_qwen35, which carries the Hadamard/sign-flip integration the format needs.

mtplx serve \
  --model /path/to/Ternary-Bonsai-2-9B-MTPLX \
  --port 8002 --cache-dir /path/to/models \
  --reasoning off --allow-swap \
  --mtp --generation-mode mtp \
  --mtp-batch-numerics throughput --draft-core device \
  --scheduler-mode hyper --batching-preset latency \
  --paged-kv-quantization q4 \
  --ssd-session-cache on --ssd-session-cache-dir /path/to/ssd-bank \
  --ssd-session-cache-max-size 30G

Two environment variables matter on a 16 GB Mac:

export MTPLX_MEMORY_LIMIT_BYTES=14495552000   # engine budget (Metal limit is 13.5G)
export MTPLX_SESSION_BANK_MAX_BYTES=3221225472 # 3G bank budget enables KV prefix reuse

Do not lower the session bank budget to 64 MB. With a small budget the bank cannot hold one conversation entry (a 14K-token entry needs ~989 MB), so the prefix is never reused and every turn re-prefills the whole conversation — 14.1 s per turn instead of 0.6 s on the same workload.

Check the pack before serving:

mtplx inspect --model /path/to/Ternary-Bonsai-2-9B-MTPLX
# tier: verified | can_run: true | runtime_compatibility: native | mtp_layers: 1

What we changed relative to the upstream pack

Four packaging changes, all verified by mtplx inspect:

  1. mtp/model.safetensors moved to mtp.safetensors at the pack root, because MTPLX looks for the sidecar there.
  2. Its 31 tensor keys were given the mtp. prefix (fc.weight → mtp.fc.weight). Prism ships them unprefixed for mlx-vlm; MTPLX expects the prefix.
  3. config.json gained mtplx_mtp_contract, mtplx_mtp_quantization (bits 4, group size 64, mode affine, policy all, prequantized true), mlx_lm_extra_tensors.mtp_file, model_family, and text_config.mtp_num_hidden_layers = 1.
  4. mtplx_runtime.json was written, with exactness_baseline citing Prism's own reload validation (all 248,320 logits exact after reload, 202 packed modules, tokenizer ids and BPE merges matching).

The tensor namespace was already language_model.* + vision_tower.*, matching MTPLX's contract, and components.mtp was set to true to match the sidecar we ship.

Architecture

propertyvalue
familyTernary Bonsai 2 9B (Prism ML), prism_hadamard_qwen35
trunk quantization2-bit ternary, affine, group size 128
hidden size4096
layers32 (8 full-attention, 24 linear-attention / Gated DeltaNet)
attention heads16 attention / 4 key-value, head_dim 256
MTP headqwen3_5_mtp, 4-bit group-64 affine, prequantized, depth 1
context262,144 native
KV per token32 KB bf16 (16 full-attention layers would be 64 KB; the 9B has 8)
vision tower27 blocks, hidden 1152, 4-bit HQQ

Limitations

  • This is the base model. It is not a Swift finetune and does not have Swift's reduced thinking tokens or its post-training.
  • The MTP head is Prism's own, trained against the Ternary Bonsai 2 trunk, so acceptance here is the upstream head's acceptance for this lineage. We measured decode rates on this machine but did not publish a separate acceptance-rate table.
  • The ~95K fresh-prefill abort above is a property of this 16 GB host, not of the pack: the model declares 262,144 native context and MTPLX's own plan for this pack reported a 65,536-token fit under q4 KV.
  • components.vision is true because this lineage genuinely has a vision tower. We verified text-image reading, not video or multi-image behaviour.

License and attribution

Apache-2.0. The weights are Prism ML's, redistributed unchanged; our repackaging (README, mtplx_runtime.json, config.json additions, packaging) is also Apache-2.0. See NOTICE.txt for the full attribution chain and LICENSE for the licence text.

Citation

@misc{engineeringwithjay_ternary_bonsai2_9b_mtplx,
  title  = {Ternary Bonsai 2 9B -- MTPLX pack},
  author = {EngineeringWithJay},
  year   = {2026},
  note   = {MTPLX-native repackaging of prism-ml/Ternary-Bonsai-2-9B-mlx-2bit; weight bytes unchanged},
  url    = {https://huggingface.co/EngineeringWithJay/Ternary-Bonsai-2-9B-MTPLX}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Нельзя запустить

MLX-модели работают только на Apple Silicon, на GPU NVIDIA они не запускаются.

Ревизия весов
8d949d2

0 моделей