Instructions to use davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF:Q2_0 # Run inference directly in the terminal: llama cli -hf davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF:Q2_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF:Q2_0 # Run inference directly in the terminal: llama cli -hf davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF:Q2_0
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF:Q2_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF:Q2_0
Use Docker
docker model run hf.co/davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF:Q2_0
- Llama new
- LM Studio
- Jan
- vLLM
How to use davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF:Q2_0
- Ollama
How to use davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF with Ollama:
ollama run hf.co/davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF:Q2_0
- Unsloth Desktop
- Pi
How to use davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF:Q2_0
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF:Q2_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF with Docker Model Runner:
docker model run hf.co/davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF:Q2_0
- Lemonade
How to use davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF:Q2_0
Run and chat with the model
lemonade run user.Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF-Q2_0
List all available models
lemonade list
- Hermes Agent
How to use davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF:Q2_0
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF:Q2_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF:Q2_0
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF:Q2_0" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Ternary-Bonsai-2-27B Abliterated β PQ2_0
A format repack, not a new ablation. Same weights as BoldingBuilds/Ternary-Bonsai-2-27B-Abliterated-PTQ1_0-GGUF, in PQ2_0 instead of PTQ1_0, because PTQ1_0 has GPU kernels for NVIDIA Ampere only.
On an AMD MI210 (gfx90a / CDNA2) that is a 2.2x difference:
| build | decode |
|---|---|
| Abliterated PTQ1_0 (the source release) | 23.8 tok/s |
| This build (PQ2_0) | 51.2 tok/s |
Single-stream, -ngl 99 -c 8192, one MI210, PrismML llama.cpp fork.
Why PTQ1_0 is slow outside Ampere
MMQ tile configs in the PrismML fork exist per architecture. PTQ1_0 has entries for Ampere and nowhere else:
mmq-config-ampere.cuh PTQ1_0=11 PQ2_0=16 Q2_0=16
mmq-config-cdna.cuh PTQ1_0=0 PQ2_0=7 Q2_0=7
mmq-config-rdna2/3/4 PTQ1_0=0 PQ2_0=12 Q2_0=12
mmq-config-pascal.cuh PTQ1_0=0 PQ2_0=11 Q2_0=11
PTQ1_0 is additionally #if !defined(GGML_USE_HIP)-gated in 17 places, and its eligibility
test is turing_mma_available(cc), hard-wired to NVIDIA. So on CDNA it falls back to fp16
dequantise + BLAS. PQ2_0 has CDNA kernels and takes the fast path.
How it was made
The ablated weights ship only as PTQ1_0, so the edit was transplanted rather than re-derived:
- Dequantised the abliterated and stock PTQ1_0 checkpoints and diffed them. Exactly 98
tensors differ β
ffn_down,ssm_out,attn_output, blocks 15-63 β matching the source release's stated scope. - Added that delta to the F16 checkpoint:
W_new = W_stock_f16 + (W_ref - W_stock). - Quantised F16 -> PQ2_0.
Do not try to reproduce this by projecting a refusal direction out. The source card
explains why, and it is worth repeating: on a ternary lattice,
W <- W - λ·rΒ·(rα΅W) followed by a repack changes 0 of 89,128,960 digits β the
correction is ~1.4% of a weight's magnitude while the lattice step is 100%, so every weight
rounds straight back. A projected-then-repacked model passes a file-size check and a
quantiser reproducibility check while containing no ablation at all.
I made exactly that mistake on the first attempt here, inferring a projection from the phrase "rank-1". Weight-space measurement caught it: the reference's projection onto the recovered direction is ~3x higher than stock (0.047 vs 0.015), not zero β the real edit flips lattice digits, it does not project.
Verification
Weight-exact against the source release. Dequantised and compared per tensor:
| distance to reference | |
|---|---|
| this build (98 edited tensors) | 0.000 |
| stock, same quantiser | 6.7 - 7.6 |
| control (752 untouched tensors) | 0.000 both |
Byte-level diff against stock run through the identical quantiser: 98 tensors differ (0.56-0.65% of bytes), 752 byte-identical. Quantisation is deterministic here, so that isolates the edit β it survived requantisation rather than being rounded away.
Because the weights are numerically identical to the source release, that release's evaluations apply β refusal 83.0% -> 1.0% on SimpleSafetyTests, XSTest-safe over-refusal 1.6% -> 0.0%, HumanEval pass@1 0.811 -> 0.805 (McNemar p = 1.000). Those numbers are BoldingBuilds', measured on the PTQ1_0 weights; I did not re-run them. What I verified is that these weights are the same ones, plus a capability spot-check (4/4 factual/arithmetic, coherent long-form).
PQ2_0 here is 2.45 bpw vs the stock PQ2_0 release's 2.13, because some tensors take a higher-precision fallback through this path.
Requirements
Needs the PrismML llama.cpp fork (PrismML-Eng/llama.cpp, branch prism). Stock
llama.cpp cannot load PQ2_0. For CDNA2:
cmake -S . -B build -DGGML_HIP=ON -DAMDGPU_TARGETS=gfx90a \
-DCMAKE_BUILD_TYPE=Release -DLLAMA_CURL=OFF
cmake --build build -j
It is a reasoning model: it emits reasoning_content before the answer, so a small
max_tokens truncates inside the reasoning and returns empty content. Give it room.
Attribution
Ablation by BoldingBuilds
(Apache 2.0) β this repo only changes the quantisation format.
Created using Bonsai by Prism ML. Built from Qwen3.8-27B, Copyright 2026 Alibaba Cloud
(Apache 2.0). See LICENSE and NOTICE.txt.
- Downloads last month
- 116
2-bit
Model tree for davetha/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-GGUF
Base model
Qwen/Qwen3.8-27B