Instructions to use KridgeDookie/Ternary-Bonsai-2-27B-ABLITERATED-UNCENSORED-PHILADELPHIA-CLASS-MLX-Mixed-2-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use KridgeDookie/Ternary-Bonsai-2-27B-ABLITERATED-UNCENSORED-PHILADELPHIA-CLASS-MLX-Mixed-2-4bit with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("KridgeDookie/Ternary-Bonsai-2-27B-ABLITERATED-UNCENSORED-PHILADELPHIA-CLASS-MLX-Mixed-2-4bit") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use KridgeDookie/Ternary-Bonsai-2-27B-ABLITERATED-UNCENSORED-PHILADELPHIA-CLASS-MLX-Mixed-2-4bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "KridgeDookie/Ternary-Bonsai-2-27B-ABLITERATED-UNCENSORED-PHILADELPHIA-CLASS-MLX-Mixed-2-4bit"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "KridgeDookie/Ternary-Bonsai-2-27B-ABLITERATED-UNCENSORED-PHILADELPHIA-CLASS-MLX-Mixed-2-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use KridgeDookie/Ternary-Bonsai-2-27B-ABLITERATED-UNCENSORED-PHILADELPHIA-CLASS-MLX-Mixed-2-4bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "KridgeDookie/Ternary-Bonsai-2-27B-ABLITERATED-UNCENSORED-PHILADELPHIA-CLASS-MLX-Mixed-2-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "KridgeDookie/Ternary-Bonsai-2-27B-ABLITERATED-UNCENSORED-PHILADELPHIA-CLASS-MLX-Mixed-2-4bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KridgeDookie/Ternary-Bonsai-2-27B-ABLITERATED-UNCENSORED-PHILADELPHIA-CLASS-MLX-Mixed-2-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use KridgeDookie/Ternary-Bonsai-2-27B-ABLITERATED-UNCENSORED-PHILADELPHIA-CLASS-MLX-Mixed-2-4bit with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "KridgeDookie/Ternary-Bonsai-2-27B-ABLITERATED-UNCENSORED-PHILADELPHIA-CLASS-MLX-Mixed-2-4bit"
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 KridgeDookie/Ternary-Bonsai-2-27B-ABLITERATED-UNCENSORED-PHILADELPHIA-CLASS-MLX-Mixed-2-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use KridgeDookie/Ternary-Bonsai-2-27B-ABLITERATED-UNCENSORED-PHILADELPHIA-CLASS-MLX-Mixed-2-4bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "KridgeDookie/Ternary-Bonsai-2-27B-ABLITERATED-UNCENSORED-PHILADELPHIA-CLASS-MLX-Mixed-2-4bit"
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 "KridgeDookie/Ternary-Bonsai-2-27B-ABLITERATED-UNCENSORED-PHILADELPHIA-CLASS-MLX-Mixed-2-4bit" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Compact release
A smaller 8.630 GB base + adapter package is available in compact/. The adapter is required. Download only compact/* and follow its loading instructions; downloading this whole repository also fetches the older larger models. The GGUF adapter passed 0/126 refusals and 21/24 benign tasks. MLX has Linux CPU smoke and layer validation, not Apple-hardware validation.
Earlier mixed-precision release
Bonsai 2 27B — Philadelphia Class
An abliterated derivative of PrismML Bonsai 2 27B, built with the same two-pass Qwen3.8 Philadelphia recipe. Refusal directions were re-extracted from Bonsai for each pass; no Qwen weights or saved Qwen directions were substituted.
What changed
Two norm-preserving biprojection passes, layers 1–63, scale 1.0, 126 output matrices per pass. The 842 paired prompts were split into 716 extraction pairs and 126 family-disjoint held-out pairs with seed 1337. See recipe.json and the two provenance files.
These are mixed-precision models. Unedited quantized language matrices retain their original rotated ternary representation; auxiliary and vision tensors retain their source precision. The 126 edited matrices use canonical, unrotated Q4_0 or Q8_0 values. GDN column ordering and Hadamard manifests were updated accordingly. Pure ternary repacking erased the edit (124/126 held-out refusals), so that failed candidate is not distributed here.
Validation
| Model | Refusals / 126 | Benign tasks passed / 24 |
|---|---|---|
| Original Bonsai | 123 | 22 |
| Mixed 4-bit | 0 | 21 |
| Mixed 8-bit | 0 | 21 |
These are deterministic heuristic screens, not broad intelligence scores. The held-out screen used 96 output tokens, greedy decoding, repetition penalty 1.1, and a 4096-token GGUF context on an A100 80 GB. The intermediate BF16 final checkpoint passed its separate 126-prompt, 24-token opening gate with zero refusals and 100% usable openings. Raw harmful prompts and responses are not included.
MLX checks cover strict full-model reload, one arithmetic generation smoke test on Linux CPU, and independent packed-layer numerical checks. No iPhone, macOS Metal, or App Store validation was performed. Weights need additional runtime and cache memory; file size is not a device RAM requirement. Vision weights are preserved in MLX but vision behavior was not re-evaluated.
Full aggregate results and exact scope are in evaluation.json. Do not apply the upstream model's intelligence or throughput claims to this derivative.
Sources and license
Created using Bonsai by Prism ML. Derived from PrismML GGUF at 6ed5e12bf84b7a63069882c91dd9e9218647d17b and PrismML MLX at 3f926b415992eaa2ae9dd7b573706494d6bbf787. Bonsai derives from Qwen3.8-27B. Weights retain Apache-2.0 licensing; bundled runtime code retains its own MIT license. Modifications made 2026-09-21.
Running MLX
Weight file: 11.20 GB, including the unchanged vision tower. Most language weights are 2-bit; edited matrices are 4-bit, group size 32. Use the bundled mixed-precision loader. Generic MLX loaders and unmodified upstream Bonsai loaders do not implement this mixed format correctly.
hf download KridgeDookie/Ternary-Bonsai-2-27B-ABLITERATED-UNCENSORED-PHILADELPHIA-CLASS-MLX-Mixed-2-4bit --exclude "compact/*" --local-dir bonsai-mlx
pip install -r bonsai-mlx/runtime/requirements.txt
import sys
sys.path.insert(0, "bonsai-mlx/runtime")
from vision_artifact import load_vl_model, chat_config
from mlx_vlm import generate
from mlx_vlm.prompt_utils import apply_chat_template
model, processor, config = load_vl_model("bonsai-mlx")
prompt = apply_chat_template(processor, chat_config(config), "Say hello briefly.", num_images=0)
print(generate(model, processor, prompt, max_tokens=128, temperature=0.0))
The runtime changes add per-module bit widths and group sizes. The schema-2 vision-capable loader also handles text-only use. Swift/iOS full-model integration remains separate work.
- Downloads last month
- 611
Quantized
Model tree for KridgeDookie/Ternary-Bonsai-2-27B-ABLITERATED-UNCENSORED-PHILADELPHIA-CLASS-MLX-Mixed-2-4bit
Base model
Qwen/Qwen3.8-27B