← Back to projects

Software project

SYCL work on Ternary Bonsai

SYCL (Intel GPU) support for PrismML Bonsai ternary models

C++ / SYCLPublic

https://github.com/PrismML-Eng/llama.cpp

x86 CPU path (#248): ternary models on old CPUs with no GPU

Before #248, PTQ1_0 had no x86 SIMD path at all: every x86 CPU decoded trits one weight at a time, and PQ2_0 required AVX2.

#248 adds SSE2 (any x86-64) and SSSE3 tiers.

Measured on an i5-12600K with AVX disabled: Ternary Bonsai 1.7B PQ2_0 generation 9.9 -> 45 tokens/s (4.5x); Ternary Bonsai 2 27B PTQ1_0 0.6 -> 2.1 tokens/s (3.5x).

Also built and run on a 2010 dual Xeon E5645 (Westmere, no AVX).

Correctness: exact-match unit tests for both formats, plus a property-based harness (theft) with about 124k random inputs per format against the scalar reference.

Added SYCL (Intel GPU) support for PrismML Bonsai ternary models, plus x86 SSE2/SSSE3 and ARM NEON kernels: 5 merged PRs to PrismML llama.cpp.

PrismML released Ternary Bonsai 2.5 27B on 2026-11-24, with SYCL (Intel GPUs) as a supported backend.

The merged PRs are listed below, newest first. #235 is the original SYCL support for the Bonsai ternary formats; #327 and #328 are open in Scott's fork and are not merged upstream.

Scott's fork also contains SYCL XMX kernels for the ternary PQ2_0/PTQ1_0 formats from the TernSYCL work. PTQ1_0 is decoded in-kernel, and the mat-muls are fused with neighbouring ops (Oct 6-7 2026).

On an Intel Arc Pro B50 (16 GB), the ternary 27B model serves a 200k-token context locally, at about 420 tokens/s prompt reading and 16 tokens/s generation.

Root-caused an Intel oneAPI 2026.2 regression in which the SYCL VMM memory pool asserted on the ternary kernels, and fixed it.

Pull requests

Highlights

  • 5 merged PRs: #326, #265, #294, #248, #235.
  • 2 open PRs in review: #327 and #328.
  • 200k-token context on an Intel Arc Pro B50 (16 GB).
  • Fixed the oneAPI 2026.2 SYCL VMM memory-pool assertion on the ternary kernels.

Current limits

  • The XMX kernels are proposed in open PRs #327 and #328 and are not merged upstream.