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-hexagon.json from prism-ml/Ternary-Bonsai-2.5-27B-GGUF: direct link, hf CLI and curl.
- Browser
- Download file 3.53 kB
-
https://huggingface.co/prism-ml/Ternary-Bonsai-2.5-27B-GGUF/resolve/main/presets/llama.cpp/mtp-hexagon.json
- Command line
-
hf download hf://prism-ml/Ternary-Bonsai-2.5-27B-GGUF/presets/llama.cpp/mtp-hexagon.json
-
curl -L -o mtp-hexagon.json https://huggingface.co/prism-ml/Ternary-Bonsai-2.5-27B-GGUF/resolve/main/presets/llama.cpp/mtp-hexagon.json
3.53 kB
| { | |
| "schema": "prism-mtp-backend-settings/v1", | |
| "model": "Bonsai 2.5 Ternary 27B with MTP draft head (v2)", | |
| "backend": "hexagon", | |
| "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-Q2_0-mtp.gguf", | |
| "size_bytes": 7912178944, | |
| "sha256": "b0f83de8481c3200c529aef5fb495dbfedf2a4a3f017f7a3ea0a69c67be1d306" | |
| }, | |
| "why_this_file": "Q2_0 is the 2-bit format mainline llama.cpp reads; used on phones.", | |
| "profiles": [ | |
| { | |
| "id": "hexagon-galaxy-s26-ultra", | |
| "devices": [ | |
| "Samsung Galaxy S26 Ultra (Hexagon NPU)" | |
| ], | |
| "released_build": null, | |
| "released_build_note": "No public build runs this model correctly on the Hexagon NPU yet; it needs a fix that is not released.", | |
| "testing_build": { | |
| "status": "not released", | |
| "build": "public llama.cpp 0a94a3f28 + PrismML's phone changes + the fix for this model (not public), Android arm64, Hexagon back-end", | |
| "draft": { | |
| "spec_type": "draft-mtp", | |
| "n_min": 0, | |
| "n_max": 1, | |
| "p_min": 0, | |
| "args": [ | |
| "--spec-type", | |
| "draft-mtp", | |
| "--spec-draft-n-min", | |
| "0", | |
| "--spec-draft-n-max", | |
| "1", | |
| "--spec-draft-p-min", | |
| "0" | |
| ] | |
| }, | |
| "draft_vocab_n": 65536, | |
| "draft_note": "1 draft is fastest with the v2 head (8.79 tok/s; 2 drafts 8.22, 3 drafts 8.04). The head drafts over the 65,536 most frequent tokens only.", | |
| "env": { | |
| "GGML_HEXAGON_DEVICES": "4", | |
| "LLAMA_R1_DEFER": "1", | |
| "GGML_HEXAGON_GDN_SNAP_DMA": "1", | |
| "GGML_HEXAGON_HMX_MIN_NROWS": "8", | |
| "LLAMA_DRAFT_VOCAB_N": "65536" | |
| }, | |
| "server_args": [ | |
| "--device", | |
| "HTP0,HTP1,HTP2,HTP3", | |
| "--fit", | |
| "off", | |
| "-c", | |
| "4096", | |
| "-t", | |
| "6", | |
| "-np", | |
| "1", | |
| "--jinja", | |
| "--no-cache-prompt", | |
| "--ctx-checkpoints", | |
| "0", | |
| "--cache-ram", | |
| "0", | |
| "-ngl", | |
| "99", | |
| "-b", | |
| "512", | |
| "-ub", | |
| "128", | |
| "-fa", | |
| "on" | |
| ], | |
| "measured_2026_11_23": { | |
| "Galaxy S26 Ultra": { | |
| "generation_tok_s": { | |
| "mtp_off": 6.34, | |
| "mtp_on": 8.79 | |
| }, | |
| "prefill_2k_tok_s": { | |
| "mtp_off": 136.7, | |
| "mtp_on": 132.1 | |
| }, | |
| "note": "10 prompts, median of 3 (1 draft: 2 runs); context 4K; prefill with MTP on measured at 2 drafts" | |
| } | |
| }, | |
| "runtime_note": "The whole model runs on the NPU over four sessions (embedding, 64 layers, draft head, output layer); only sampling runs on the CPU. Without the fix the output is wrong." | |
| } | |
| } | |
| ], | |
| "lossless_check": "Full drafting checks on the NPU not done yet.", | |
| "notes": [ | |
| "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" | |
| ] | |
| } | |