/ Модель

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

Контекст
262 144 токена
Лицензия
Apache 2.0
Архитектура
prism_hadamard_qwen35 · dense
Библиотека
mlx
Опубликована
30 окт 2026

Ternary-Bonsai-2-27B-Uncensored-Heretic-v2-mlx-2bit-compact-TensorFold

Изображение и текст → текст9 профессий
738скачиваний за 30 дней0лайковвеса обновлены30 окт 2026

Описание модели

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

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

Ternary-Bonsai-2-27B-Uncensored-Heretic-v2-mlx-2bit-compact-TensorFold — экспериментальный вариант компактной мультимодальной модели Ternary Bonsai 2 27B, подготовленный 3hs4n для локального запуска на Apple Silicon. Репозиторий использует архитектуру семейства prism_hadamard_qwen35, формат safetensors и библиотеку MLX. По README, веса целевой модели не менялись: ускорение обеспечивают модифицированный TensorFold с DFlash2 и управление памятью; черновые веса квантизуются до 4 бит при загрузке.

Модель предназначена для диалогов, рассуждений, анализа изображений и вызова инструментов. Поддерживаемые сценарии работы с изображениями включают OCR, подсчёт объектов, пространственные вопросы, графики и несколько изображений в запросе. В README указаны проверки на Mac M1 Max с 64 ГБ объединённой памяти; измеренный пик памяти процесса — 20,74 ГиБ. Запуск требует Apple Silicon, macOS 26 или новее и Python 3.11 для arm64. Для изображений общий бюджет составляет 4096 визуальных токенов; компактная башня обработки изображений теряет часть деталей по сравнению с исходной FP16-версией. Лицензия — Apache-2.0. Результаты производительности и качества ограничены описанными проверками на конкретном оборудовании и не являются универсальными гарантиями.

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

  • ответы на вопросы по изображению
  • извлечение текста с изображений и сканов
  • подсчёт объектов на изображении
  • анализ графиков и диаграмм
  • пространственные вопросы по изображению
  • локальный чат с вызовом инструментов

Ограничения

Проверена на ограниченном наборе тестов и на Mac M1 Max с 64 ГБ памяти, поэтому показатели не гарантируют аналогичное качество или скорость на других системах. Бюджет обработки изображений ограничен 4096 визуальными токенами, а компактная vision-модель теряет часть деталей исходного FP16 варианта.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

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

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

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

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

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

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

Открыть на Hugging Face

Ternary-Bonsai-2-27B-Uncensored-Heretic-v2-mlx-2bit-compact-TensorFold

Experimental, downloadable Apple Silicon release with target weights, drafter and a pinned TensorFold runtime. Validated on an Apple M1 Max with 64 GiB unified memory. Use the included launcher to obtain the measured TensorFold behavior.

This edition serves the existing Compact Heretic v2 MLX checkpoint through a modified TensorFold engine with DFlash2 acceleration, vision, bounded thinking and native tool calls. The target and on-disk drafter weights are unchanged. The improvements come from inference software and memory management.

At a glance

ItemMeasured or validated result
Target weights8.41 GB, unchanged
Existing BF16 drafter3.85 GB; quantized to 4-bit in RAM at load
Complete HF repositoryApproximately 12.27 GB, including 12.26 GB of target + drafter weights
Runtime installationAbout 1.11 GB allocated in the tested environment; dependencies download separately
Tested MacApple M1 Max, 64 GiB unified memory
Maximum observed process footprint20.74 GiB, including the clean-package full-resolution image test
Text / code / math decode27.1 / 57.0 / 31.0 tokens/s
Quality comparison77/80 for both runtimes, with the same three failures
Validated configuration8K context, greedy, one sequence, prefix cache disabled
Model/API errors in the final comparison0

The process-memory peak excludes the rest of macOS and other apps. Minimum system RAM has not been established; only the stated 64 GiB Mac was tested. File size is not the RAM requirement.

Download and run

Requirements: Apple Silicon, macOS 26 or newer, native arm64 Python 3.11, and enough free unified memory for the observed 20.74 GiB process peak plus macOS and your other apps. A 64 GiB Mac is the tested hardware; a minimum RAM configuration has not been established. Unload other large models first.

