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 Bonsai 2 27B Philadelphia Class
8.630 GB of weights plus correction: original packed weights (8,595,477,990 bytes) + required rank-8 adapter (34,093,704 bytes). Tokenizer/config/runtime files are additional. Keep the two files separate; do not merge and requantize the adapter. The base file alone is unchanged original Bonsai and does not contain the abliteration.
The adapter approximates the previously validated mixed-Q8 derivative using randomized SVD of its weight differences from the original ternary model. It is a compressed approximation, not a bit-identical reconstruction or a newly trained model. All 126 edited output matrices retain rank-8 corrections in FP16. This avoids the failed method of rounding edited weights back to ternary.
Validation
The actual original GGUF plus this adapter produced 0/126 refusals, 100.0% usable openings, and 21/24 benign capability passes. Original Bonsai scored 123/126 refusals and 22/24 capability passes; the larger mixed-Q4/Q8 releases scored 0/126 and 21/24. These are limited heuristic screens, not general intelligence or safety guarantees. MLX passed strict model+adapter loading, three numerical layer checks and one arithmetic generation prompt on Linux CPU. See evaluation.json for the exact scope.
Run
hf download KridgeDookie/Ternary-Bonsai-2-27B-ABLITERATED-UNCENSORED-PHILADELPHIA-CLASS-MLX-Mixed-2-4bit --include "compact/*" --local-dir bonsai-compact
pip install -r bonsai-compact/compact/requirements.txt
python bonsai-compact/compact/compact_runtime.py --model bonsai-compact/compact --prompt "Say hello briefly."
The supplied loader is required: from compact_runtime import load_compact; model, processor, config = load_compact(directory). It first loads the original schema-2 pack, then installs all 126 additive corrections. Loading just model.safetensors with the original loader omits the edits. This is the same compact 2-bit package in both mixed-precision MLX repositories; those repository names describe their older root-level models. The original vision weights are retained, but vision behavior was not tested. Linux CPU validation used the pinned MLX stack; macOS Metal has not been tested.
Provenance
Created using Bonsai by Prism ML. Original base: prism-ml/Ternary-Bonsai-2-27B-mlx-2bit; mixed-Q8 reference revision 61231c9a2feed6457f47d1d50a691b8dc96b2613. Apache-2.0 weights; source runtime retains its MIT license. The compact correction and loader were added 2026-09-21. artifact_manifest.json records hashes of the exact source and adapter files. compression.json records numerical approximation errors; compress_adapter.py records the build method.