Instructions to use OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-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 OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-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 OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-GGUF:Q2_0 # Run inference directly in the terminal: llama cli -hf OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-GGUF:Q2_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-GGUF:Q2_0 # Run inference directly in the terminal: llama cli -hf OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-GGUF:Q2_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-GGUF:Q2_0 # Run inference directly in the terminal: ./llama-cli -hf OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-GGUF:Q2_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-GGUF:Q2_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-GGUF:Q2_0
Use Docker
docker model run hf.co/OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-GGUF:Q2_0
- LM Studio
- Jan
- vLLM
How to use OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-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": "OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-GGUF:Q2_0
- Ollama
How to use OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-GGUF with Ollama:
ollama run hf.co/OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-GGUF:Q2_0
- Unsloth Desktop
- Pi
How to use OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-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": "OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-GGUF:Q2_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-GGUF with Docker Model Runner:
docker model run hf.co/OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-GGUF:Q2_0
- Lemonade
How to use OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-GGUF:Q2_0
Run and chat with the model
lemonade run user.Ternary-Bonsai-2-27B-Uncensored-Heretic-GGUF-Q2_0
List all available models
lemonade list
- Hermes Agent
How to use OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-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 OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-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 OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-GGUF:Q2_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-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 "OS-Software/Ternary-Bonsai-2-27B-Uncensored-Heretic-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-Uncensored-Heretic-GGUF
A decensored version of Prism ML's Ternary-Bonsai-2-27B, with a Heretic LoRA baked into the ternary weights.
The LoRA was baked into the official PQ2_0 model by adjusting ternary codes while preserving the original block scales. The update affected 34 matrices; the remaining 817 tensors were unchanged. This is an approximate merge, not an exact floating-point LoRA merge.
Abliteration parameters
| Parameter | Value |
|---|---|
| start_layer_index | 27 |
| end_layer_index | 44 |
| preserve_good_behavior_weight | 1.0 |
| steer_bad_behavior_weight | 0.03 |
| overcorrect_relative_weight | 2.3 |
| neighbor_count | 1 |
| ridge_regularization | 0.00015 |
| transport_rank | 4 |
| entropy_regularization | 0.1 |
| transport | gaussian |
| lora_rank | 128 |
| row_normalization | none |
| target_components | attn.o_proj, mlp.down_proj |
| covariance_regularization | 0.01 |
| max_weight_change | 1.0 |
Performance
| Metric | This model | Original model (prism-ml/Ternary-Bonsai-2-27B-gguf) |
|---|---|---|
| Refusals | 0/100 | 95/100 |
| KL divergence | 0.0135 | 0 (by definition) |
Usage
Use the Prism ML fork of llama.cpp. Both formats require its ternary kernels and Hadamard activation transforms.
With the Prism llama-server executable available:
llama-server -m Ternary-Bonsai-2-27B-Uncensored-Heretic-PTQ1_0.gguf -ngl 99 -c 32768 --jinja --reasoning on --reasoning-effort medium --temp 1.0 --top-p 0.95 --top-k 20 --host 127.0.0.1 --port 8080
Open http://127.0.0.1:8080. Substitute the PQ2_0 filename to use that packing.
Local validation
| Check | PQ2_0 | PTQ1_0 |
|---|---|---|
| English perplexity โ WikiText-2 test | 10.1460 | 10.1435 |
| Japanese perplexity โ harmless_alpaca_ja test | 16.7833 | 16.7744 |
| Short functional checks passed | 16/16 | 16/16 |
Perplexity was measured with a 512-token context over 4,080 English and 3,570 Japanese scored tokens. Functional checks covered arithmetic, JSON, translation, and reading comprehension. Slight numerical differences between packings can arise from their runtime kernels.
These are small local tests, not a comprehensive benchmark. Long-context performance, and vision behavior have not been evaluated for this release.
โ ๏ธ Important Notice
This model has undergone substantial reduction of its safety alignment. As a result, it is more likely than standard models to generate harmful, inaccurate, biased, offensive, or otherwise inappropriate content.
Intended Use
For research and experimentation only, including safety research, alignment studies, and red-teaming. Please avoid deploying it in public or end-user-facing services.
User Responsibility
All outputs should be treated as untrusted and independently verified before use. Users are solely responsible for:
- Evaluating the accuracy and suitability of generated content
- Implementing appropriate safeguards and human oversight
- Complying with applicable laws, regulations, licenses, and ethical standards
Use of this model is entirely at your own risk.
Disclaimer
OS-Software provides this model without warranties of any kind and assumes no liability for any direct or indirect damages, losses, misuse, or legal consequences arising from its use.
Acknowledgements
Thanks to the base model developers, p-e-w for Heretic, and the wider open-source community.
This is a derivative work released under the base modelโs applicable license. All rights to the base model remain with their respective owners.
- Downloads last month
- 128,163
1-bit
2-bit