cosine ≥ 0.9999
The bound for F32 results against the bundle’s reference vectors.
Hardware backends · Cargo features · precision tiers
libturbo runs the same bundles on CPUs, NVIDIA GPUs, Intel Arc
GPUs, Intel NPUs, Apple silicon and Hailo accelerators. Each backend is written
against the vendor’s own low-level interface and reached through one
backend table, so a caller opens a session the same way on every device.
The bundle loads into the Rust core. The core tokenizes on the host and
hands the whole task to one backend through turbo_backend.h.
The device runs every stage and keeps intermediate data on the device.
The CPU backend is always built. Every other backend is a Cargo feature of
the turbo crate, and backends combine in one build. The library
lists every device it finds, accelerators first, then the CPU.
| Backend | Hardware | Cargo feature | Written against | Model format | Precisions |
|---|---|---|---|---|---|
| CPU | Any x86-64 or aarch64 CPU | default | Rust, a thread pool per session | safetensors | F32 |
| CUDA | NVIDIA GPUs, Jetson Orin | cuda, cuda-cublas |
CUDA C++ with GEMMs of its own | safetensors | F32, TF32 opt-in, F16 on tensor cores |
| Level Zero GPU | Intel Arc Xe2 (Arc Pro B70) | levelzero, levelzero-onednn |
Level Zero, OpenCL C kernels compiled to SPIR-V | safetensors | F32, F16 on the XMX matrix engines |
| Intel NPU | Intel Core Ultra NPU (AI Boost) | npu |
Level Zero graph extension | OpenVINO IR, compiled on the machine | F16 |
| Metal | Apple silicon, M1 and later | metal |
Objective-C++ and Metal Shading Language | safetensors | F32, F16 operands in the linear layers with F32 sums |
| Hailo | Hailo-10H on Raspberry Pi 5; Hailo-8 on Raspberry Pi 5 and Compute Module 5 | hailo |
HailoRT C and C++ APIs | HEF compiled for the device | INT8 |
The GPU backends run a model from its raw weights with kernels of their own. The NPU and Hailo backends run a graph compiled for the device, which the bundle carries as its artifact for that backend.
A build names the backends it links. turbo_version() then lists
them, and scripts/setup/check.sh reports what a machine needs
for each one.
# CPU only (the default)
cargo build --release -p turbo
# One accelerator
cargo build --release -p turbo --features cuda
cargo build --release -p turbo --features metal
cargo build --release -p turbo --features hailo
# Several in one library
cargo build --release -p turbo --features cuda,levelzero
# What this machine has and needs
scripts/setup/check.sh
cuda-cublas also links cuBLAS, which the CUDA backend
measures its own GEMMs against and checks them with in the tests.
levelzero-onednn lets the linear layers of larger batches
run on oneDNN kernels, chosen per session.
Each backend has a setup page and a script under
scripts/setup/ that installs what is missing with
--install. Tagged releases carry the NPU backend in the
Linux x86_64 and Windows x86_64 archives, and the Metal backend in the
macOS arm64 archive.
GEMM and attention kernel choices are measured per device and shape and cached, so a session reuses the choice made for its shapes.
Each session picks a precision tier: the model’s own precision, exact F32, or a narrower tier on devices with matrix engines. Every tier is held to a cosine bound against the reference vectors carried in the bundle.
| Backend | Model tier | Narrow tier | Exact tier |
|---|---|---|---|
| CPU | F32 | F32 (a static model sums an I8 copy of its table) | F32 |
| CUDA | F32, TF32 opt-in | F16 on tensor cores | F32 |
| Level Zero GPU | F32 | F16 on the matrix engines | F32 |
| Intel NPU | F16 graph at the model and narrow tiers | ||
| Metal | F32 | F16 operands in the linear layers, F32 sums | F32 |
| Hailo | INT8 graph at the model and narrow tiers | ||
The bound for F32 results against the bundle’s reference vectors.
The bound for half-precision results on tensor cores, XMX engines, Metal and the NPU.
The bound for 8-bit graphs. all-MiniLM-L6-v2 compiled in INT8 reaches a minimum cosine of 0.937 on the Hailo-10H and 0.936 on the Hailo-8.
turbo-bench measures the library through its C API and writes
one JSON record per machine, device, task, precision and model into
benchmarks/records/. The capability report cites them.
An RTX 4080 Super and a Jetson Orin (CUDA), an Arc Pro B70 (Level Zero), an Arrow Lake NPU, an Apple M2 (Metal), a Hailo-8, a Hailo-10H, and x86-64 and aarch64 CPUs. The records cover embedding on every backend, plus token ranges, POS tagging, tagging and throughput.
turbo_runtime_capability reports, for every device, task and
precision, a status, the compute type, the options honored, the cosine
floor, and the file name of the record behind a SUPPORTED cell.
A result names where each stage ran, the bytes that crossed to the device and back, and the host and device allocations made in the run.
Buffers import from and export to native device handles: CUDA pointers,
OpenCL cl_mem, Level Zero USM, MTLBuffer and
dmabuf file descriptors.
The Intel NPU and Hailo backends take a graph compiled for the device, which the bundle carries next to the raw weights.
The backend loads an OpenVINO IR artifact and compiles it on the machine through the oneAPI Level Zero driver’s graph extension, then creates, initializes and executes the graph on the Core Ultra NPU. OpenVINO IR artifacts are part of the all-MiniLM-L6-v2 NPU recipe and the bge-small, bge-base and bge-large-en-v1.5 recipes.
The backend runs a HEF compiled for the device’s architecture through HailoRT: a Hailo-10H on a Raspberry Pi 5 with HailoRT 5.1.1, and a Hailo-8 on a Raspberry Pi 5 and on a Compute Module 5 with HailoRT 4.23.0. On the Hailo-10H, frames run in bursts of 32 and a HEF’s contexts load once a burst. Hailo recipe variants exist for bge-small-en-v1.5 and bge-base-en-v1.5.
The analysis built on these vectors, and the ways to call the library.