Independent local-AI lab Benchmarked on site
REVISED 02 DEC 2026
← ALL RECIPES UPSTREAM RECIPE · TESTED BY US8 GB GPU

Bonsai 2.5 27B

A full 27B-parameter model compressed to 1.75 bits so it fits and writes fast on a regular 8 GB graphics card — tested on an RTX 3070 Ti with one single llama-server command.

ORIGIN · UPSTREAM RECIPE (NOT BUILT BY LASSE AI) PrismML trained the ternary derivative of Qwen, published the GGUF weights and adapted llama.cpp in its PrismML-Eng/llama.cpp fork. Lasse AI tested it on an RTX 3070 Ti.
CODING DECODE (8 GB) 113.4 tok/s with MTP (1.61× · 70.5 plain)
PEAK GPU MEMORY 7.31 GiB measured on an 8 GB RTX 3070 Ti
TOOL CALLING 37/40 single-turn function calls
LONG CONTEXT 5/6 LongBench v2 at 44K window
  1. Choose hardware
  2. Launch the server
  3. Verify the endpoint
  4. Connect your tools
01
HARDWARE CHECK

What you need on an 8 GB card

PROFILE QUANT & DRAFTER CONTEXT MEASURED SPEED & MEMORY
A · Fast coding & tools PTQ1_0 GGUF + MTP 20K (20,480) 113.4 tok/s (1.61× MTP) · 7.31 GiB
B · Long documents PTQ1_0 GGUF · MTP off 44K (45,056) 70.5 tok/s plain · 5/6 LongBench v2
MINIMUM HARDWARE

8 GB NVIDIA GPU (CUDA)

Measured on an RTX 3070 Ti (8 GB) using 7.31 GiB peak VRAM. Works best when the card is dedicated or your desktop isn't running heavy 3D apps at the same time — lower -c (e.g. -c 16384) if your monitor shares the GPU.

ENGINE & FILES

PrismML llama.cpp + GGUF

Requires PrismML's llama.cpp fork ↗ (standard llama.cpp does not decode PTQ1_0 ternary weights yet) and the Ternary-Bonsai-2.5-27B-PTQ1_0 GGUF file (~6 GB; add the -mtp.gguf variant for the 1.6× speed boost).

02
GET IT RUNNING

Start llama-server with one command

Pick the profile that fits your task: Fast coding & tools turns on MTP speculative decoding with a 20K context window; Long documents drops MTP to stretch the window to 44K tokens inside 8 GB.

PROFILE A · FAST CODING & TOOLS (MTP ON · 20K CONTEXT)
llama-server -m Ternary-Bonsai-2.5-27B-PTQ1_0-mtp.gguf \
  --alias bonsai-2.5-27b --host 127.0.0.1 --port 8080 \
  -ngl 99 -fa on -c 20480 -ctk q8_0 -ctv q8_0 -np 1 --min-p 0 \
  --spec-type draft-mtp --spec-draft-n-min 0 --spec-draft-n-max 2 \
  --spec-draft-p-min 0.1 --spec-draft-type-k q8_0 --spec-draft-type-v q8_0
PROFILE B · LONG DOCUMENTS (MTP OFF · 44K CONTEXT)
llama-server -m Ternary-Bonsai-2.5-27B-PTQ1_0.gguf \
  --alias bonsai-2.5-27b --host 127.0.0.1 --port 8080 \
  -ngl 99 -fa on -c 45056 -ctk q8_0 -ctv q8_0 -np 1 --min-p 0

Important setting for thinking prompts: give your client enough output tokens (e.g. max_tokens: 16384) or reserve space for the final answer. Without an answer budget, hard coding problems can spend the whole limit thinking — reserving answer space raised complete answers to 6/6 in our test.

Paste this into Claude Code or Codex to build/download PrismML's llama-server with CUDA, fetch the GGUF, and verify it fits inside your 8 GB card.

AI AGENT INSTALL PROMPT
Set up Bonsai 2.5 27B (PTQ1_0) on my 8 GB NVIDIA GPU using Lasse AI's measured recipe:
- Engine: https://github.com/PrismML-Eng/llama.cpp (build with CUDA or download a matching release)
- Model files: Ternary-Bonsai-2.5-27B-PTQ1_0-mtp.gguf (coding/tools with MTP) or Ternary-Bonsai-2.5-27B-PTQ1_0.gguf (44K long context)

Steps:
1. Check `nvidia-smi` for free VRAM and CUDA version. If my display uses this GPU, reduce `-c` from 20480 to 16384 if needed so peak VRAM stays under 8 GiB.
2. Start `llama-server` on 127.0.0.1:8080 with `-ngl 99 -fa on -ctk q8_0 -ctv q8_0 -np 1 --min-p 0` and the MTP flags (`--spec-type draft-mtp --spec-draft-n-min 0 --spec-draft-n-max 2 --spec-draft-p-min 0.1 --spec-draft-type-k q8_0 --spec-draft-type-v q8_0`).
3. Verify `curl http://127.0.0.1:8080/v1/models` and check speed against the RTX 3070 Ti reference (70.5 tok/s plain, 113.4 tok/s coding with MTP).
03
VERIFY & MAKE IT USEFUL

Verify it works, then connect your tools

Once the server is running, it exposes a local OpenAI-compatible API at http://127.0.0.1:8080/v1 — the model server itself sends nothing over the internet (check any client app’s own privacy settings).

QUICK TERMINAL CHECK (3 SECONDS)
curl http://127.0.0.1:8080/v1/models
01 · PRIVATE CHAT & DOCUMENTS

Open WebUI

Best for everyday chat, PDFs and images in your browser. In Open WebUI under Settings → Connections, point the OpenAI API URL here (key: local):

OPENAI API URL
OPENAI_API_BASE_URL=http://127.0.0.1:8080/v1
02 · CODING AGENTS

Codex, Cline, OpenCode & Continue

Any OpenAI-compatible coding agent works straight against your local server. Pick the OpenAI-compatible provider (confirm exact model ID from /v1/models):

BASE URL
http://127.0.0.1:8080/v1
MODEL ID
bonsai-2.5-27b
API KEY
local
03 · YOUR OWN SCRIPTS

Python & OpenAI SDK

Drop-in swap in the standard OpenAI SDK — handy for summarizing emails, extracting JSON, or automating routine tasks.

PYTHON · OPENAI SDK
from openai import OpenAI
client = OpenAI(
    base_url="http://127.0.0.1:8080/v1",
    api_key="local",
)
04 · FOR YOUR TEAM OR OFFICE

Need this wired into your business?

If you want local AI working across your team’s emails, documents or workflows without data leaving the building, let’s talk through your setup.

04
MEASURED EVIDENCE & CAVEATS

Numbers behind this recipe

Show detailed measurements, quality checks & test records