openset-llm + Bonsai-2-27B benchmark on Intel ARC B390 A benchmark of the openset-llm engine (a PrismML llama.cpp fork at commit e3de715 plus 10 patches) running the Ternary-Bonsai-2-27B-PTQ1 model on an Intel Core Ultra X7 358H CPU with an Intel Arc B390 GPU found that the grafted-MTP-head configuration with speculative decoding and 16 threads reached a 17.35 tok/s decode median (15.80–20.41), 31.7 tok/s prompt processing and 76% draft acceptance at roughly 6–7 GB of RAM. The same model without the grafted MTP head and without speculation ran at only about 10 tok/s, and the author notes that openset-llm's serve command disables speculation by default on CPUs lacking AVX-512 VNNI, so the --spec flag is required to reach the README's 17–20 tok/s range. The author also reports that in the pi agent, a ~5,500-token prompt at ~37–42 tok/s prompt evaluation makes the first token take about 140 seconds despite the 17 tok/s decode rate. openset-llm + Bonsai-2-27B benchmark on Intel ARC B390 Some tests of Bonsai 2 27B vs other quantizations Machine and models - CPU: Intel Core Ultra X7 358H, 16 cores / 16 threads, AVX2 + AVX-VNNI, no AVX-512 up to 4.7 GHz - RAM: 30.9 GiB; GPU: Intel Arc B390 Vulkan, UMA - Engine: openset-llm PrismML llama.cpp fork @ e3de715 + the repo's 10 patches , built native with -march=native - Models: - ~/Code/llama.cpp/models/Ternary-Bonsai-2-27B-PTQ1 0.gguf — 5.6 GB, 64 blocks, ternary PTQ1, no MTP head - ~/.openset-llm/models/bonsai-mtp.gguf — same base + 266 MB grafted MTP head, 65 blocks, nextn predict layers=1 - ~/Code/llama.cpp/models/Qwen3.8-27B-thinkingcap-abliterated-mtp-Q4 K M.gguf — 16 GB, Q4 K M, own MTP head Best option for this hardware Bonsai-2-27B with the grafted MTP head, speculative decoding on, 16 threads: 17.35 tok/s decode median 15.80–20.41 , 31.7 tok/s prompt, 76 % of drafts accepted, ~6–7 GB RAM. That is the only configuration that reaches the README's 17–20 tok/s range here — on an AVX2-only CPU, with a model small enough to leave most of the RAM free. cd ~/Code/openset-llm ./install.sh builds engine, downloads Bonsai + unsloth MTP sidecar, grafts model.gguf ./serve --threads 16 --spec chat at http://127.0.0.1:8080, API at /v1 --spec is required: serve turns speculation off by default on CPUs without AVX-512 VNNI, even though the model has an MTP head. --threads 16 only makes the default nproc explicit on this 16-core machine. If you already have the Bonsai base locally and want to reuse it instead of downloading again: curl -fL -o /tmp/mtp-Qwen3.8-27B-Q4 0.gguf \ https://huggingface.co/unsloth/Qwen3.8-27B-GGUF/resolve/main/MTP/mtp-Qwen3.8-27B-Q4 0.gguf python3 -I scripts/graft mtp.py --gguf-py ~/.openset-llm/llama.cpp/gguf-py \ ~/Code/llama.cpp/models/Ternary-Bonsai-2-27B-PTQ1 0.gguf \ /tmp/mtp-Qwen3.8-27B-Q4 0.gguf \ ~/.openset-llm/models/bonsai-mtp.gguf ./serve --model ~/.openset-llm/models/bonsai-mtp.gguf --threads 16 --spec No graft, no speculation: ./serve --model ~/Code/llama.cpp/models/Ternary-Bonsai-2-27B-PTQ1 0.gguf works too, but gives only ~10 tok/s. Use it from pi ~/Code/llama.cpp/openset-start.sh starts the same config as a detached OpenAI-compatible API on port 8766 the existing llama.cpp provider uses 8080, bmoe 8765 : ~/Code/llama.cpp/openset-start.sh --start --status / --stop also available pi --model openset/bonsai-27b-mtp or, in a session: /model openset/bonsai-27b-mtp pi's provider openset is configured in ~/.pi/agent/models.json baseUrl http://127.0.0.1:8766/v1 , model id bonsai-27b-mtp , 32k context, text + image and the model is enabled in ~/.pi/agent/settings.json . Backups of both files were saved with the .bak.20261129-openset suffix. Vision: the script attaches mmproj-Qwen3.8-27B-BF16.gguf , so images work via image url data URLs verified in pi with @/path/to/image.jpg . Resume is off by default because the patched rsm load prefix aborts when reloading a prefix state saved from a multimodal request; set OPENSET RESUME=1 only for text-only use. Why pi can feel slow: decode is ~17 tok/s, but pi's agent prompt is ~5,500 tokens and prompt evaluation is ~37–42 tok/s, so the first token takes ~140 s. A larger -ub did not help. Keep the system prompt/tools lean, and remember that thinking on default in the script unless OPENSET THINK=0 spends tokens before the answer; pi sends enable thinking: false when its thinking level is off . Benchmarks Same 6 short prompts QA / code / math × 128 generated tokens, greedy, temperature=0 , 4k context, 8 threads unless noted, one run per arm. Numbers are medians with min–max in brackets. 1. Q4 K M: openset-llm CPU vs llama.cpp Vulkan | Engine / mode | Decode tok/s | Prompt tok/s | Drafts accepted | |---|---|---|---| | openset CPU, plain | 4.55 4.48–4.58 | 10.3 | — | | openset CPU, MTP spec | 6.74 5.75–7.18 | 8.9 | 86 % | | llama.cpp Vulkan -ngl 99 , plain | 6.35 3.30–6.46 | 40.2 | — | | llama.cpp Vulkan -ngl 99 , MTP spec | 14.31 8.12–15.83 | 41.9 | 82 % | Vulkan: llama.cpp 1.1.0-dev, build 1839, commit 115deee8e , Arc B390 via Vulkan UMA , all layers offloaded. 2. Bonsai base no MTP head on openset CPU | Model | Decode tok/s | Prompt tok/s | RAM RSS | |---|---|---|---| | Bonsai PTQ1 0, plain, 8 threads | 10.43 10.17–10.60 | 28.7 | ~6.5 GB | | Q4 K M, plain, 8 threads | 4.55 4.48–4.58 | 10.3 | ~23 GB | Same engine: the ternary weights are ~2.3× faster to decode and ~2.8× faster to read, using a quarter of the memory. 3. Optimization sweep on Bonsai bench/optimizations.sh | Arm | Decode tok/s | Prompt tok/s | Drafts accepted | |---|---|---|---| | plain, 6 threads | 9.34 9.11–9.63 | 24.2 | — | | plain, 8 threads | 10.07 9.94–10.32 | 26.9 | — | | plain, 12 threads | 11.26 11.14–11.52 | 32.0 | — | | plain, 16 threads | 11.56 11.21–11.66 | 34.9 | — | | plain, 8 threads, --fl128 | 9.69 9.65–9.80 | 25.6 | — | | MTP spec, 8 threads | 13.97 12.80–16.63 | 23.8 | 76 % | | MTP spec, 16 threads | 17.35 15.80–20.41 | 31.7 | 76 % | | MTP spec, 8 threads, --fl128 | 13.89 12.67–16.51 | 23.6 | 76 % | What this says: - Threads matter on both paths: 16 beats 8 by ~15 % plain and ~24 % with speculation. - The MTP graft is the big win: ~1.4× at 8 threads, ~1.5× at 16. - --fl128 is a loss on plain decode and neutral with speculation — leave it off it is also explicitly not bit-identical . - Draft acceptance is the same at 8 and 16 threads, so the extra speed is just more compute per verify step. What not to bother with - --fl128 — slower here, and outputs are not guaranteed bit-identical. - --kv8/--kv6/--kv5 — these shrink the KV cache for long contexts; at 4k on a 31 GB box they buy nothing for decode. - Vulkan for Bonsai — upstream llama.cpp does not understand the fork's private PTQ1 ternary type, so Bonsai stays on CPU. Vulkan only applies to the ordinary Q4 K M file, where it is faster than the CPU engine but still slower than Bonsai+CPU+MTP 14.3 vs 17.4 tok/s . - Power tuning — already performance EPB performance , max 4.7 GHz ; no gain available there. Reproduce cd ~/Code/openset-llm ./bench/optimizations.sh \ --model ~/Code/llama.cpp/models/Ternary-Bonsai-2-27B-PTQ1 0.gguf \ --mtp-model ~/.openset-llm/models/bonsai-mtp.gguf \ --prompts-file ~/kb/bonsai-short-prompts.jsonl The prompt set used above save as ~/kb/bonsai-short-prompts.jsonl : {"id":"short-1","task":"qa","messages": {"role":"user","content":"What is the capital of France? Answer in one sentence."} } {"id":"short-2","task":"qa","messages": {"role":"user","content":"Explain in two sentences why the sky is blue."} } {"id":"code-1","task":"code","messages": {"role":"user","content":"Write a Python function that returns the nth Fibonacci number. Give only the function."} } {"id":"code-2","task":"code","messages": {"role":"user","content":"Write a one-line Python expression to reverse a string."} } {"id":"math-1","task":"math","messages": {"role":"user","content":"Compute 17 times 23 and show the intermediate steps."} } {"id":"short-3","task":"qa","messages": {"role":"user","content":"Name three planets in our solar system, separated by commas."} } For the stock 24-prompt harness, omit --prompts-file it will take much longer; several stock prompts are thousands of characters . Caveats - One run per arm, short prompts; speed varies with the text and with background load. The two Bonsai plain runs gave 10.43 and 10.07 tok/s at 8 threads — treat ±0.5 tok/s as noise. - Draft acceptance is prompt-dependent: the README reports ~1.2–1.4× on code/JSON/math and ~1.0× on prose with 2-token drafting on AVX2 CPUs. This prompt mix accepted 76 %. - --spec with a GGUF that has no MTP head will fail; serve auto-detects nextn predict layers for --model files and turns speculation off with a note, but --spec forces it regardless. Obviously the speed tok/s isn't everything, also the final result is important an the quality of the result among quants is huge.