Download the whole repository, including drafter/ and runtime/. With the Hugging Face CLI installed:

hf download 3hs4n/Ternary-Bonsai-2-27B-Uncensored-Heretic-v2-mlx-2bit-compact-TensorFold --local-dir Compact-TensorFold
cd Compact-TensorFold
python3.11 install.py
python3 serve.py

install.py verifies all release checksums, creates .venv-tensorfold, installs the 79 hash-pinned dependency wheels and the bundled TensorFold wheel, then checks dependencies. Initial installation requires internet access. The launcher loads the included weights offline; it does not fetch another model. Installation leaves your other environments unchanged. The lock is specific to Python 3.11 / macOS arm64; this edition has not been validated on Windows, Linux or other GPUs.

The dependency wheels total approximately 254 MB of additional download; an installed environment occupied about 1.11 GB in the measured setup. Download size, installed software size and process RAM are different measurements.

The dedicated OpenAI-compatible endpoint is http://127.0.0.1:8080/v1. Use python3 serve.py --port 8088 if that port is occupied. The model ID is Ternary-Bonsai-2-27B-Uncensored-Heretic-v2-mlx-2bit-compact-TensorFold, also returned by /v1/models. A client that supports custom OpenAI-compatible servers can connect to this endpoint. Native in-app TensorFold loading in Unsloth or LM Studio has not been validated. Opening the MLX weights directly in an app does not activate this TensorFold engine.

curl http://127.0.0.1:8080/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"Ternary-Bonsai-2-27B-Uncensored-Heretic-v2-mlx-2bit-compact-TensorFold","messages":[{"role":"user","content":"What is 17 times 19?"}],"temperature":0,"max_tokens":256}'

The launcher checks Ollama for loaded models at startup and during use; on contention it stops only its own child. Additional OpenAI-compatible services can be guarded with --check-model-url http://127.0.0.1:PORT/v1/models. Inspect settings without loading with python3 serve.py --show-command; stop with Ctrl-C. Prefix caching and disk snapshots are disabled in this measured profile.

Thinking is off by default. To enable it for a request, use:

{
  "chat_template_kwargs": {"enable_thinking": true},
  "thinking_budget": 128
}

The launcher supplies a 128-token default thinking budget when a thinking request omits one. The measured speed profile uses temperature 0. Other sampling settings have not been validated for this edition.

Speed and memory

The comparison used the same target checkpoint, AC power and one test server at a time. The native runtime was bracketed by two TensorFold speed arms, with excluded warmups and 3 native / 6 TensorFold timed samples per workload.

ProbeNative mlx-vlmTensorFold + DFlash2Observed change
Text21.15 tokens/s27.05 tokens/s+27.9%
Code21.04 tokens/s57.04 tokens/s+171.2%
Math explanation21.08 tokens/s31.04 tokens/s+47.2%
Peak process RAM, including large-image test14.08 GiB20.67 GiBTensorFold uses more RAM

The earlier text-only TensorFold profile peaked at 22.83 GiB. Releasing loading buffers earlier and using 512-row prefill chunks reduced the final peak by 2.15 GiB / 9.4%, even with vision enabled. Decode rates stayed within about 1% of that earlier profile.

The rates include stream-completion overhead after the first text event. Text and math throughput probes stop at 128 tokens, so their speed results do not grade a complete answer. Faster decoding also does not imply a faster first token: code first-token latency was approximately 0.392 s native / 0.645 s TensorFold. Both complete coding and broader quality checks were evaluated separately.

Two candidate server starts took approximately 69–70 seconds, including startup checks. Preparation, implementation, validation and final audit took 44.5 minutes in the recorded session. These are observations on this Mac, not timing guarantees for other hardware.

Quality and vision

Fixed checksNativeTensorFold
Original Compact fixtures20/2020/20
Additional synthetic checks46/4846/48
Fixed 12-question GSM8K subset11/1211/12
Total77/8077/80

