{"slug": "openset-llm-bonsai-2-27b-benchmark-on-intel-arc-b390", "title": "openset-llm + Bonsai-2-27B benchmark on Intel ARC B390", "summary": "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.", "body_md": "# openset-llm + Bonsai-2-27B benchmark on Intel ARC B390\n\nSome tests of Bonsai 2 27B vs other quantizations\n\n## Machine and models\n\n- **CPU:** Intel Core Ultra X7 358H, 16 cores / 16 threads,**AVX2 + AVX-VNNI, no AVX-512** (up to 4.7 GHz)\n- **RAM:** 30.9 GiB;**GPU:** Intel Arc B390 (Vulkan, UMA)\n- **Engine:** openset-llm (PrismML llama.cpp fork @`e3de715` + the repo's 10 patches), built native with`-march=native`\n- **Models:**\n  - `~/Code/llama.cpp/models/Ternary-Bonsai-2-27B-PTQ1_0.gguf` — 5.6 GB, 64 blocks, ternary PTQ1,**no MTP head**\n  - `~/.openset-llm/models/bonsai-mtp.gguf` — same base + 266 MB grafted MTP head, 65 blocks,`nextn_predict_layers=1`\n  - `~/Code/llama.cpp/models/Qwen3.8-27B-thinkingcap-abliterated-mtp-Q4_K_M.gguf` — 16 GB, Q4_K_M, own MTP head\n\n## Best option for this hardware\n\n**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.**\n\nThat 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.\n\n```\ncd ~/Code/openset-llm\n./install.sh                 # builds engine, downloads Bonsai + unsloth MTP sidecar, grafts model.gguf\n./serve --threads 16 --spec  # chat at http://127.0.0.1:8080, API at /v1\n```\n\n`--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.\n\nIf you already have the Bonsai base locally and want to reuse it instead of downloading again:\n\n```\ncurl -fL -o /tmp/mtp-Qwen3.8-27B-Q4_0.gguf \\\n  https://huggingface.co/unsloth/Qwen3.8-27B-GGUF/resolve/main/MTP/mtp-Qwen3.8-27B-Q4_0.gguf\npython3 -I scripts/graft_mtp.py --gguf-py ~/.openset-llm/llama.cpp/gguf-py \\\n  ~/Code/llama.cpp/models/Ternary-Bonsai-2-27B-PTQ1_0.gguf \\\n  /tmp/mtp-Qwen3.8-27B-Q4_0.gguf \\\n  ~/.openset-llm/models/bonsai-mtp.gguf\n./serve --model ~/.openset-llm/models/bonsai-mtp.gguf --threads 16 --spec\n```\n\nNo graft, no speculation: `./serve --model ~/Code/llama.cpp/models/Ternary-Bonsai-2-27B-PTQ1_0.gguf` works too, but gives only ~10 tok/s.\n\n### Use it from pi\n\n`~/Code/llama.cpp/openset-start.sh` starts the same config as a detached OpenAI-compatible API on **port 8766**\n\n(the existing llama.cpp provider uses 8080, bmoe 8765):\n\n```\n~/Code/llama.cpp/openset-start.sh --start   # --status / --stop also available\npi --model openset/bonsai-27b-mtp           # or, in a session: /model openset/bonsai-27b-mtp\n```\n\npi'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\n\nfiles were saved with the `.bak.20261129-openset` suffix.\n\n**Vision:** the script attaches `mmproj-Qwen3.8-27B-BF16.gguf`, so images work via `image_url` data URLs (verified in pi\n\nwith `@/path/to/image.jpg`). **Resume is off by default** because the patched `rsm_load_prefix` aborts when reloading a\n\nprefix state saved from a multimodal request; set `OPENSET_RESUME=1` only for text-only use.\n\n**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\n\ntok/s, so the first token takes ~140 s. A larger `-ub` did not help. Keep the system prompt/tools lean, and remember\n\nthat 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`.\n\n## Benchmarks\n\nSame 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.\n\n### 1. Q4_K_M: openset-llm CPU vs llama.cpp Vulkan\n\n| Engine / mode | Decode tok/s | Prompt tok/s | Drafts accepted | \n|---|---|---|---|\n| openset CPU, plain | 4.55 [4.48–4.58] | 10.3 | — | \n| openset CPU, MTP spec | 6.74 [5.75–7.18] | 8.9 | 86 % | \n| llama.cpp Vulkan ( `-ngl 99` ), plain | 6.35 [3.30–6.46] | 40.2 | — | \n| llama.cpp Vulkan ( `-ngl 99` ), MTP spec | 14.31 [8.12–15.83] | 41.9 | 82 % | \n\nVulkan: llama.cpp 1.1.0-dev, build 1839, commit `115deee8e`, Arc B390 via Vulkan (UMA), all layers offloaded.\n\n### 2. Bonsai base (no MTP head) on openset CPU\n\n| Model | Decode tok/s | Prompt tok/s | RAM (RSS) | \n|---|---|---|---|\n| Bonsai PTQ1_0, plain, 8 threads | 10.43 [10.17–10.60] | 28.7 | ~6.5 GB | \n| Q4_K_M, plain, 8 threads | 4.55 [4.48–4.58] | 10.3 | ~23 GB | \n\nSame engine: the ternary weights are ~2.3× faster to decode and ~2.8× faster to read, using a quarter of the memory.\n\n### 3. Optimization sweep on Bonsai (`bench/optimizations.sh`)\n\n| Arm | Decode tok/s | Prompt tok/s | Drafts accepted | \n|---|---|---|---|\n| plain, 6 threads | 9.34 [9.11–9.63] | 24.2 | — | \n| plain, 8 threads | 10.07 [9.94–10.32] | 26.9 | — | \n| plain, 12 threads | 11.26 [11.14–11.52] | 32.0 | — | \n| plain, 16 threads | 11.56 [11.21–11.66] | 34.9 | — | \n| plain, 8 threads, `--fl128` | 9.69 [9.65–9.80] | 25.6 | — | \n| MTP spec, 8 threads | 13.97 [12.80–16.63] | 23.8 | 76 % | \n| **MTP spec, 16 threads** | **17.35 [15.80–20.41]** | **31.7** | **76 %** | \n| MTP spec, 8 threads, `--fl128` | 13.89 [12.67–16.51] | 23.6 | 76 % | \n\nWhat this says:\n\n- Threads matter on both paths: 16 beats 8 by ~15 % plain and ~24 % with speculation.\n- The MTP graft is the big win: ~1.4× at 8 threads, ~1.5× at 16.\n- `--fl128` is a**loss** on plain decode and neutral with speculation — leave it off (it is also explicitly not bit-identical).\n- Draft acceptance is the same at 8 and 16 threads, so the extra speed is just more compute per verify step.\n\n## What not to bother with\n\n- **`--fl128`** — slower here, and outputs are not guaranteed bit-identical.\n- **`--kv8/--kv6/--kv5`** — these shrink the KV cache for long contexts; at 4k on a 31 GB box they buy nothing for decode.\n- **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).\n- **Power tuning** — already`performance` (EPB`performance` , max 4.7 GHz); no gain available there.\n\n## Reproduce\n\n```\ncd ~/Code/openset-llm\n./bench/optimizations.sh \\\n  --model ~/Code/llama.cpp/models/Ternary-Bonsai-2-27B-PTQ1_0.gguf \\\n  --mtp-model ~/.openset-llm/models/bonsai-mtp.gguf \\\n  --prompts-file ~/kb/bonsai-short-prompts.jsonl\n```\n\nThe prompt set used above (save as `~/kb/bonsai-short-prompts.jsonl`):\n\n```\n{\"id\":\"short-1\",\"task\":\"qa\",\"messages\":[{\"role\":\"user\",\"content\":\"What is the capital of France? Answer in one sentence.\"}]}\n{\"id\":\"short-2\",\"task\":\"qa\",\"messages\":[{\"role\":\"user\",\"content\":\"Explain in two sentences why the sky is blue.\"}]}\n{\"id\":\"code-1\",\"task\":\"code\",\"messages\":[{\"role\":\"user\",\"content\":\"Write a Python function that returns the nth Fibonacci number. Give only the function.\"}]}\n{\"id\":\"code-2\",\"task\":\"code\",\"messages\":[{\"role\":\"user\",\"content\":\"Write a one-line Python expression to reverse a string.\"}]}\n{\"id\":\"math-1\",\"task\":\"math\",\"messages\":[{\"role\":\"user\",\"content\":\"Compute 17 times 23 and show the intermediate steps.\"}]}\n{\"id\":\"short-3\",\"task\":\"qa\",\"messages\":[{\"role\":\"user\",\"content\":\"Name three planets in our solar system, separated by commas.\"}]}\n```\n\nFor the stock 24-prompt harness, omit `--prompts-file` (it will take much longer; several stock prompts are thousands of characters).\n\n## Caveats\n\n- 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.\n- 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 %.\n- `--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.\n\nObviously the speed tok/s isn't everything, also the final result is important an the quality of the result among quants is huge.", "url": "https://wpnews.pro/news/openset-llm-bonsai-2-27b-benchmark-on-intel-arc-b390", "canonical_source": "https://grigio.org/openset-llm-bonsai-2-27b-benchmark-on-intel-arc-b390/", "published_at": "2026-11-29 21:13:48+00:00", "updated_at": "2026-11-29 21:45:33.123491+00:00", "lang": "en", "topics": ["ai-infrastructure", "large-language-models", "ai-tools"], "entities": ["openset-llm", "Bonsai-2-27B", "Intel Arc B390", "Intel Core Ultra X7 358H", "llama.cpp", "PrismML", "Qwen3.8-27B", "pi"], "also_reported_by": [], "takeaway": "On an AVX2-only Intel Core Ultra X7 358H, grafting a 266 MB MTP head onto Ternary-Bonsai-2-27B-PTQ1 and enabling speculative decoding with 16 threads raised decode from about 10 tok/s to a 17.35 tok/s median with 76% draft acceptance at ~6–7 GB of RAM.", "recommendation": {"advice": "Enable speculative decoding explicitly with --spec when serving an MTP-equipped model on CPUs without AVX-512 VNNI, since openset-llm disables it by default; the source measured 17.35 tok/s versus about 10 tok/s without it.", "playbook": "inference-serving", "playbook_url": "https://wpnews.pro/playbooks/inference-serving"}, "alternates": {"html": "https://wpnews.pro/news/openset-llm-bonsai-2-27b-benchmark-on-intel-arc-b390", "markdown": "https://wpnews.pro/news/openset-llm-bonsai-2-27b-benchmark-on-intel-arc-b390.md", "text": "https://wpnews.pro/news/openset-llm-bonsai-2-27b-benchmark-on-intel-arc-b390.txt", "jsonld": "https://wpnews.pro/news/openset-llm-bonsai-2-27b-benchmark-on-intel-arc-b390.jsonld"}}