/ Модель

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

Лицензия
Apache 2.0
Базовая модель
Ternary-Bonsai-2-27B-gguf
Библиотека
llama.cpp
Опубликована
23 сен 2026

Ternary-Bonsai-2-27B-abliterated-gguf

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

Экспериментальная GGUF-версия Ternary-Bonsai-2-27B для диалоговой генерации текста с изменёнными весами, снижающими частоту отказов.

2 459скачиваний за 30 дней2лайкавеса обновлены23 сен 2026

Бенчмарки

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

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

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

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

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

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

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

Это экспериментальная пользовательская версия Ternary-Bonsai-2-27B, созданная Override-6 на основе prism-ml/Ternary-Bonsai-2-27B-gguf. Модель предназначена для генерации текста в диалоговом режиме; автор изменил веса, чтобы существенно снизить частоту отказов на вредоносных запросах. Согласно карточке, в среднем изменено 0,64% тритов в 66 матрицах, при этом сохранены исходные ternary-веса и размер файла около 5,95 ГБ.

Модель использует формат GGUF PTQ1_0 и запускается через форк llama.cpp от Prism ML: стандартный llama.cpp не поддерживает нужное кодирование и преобразование активаций. Базовая модель построена на Qwen3.8-27B от Alibaba Cloud. В локальных проверках автор сообщает о снижении отказов, но часть ответов на вредоносные запросы остаётся смягчённой; тестирование охватывало лишь подмножество задач, а кодирование, вызов инструментов и зрение повторно не проверялись. Лицензия — Apache-2.0.

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

  • локальный запуск диалоговой языковой модели через llama.cpp от Prism ML
  • генерация ответов на пользовательские запросы
  • эксперименты с поведением модели на вредоносных запросах
  • сравнение способов изменения ternary-весов без увеличения размера модели

Ограничения

Для запуска требуется специальный форк llama.cpp от Prism ML; стандартный llama.cpp не поддерживает формат PTQ1_0 и нужное преобразование активаций. Оценка охватывает ограниченные тесты, часть вредоносных запросов всё ещё получает смягчённый ответ, а кодирование, вызов инструментов и зрение повторно не проверялись.

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

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

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

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

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

Открыть на Hugging Face

Ternary-Bonsai-2-27B — abliterated (still pure ternary)

This is an abliterated version of prism-ml/Ternary-Bonsai-2-27B-gguf (PTQ1_0 packing). It keeps the exact original file size, 5,946,648,928 bytes:

  • Every tensor has its original type and shape.
  • All 66 edited weight matrices are still {-1, 0, +1} × fp16 group-128 scales.
  • On average 0.64% of their trits were flipped, and their scales were refit.
  • No tensor was upcast to a higher-precision format.

Created using Bonsai by Prism ML. Built from Qwen3.8-27B (Alibaba Cloud). See NOTICE.txt.

Usage

These files need the PrismML llama.cpp fork, exactly like the original. Stock llama.cpp cannot run PTQ1_0 or apply the Hadamard activation transform.

# https://github.com/PrismML-Eng/llama.cpp/releases  (tested with prism-b10709-9a9394a, CUDA 12.4)
./llama-server -m Ternary-Bonsai-2-27B-PTQ1_0-abliterated.gguf -ngl 99 -fa on -c 32768

Sampling is the same as the base model: thinking mode temp 1.0, top_p 0.95, top_k 20.

Results

All numbers were measured locally on an RTX 4070 with the fork above.

Original PTQ1_0Naive abliteration (writers re-quantized to Q6_K)This model
File size5.95 GB9.36 GB5.95 GB
Harmful prompts, thinking mode: complied / deflected / refused0 / 3 / 101–76 / 27 / 1
Harmful prompts, no-think mode: complied / deflected / refused / empty1 / 8 / 95 / 044 / 50 / 10 / 074 / 30 / 0 / 0
MMLU, log-prob scoring (n=1000)78.978.279.0
GSM8K, thinking mode (n=100)94.093.094.0
IFEval, prompt-level strict (n=541, no-think)78.478.081.7
IFEval, instruction-level strict85.584.787.1
Needle-in-a-haystack, 8k / 16k / 32k / 64k (n=40)100 / 100 / 100 / 100100 / 100 / 100 / 100100 / 100 / 100 / 100
KL divergence vs original, harmless chats00.02400.0189
KL divergence vs original, wikitext-200.01340.0130

Evaluation setup

  • Harmful prompts: the 104 held-out prompts of mlabonne/harmful_behaviors (test split). Responses are labeled by an LLM judge (the original model in non-thinking mode, judge.py):
    • complied: it does what was asked
    • deflected: it answers with a sanitized, fictional or "ethical" substitute
    • refused
    • empty
  • KL divergence comes from llama-perplexity --kl-divergence against the original model. The harmless chat corpus is the original model's own answers to 200 held-out harmless_alpaca prompts.
  • IFEval uses the official checker code (via lm_eval). Needle-in-a-haystack hides a 7-digit code at 5 depths inside wikitext contexts.
  • Limits: these are subsets and spot checks, not the 14-benchmark thinking-mode suite reported by Prism ML. Coding, tool calling and vision were not re-evaluated.
  • Noise levels: with 100 GSM8K questions, differences of ±2–3 points are noise. The IFEval gain (+3.3 points, about 1.8 standard errors) is best read as "no loss, possibly a small gain".
  • Deflections remain: about a quarter of harmful requests still get a watered-down answer. A stronger setting reduces this at a measurable KL cost.

Comparison with other Bonsai 2 abliterations

