Pipestream AI / TurboEmbed

Hardware backends · Cargo features · precision tiers

One engine, six hardware backends.

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.

CPU, CUDA, Level Zero, NPU, Metal, Hailo Chosen with Cargo features Cosine bounds per precision Records in benchmarks/records/

A session runs where it is opened.

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.

One engine dispatching to six backends A bundle loads into the libturbo Rust core, which reaches each backend through the turbo_backend table: CPU, CUDA, Level Zero GPU, Intel NPU, Metal and Hailo. Each backend runs at its own precisions, and every precision tier is held to a cosine bound against the reference vectors in the bundle: 0.9999 for F32, 0.999 for F16 and BF16, and 0.93 for INT8. Bundle manifest and hashes weights or a compiled graph for the device tokenizer and settings reference vectors Rust core libturbo include/turbo/turbo.h turbo_backend.h table tokenizer, once on the host autotune cache CPU x86-64 and aarch64 · F32 CUDA NVIDIA GPUs, Jetson Orin · F32, F16 Level Zero GPU Intel Arc Pro B70 · F32, F16 on XMX Intel NPU Core Ultra · OpenVINO IR, F16 graph Metal Apple silicon · F32, F16 operands Hailo Hailo-10H, Hailo-8 · INT8 HEF Checked against reference vectors F32 cosine ≥ 0.9999 F16 F16 and BF16: cosine ≥ 0.999 INT8 cosine ≥ 0.93 Capability report a SUPPORTED cell names the committed record behind it
Each backend in turn: its precisions, and the cosine bound each precision is held to against the bundle’s reference vectors.

The backends.

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.

Pick the backends at build time.

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.

Precision tiers with a cosine bound.

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.

BackendModel tierNarrow tierExact tier
CPUF32F32 (a static model sums an I8 copy of its table)F32
CUDAF32, TF32 opt-inF16 on tensor coresF32
Level Zero GPUF32F16 on the matrix enginesF32
Intel NPUF16 graph at the model and narrow tiers
MetalF32F16 operands in the linear layers, F32 sumsF32
HailoINT8 graph at the model and narrow tiers
F32

cosine ≥ 0.9999

The bound for F32 results against the bundle’s reference vectors.

F16 · BF16

cosine ≥ 0.999

The bound for half-precision results on tensor cores, XMX engines, Metal and the NPU.

INT8

cosine ≥ 0.93

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.

Committed benchmark records.

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.

Machines with records

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.

Capability report

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.

Every run reports itself

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.

Vectors can stay on the device

Buffers import from and export to native device handles: CUDA pointers, OpenCL cl_mem, Level Zero USM, MTLBuffer and dmabuf file descriptors.

Accelerators that run a compiled graph.

The Intel NPU and Hailo backends take a graph compiled for the device, which the bundle carries next to the raw weights.

Intel NPU OpenVINO IR through the Level Zero graph extension.

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.

Hailo HEF graphs on Raspberry Pi 5 and Compute Module 5.

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.