No quality regressions were observed in this suite. Both runtimes made the same three errors: Persian 17+23, selecting only the last code from a list, and GSM8K test index 450. These results are not universal accuracy, an official full benchmark, or proof that all outputs match between runtimes. Drafted/plain token hashes matched 7/7 probes within TensorFold, including image cases. Relevant unit tests passed 120/120.

The tested image capabilities include OCR, counting, spatial questions, charts, multiple images, image-based thinking and a native tool call based on image text. A separate 2,048×2,048 OCR image ran at 4,096 vision tokens and passed on both runtimes: 45.95 s TensorFold / 48.82 s native, one observation each.

The frontend shares a 4,096-visual-token budget across a request's images; larger images or multiple images can be resized to fit. The existing Compact tower remains lossy compared with the original FP16 vision tower. This runtime does not retrain vision or recover detail lost in the original Compact quantization.

Runtime and compatibility

The installed engine is TensorFold Python 0.6.6, locally versioned 0.6.6+compact.vision2. Native TensorFold 1.1.9 does not include this Bonsai integration. The tested stack is Python 3.11.15, MLX 0.32.4, mlx-lm 0.32.2, mlx-vlm 0.7.11, Transformers 5.22.1 and HF Hub 2.4.0. Exact installed packages are in the runtime requirements; the hash lock pins the actual wheels used by the installer.

The runtime patch adapts the real Qwen vision frontend to Prism's Hadamard-aware embedding, adds image rotary handling, reduces temporary loading buffers and provides the measured prefill setting. It preserves target weights and the matching signed Hadamard transforms.

Validated scope is this 8K, single-sequence greedy profile on the stated Mac. Sampling, larger contexts, automatic prefix caching, video, concurrent clients and other GPUs remain untested. The checkpoint's configured 262,144-token architectural limit does not establish that this runtime profile has been validated at that length. The Uncensored name is inherited from the source; this work did not further alter refusal behavior.

Provenance, integrity and license

  • Target: 3hs4n's Compact Heretic v2 MLX release, with original contributions from Prism ML and OS-Software. Target SHA256: d667a865dd15a1f926c2495c751fbe6e16ee6e372fc61eb59c439445c97da8fb.
  • Drafter: naklitechie/Qwen3.8-27B-DFlash2-ternary-bonsai2, derived from z-lab's DFlash2, revision 0059b38aa255698b1a87305eb3fbb5a3cfd616e2. Drafter SHA256: eb141d0fb8621cf7a7c81047b83810fa19b8093543bd05529e9478d9555cb8f1.
  • Engine: ashhart/TensorFold, original Python source commit cb2ebf0540f42604e2759b2ddef497861e928248, with the included local patch.
  • MLX and mlx-vlm provide the tensor runtime and vision tower implementation. The source target, drafter and TensorFold use Apache-2.0; their licenses and notices are preserved in this repository, drafter/, and the bundled runtime wheel/source archive. Dependency licenses remain their own.

Both weight checksums were verified after inference. Sanitized measured results accompany this card. The release contains no local environments, raw working logs, credentials or personal computer paths. Verify a downloaded copy with python3 install.py --verify-only or shasum -a 256 -c SHA256SUMS. The portable smoke test checks text, thinking, native tools with a round trip, OCR and a 4,096-token image against a running server. It is a small integration test, separate from the 80-check quality comparison.

A fresh installation from the bundled wheel and 79 hash-verified dependency wheels passed dependency checks and 6/6 integration checks with 0 errors. Startup was 82.9 seconds, followed by 62.7 seconds for the checks. Full-image OCR used 4,124 prompt tokens and took 45.39 seconds. That run peaked at 20.74 GiB. See clean-install evidence. These one-run packaging checks are reported separately from the repeated native/TensorFold performance comparison above. To repeat them after starting the server:

python3 smoke_test.py

The runtime source archive in runtime/ contains the already patched source, its Apache license, third-party notices and bundled-code licenses. To rebuild the wheel, unpack it and run python -m pip wheel --no-deps --no-build-isolation ./tensorfold-0.6.6+compact.vision2 in an environment with setuptools and wheel installed. Do not apply the patch twice. Public source identities and both weight hashes are recorded in release provenance.

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

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

GPU в ailist

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

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

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

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

0 моделей