Other community builds were evaluated with the same harness: same held-out prompts, same judge, same KL corpora, same flags. Numbers can differ from the ones on their own cards, which use other prompt sets and judges.

SizeNo-think: complied / deflected / refusedThinking: complied / deflected / emptyKL chat / wikiMMLUGSM8KIFEval strictNIAH 8k–64k
Original (prism-ml)5.95 GB1 / 8 / 950 / 3 / 00 / 078.99478.4100%
This model5.95 GB74 / 30 / 076 / 27 / 00.019 / 0.01379.09481.7100%
OS-Software Heretic (PTQ1_0)5.95 GB97 / 4 / 3101 / 0 / 30.011 / 0.00877.39178.2100%
dealignai CRACK (PQ2_0)7.21 GB88 / 16 / 098 / 5 / 10.046 / 0.06078.993––
BoldingBuilds (PTQ1_0)5.95 GB47 / 57 / 056 / 29 / 190.055 / 0.05079.592––

Summary: the OS-Software Heretic build is more uncensored: it deflects far less, with lower KL. This model keeps every capability benchmark at or above the original.

Prior work on lattice editing: editing the ternary/2-bit codes directly, instead of re-quantizing, is not unique to this model. BoldingBuilds, Hikari07jp and OS-Software released lattice-edited builds earlier. What this model adds is the published end-to-end pipeline and the scale-refit healing step.

Abliteration process

The scripts are in scripts/. The fixed refusal direction is scripts/directions/dirs_proj_both.npy.

1. Why the usual recipe fails on a ternary model

Abliteration replaces every residual-stream writer W with W − α·r·rᵀW. On this model:

  • The per-weight change is far below one ternary step (about 1% of a step, at most half a step).
  • Re-quantizing the projected matrix therefore just rounds back to the original model, so a naive ternary abliteration silently does nothing.
  • The alternative is to store the writers at higher precision, which makes the file 60% bigger.

2. Refusal direction (make_dirs.py, tools/actdump.cpp)

  • Capture the residual stream (l_out) of every layer at the last prompt token, for 400 harmful and 400 harmless training prompts.
  • Compute the direction at the layer-36 residual:
    • difference of means, harmful minus harmless
    • pooled over both answer positions: <think>\n (thinking mode) and </think>\n\n (no-think mode). The two per-mode directions only have cosine 0.64. A direction taken from one mode only leaves the other mode broken: the model returns empty answers.
    • orthogonalized against the harmless mean. The raw direction also carries general features; removing it wholesale gave KL ≈ 2.
  • On held-out prompts it separates harmful from harmless with Cohen's d ≈ 9.6 (thinking) and 9.05 (no-think).

3. Ternary-preserving ablation (abliterate.py)

  • The trits are edited directly. The PTQ1_0 block codec is re-implemented and verified to round-trip byte-exact.

  • For each writer in layers 16–48, the exact delta −α·r·(rᵀW) is realized by unbiased stochastic trit flips, followed by a small greedy correction so that rᵀW′ = (1−α)·rᵀW holds column by column.

  • Per-component strength:

    • α = 2.0 on attention and linear-attention output writers (attn_output, ssm_out)
    • α = 0.7 on ffn_down

    MLP edits cost far more KL per unit of refusal removed, consistent with Heretic's findings.

  • The Hadamard rotation of this model is on the input axis only, so an output-side projection is exact in the stored basis.

4. Healing (heal.py, tools/wdump.cpp)

  • Capture the rotated inputs of every writer (H = E[xxᵀ]) on 16k calibration tokens:

    • alpaca train prompts with the original model's answers
    • GSM8K train thinking traces
    • harmful-prompt train responses
    • wikitext-2 train

    None of these overlap the evaluation sets.

  • For each edited writer, refit only the fp16 group scales by ridge least squares, per output row: min_s (s·B − w*) H (s·B − w*)ᵀ, where w* = (I − α·r·rᵀ)W is the exact abliterated target. Trits, layout and size are unchanged.

5. What didn't work (so you don't have to try)

ApproachResult
Raw (unprojected) direction on all layersKL 1.4–7.8, model broken
Direction from the thinking position onlymany empty answers in no-think mode
Narrower layer bands (16–40, 16–44)refusal comes back (Hydra effect)
GPTQ trit re-selectionoutput error is lower, but it does not remove the direction by itself
Two orthogonal directionsworse on both refusal and KL
Overshoot α = 1.3–1.5 on all writers0% refusal but KL 2–4× higher and many empty answers

Reproducing

  1. actdump on thinking and no-think prompt files (prompts.py), then make_dirs.py.

  2. wdump on the calibration corpus (gen_calib.py), all layers.

  3. Build the model:

    python abliterate.py --src Ternary-Bonsai-2-27B-PTQ1_0.gguf --out cand.gguf \
        --dirs directions/dirs_proj_both.npy --dir-layer 36 --layers 16-48 --alpha-attn 2.0 --alpha-ffn 0.7
    python heal.py --orig Ternary-Bonsai-2-27B-PTQ1_0.gguf --edited cand.gguf --out final.gguf --acts wacts \
        --dirs directions/dirs_proj_both.npy --dir-layer 36 --layers 16-48 --alpha-attn 2.0 --alpha-ffn 0.7 --recorrect 0
    
  4. Evaluate with evalmodel.sh (refusal + KL), bench.py, mmlu_lp.py and judge.py.

Stochastic flips use seed 0.

Disclaimer

This model has had its refusal behavior removed. It will produce content the original model would decline to produce. You are responsible for how you use it and for complying with applicable laws.

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

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

GPU в ailist

llama.cpp

Можно запустить

Подбираем GPU…

Ревизия весов
44c0424

0 моделей