Text Generation
GGUF
llama.cpp
ternary
2-bit
llama-cpp
cuda
metal
on-device
hybrid-attention
agentic
tool-calling
speculative-decoding
mtp
prismml
bonsai
conversational
Instructions to use prism-ml/Ternary-Bonsai-2.5-27B-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 prism-ml/Ternary-Bonsai-2.5-27B-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 prism-ml/Ternary-Bonsai-2.5-27B-GGUF:Q2_0 # Run inference directly in the terminal: llama cli -hf prism-ml/Ternary-Bonsai-2.5-27B-GGUF:Q2_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf prism-ml/Ternary-Bonsai-2.5-27B-GGUF:Q2_0 # Run inference directly in the terminal: llama cli -hf prism-ml/Ternary-Bonsai-2.5-27B-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 prism-ml/Ternary-Bonsai-2.5-27B-GGUF:Q2_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf prism-ml/Ternary-Bonsai-2.5-27B-GGUF:Q2_0
Use Docker
docker model run hf.co/prism-ml/Ternary-Bonsai-2.5-27B-GGUF:Q2_0
- Llama new
- LM Studio
- Jan
- vLLM
How to use prism-ml/Ternary-Bonsai-2.5-27B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prism-ml/Ternary-Bonsai-2.5-27B-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": "prism-ml/Ternary-Bonsai-2.5-27B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/prism-ml/Ternary-Bonsai-2.5-27B-GGUF:Q2_0
- Ollama
How to use prism-ml/Ternary-Bonsai-2.5-27B-GGUF with Ollama:
ollama run hf.co/prism-ml/Ternary-Bonsai-2.5-27B-GGUF:Q2_0
- Unsloth Desktop
- Pi
How to use prism-ml/Ternary-Bonsai-2.5-27B-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf prism-ml/Ternary-Bonsai-2.5-27B-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:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "prism-ml/Ternary-Bonsai-2.5-27B-GGUF:Q2_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use prism-ml/Ternary-Bonsai-2.5-27B-GGUF with Docker Model Runner:
docker model run hf.co/prism-ml/Ternary-Bonsai-2.5-27B-GGUF:Q2_0
- Lemonade
How to use prism-ml/Ternary-Bonsai-2.5-27B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull prism-ml/Ternary-Bonsai-2.5-27B-GGUF:Q2_0
Run and chat with the model
lemonade run user.Ternary-Bonsai-2.5-27B-GGUF-Q2_0
List all available models
lemonade list
- Hermes Agent
How to use prism-ml/Ternary-Bonsai-2.5-27B-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 prism-ml/Ternary-Bonsai-2.5-27B-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:9931/v1 hermes config set model.default prism-ml/Ternary-Bonsai-2.5-27B-GGUF:Q2_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use prism-ml/Ternary-Bonsai-2.5-27B-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf prism-ml/Ternary-Bonsai-2.5-27B-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:9931/v1 \ --custom-model-id "prism-ml/Ternary-Bonsai-2.5-27B-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"
Download presets/llama.cpp/mtp-metal.json from prism-ml/Ternary-Bonsai-2.5-27B-GGUF: direct link, hf CLI and curl.
- Browser
- Download file 4.54 kB
-
https://huggingface.co/prism-ml/Ternary-Bonsai-2.5-27B-GGUF/resolve/main/presets/llama.cpp/mtp-metal.json
- Command line
-
hf download hf://prism-ml/Ternary-Bonsai-2.5-27B-GGUF/presets/llama.cpp/mtp-metal.json
-
curl -L -o mtp-metal.json https://huggingface.co/prism-ml/Ternary-Bonsai-2.5-27B-GGUF/resolve/main/presets/llama.cpp/mtp-metal.json
4.54 kB
| { | |
| "schema": "prism-mtp-backend-settings/v1", | |
| "model": "Bonsai 2.5 Ternary 27B with MTP draft head (v2)", | |
| "backend": "metal", | |
| "source": { | |
| "repo": "prism-ml/Ternary-Bonsai-2.5-27B-gguf-mtp", | |
| "revision": "538feafac9 (main, same card as tag v2)", | |
| "document": "README.md", | |
| "head_version": "v2", | |
| "note": "Private, unreleased model. Settings and numbers are copied from the card; do not redistribute." | |
| }, | |
| "file": { | |
| "name": "Ternary-Bonsai-2.5-27B-PQ2_0-mtp.gguf", | |
| "size_bytes": 7492338944, | |
| "sha256": "ededc9fc0a8a6a8dd30914d107b2d2ce7674d789f1d05a1a481f240609aa6c23" | |
| }, | |
| "why_this_file": "PQ2_0 (simple 2-bit packing) is the fastest packing on Apple Silicon; needs the PrismML llama.cpp fork.", | |
| "profiles": [ | |
| { | |
| "id": "metal-apple-silicon", | |
| "devices": [ | |
| "MacBook Pro M4 Pro (measured)", | |
| "Apple Silicon" | |
| ], | |
| "released_build": { | |
| "build": "prism-b12128-d7b2896", | |
| "draft": { | |
| "spec_type": "draft-mtp", | |
| "n_min": 0, | |
| "n_max": 1, | |
| "p_min": 0.6, | |
| "args": [ | |
| "--spec-type", | |
| "draft-mtp", | |
| "--spec-draft-n-min", | |
| "0", | |
| "--spec-draft-n-max", | |
| "1", | |
| "--spec-draft-p-min", | |
| "0.6" | |
| ] | |
| }, | |
| "draft_note": "lower cut-offs tie or lose", | |
| "env": {}, | |
| "server_args": [ | |
| "-ngl", | |
| "99", | |
| "-fa", | |
| "on", | |
| "-c", | |
| "16384", | |
| "-np", | |
| "1" | |
| ], | |
| "command": "llama-server -m Ternary-Bonsai-2.5-27B-PQ2_0-mtp.gguf -ngl 99 -fa on -c 16384 -np 1 --spec-type draft-mtp --spec-draft-n-min 0 --spec-draft-n-max 1 --spec-draft-p-min 0.6", | |
| "measured_2026_11_24": { | |
| "MacBook Pro M4 Pro": { | |
| "generation_tok_s": { | |
| "mtp_off": 22.19, | |
| "mtp_on": 25.17, | |
| "ratio": 1.13 | |
| }, | |
| "prefill_8k_tok_s": { | |
| "mtp_off": 122.6, | |
| "mtp_on": 118.9 | |
| }, | |
| "prefill_2k_tok_s": { | |
| "mtp_off": 125.9, | |
| "mtp_on": 122.7 | |
| }, | |
| "note": "18 prompts, 2 rounds" | |
| } | |
| } | |
| }, | |
| "testing_build": { | |
| "status": "not released", | |
| "build": "base d12ca13bb + Metal kernels in testing (measured: 3cfa168ad)", | |
| "draft": { | |
| "spec_type": "draft-mtp", | |
| "n_min": 0, | |
| "n_max": 1, | |
| "p_min": 0.6, | |
| "args": [ | |
| "--spec-type", | |
| "draft-mtp", | |
| "--spec-draft-n-min", | |
| "0", | |
| "--spec-draft-n-max", | |
| "1", | |
| "--spec-draft-p-min", | |
| "0.6" | |
| ] | |
| }, | |
| "env": { | |
| "GGML_METAL_PQ2_COEF": "1", | |
| "LLAMA_MTP_PREFILL_LEAN": "1", | |
| "GGML_METAL_SSM_CONV_ROWS": "1" | |
| }, | |
| "server_args": [ | |
| "-ngl", | |
| "99", | |
| "-fa", | |
| "on", | |
| "-c", | |
| "16384", | |
| "-np", | |
| "1", | |
| "--no-warmup", | |
| "--cache-ram", | |
| "0" | |
| ], | |
| "kv_cache": "f16", | |
| "measured_2026_11_23": { | |
| "MacBook Pro M4 Pro": { | |
| "generation_tok_s": { | |
| "mtp_off": 22.92, | |
| "mtp_on": 25.26, | |
| "mtp_on_with_kernels": 29.19 | |
| }, | |
| "prefill_2k_tok_s": { | |
| "mtp_off": 125.5, | |
| "mtp_on": 122.4, | |
| "mtp_on_with_kernels": 125.9 | |
| }, | |
| "prefill_8k_tok_s": { | |
| "mtp_off": 122.9, | |
| "mtp_on": 119.5, | |
| "mtp_on_with_kernels": 122.3 | |
| }, | |
| "note": "18 prompts, 2 rounds; the multi-draft check kernel takes MTP-on from 1.10x to 1.27x" | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "lossless_check": "Full drafting checks on Metal not finished. Partial: 1 draft vs no drafting mean KL 3.9e-10 over 1,534 positions on 26 prompts (two non-drafting runs gave 0). Kernels in testing: KL 0 vs kernels off.", | |
| "notes": [ | |
| "Turn MTP off (drop the drafting flags) for long prompts with short answers: prefill is slower with MTP on in released builds.", | |
| "Measurement: llama-server, 36 internal prompts in 7 workload groups, answers up to 512 tokens, greedy, one request at a time; generation = answer tokens / decode time (tok/s); prefill = timings.prompt_per_second on an 8,192-token prompt (2,048 in the *_2k fields); medians of 3 rounds unless noted" | |
| ] | |
| } | |