User · Build
Building the engine
One target, one binary. The onebin build drops the engine, the serving server, JARVIS, vision, and the CLI into build/1bit. Here is how to get it to compile on your hardware, and the exact gotchas that stop people.
Prerequisites
| Package | Version / notes |
|---|---|
OS | Ubuntu 24.04 LTS+ (CachyOS / Arch also works) |
Kernel | 6.18.22-lts or 7.x, not 6.19.x (issue #1 OPTC hang) |
ROCm | TheRock 7.15.0a, nightly C++ SDK, native gfx1151 |
CMake | ≥ 3.28 · Ninja ≥ 1.12 · GCC ≥ 13 (C++20) / ≥ 14 (C++23) |
$ sudo apt update && sudo apt install -y cmake ninja-build build-essential git
TheRock 7.15.0a
The Rock is the NPU-and-GPU toolchain. Install the nightly pip wheel that ships the gfx1151 code objects.
$ pip install --index-url https://rocm.nightlies.amd.com/whl-multi-arch/ \
"rocm[libraries,devel,device-gfx1151]"
$ export THEROCK_PIP_ROOT="$HOME/.cache/pip/therock"
CMake auto-discovers TheRock: /opt/rocm-therock → $THEROCK_PIP_ROOT → ~/.cache/lemonade/bin/therock. Never point CMAKE_PREFIX_PATH at system ROCm (/opt/rocm). Always set the target architecture.
$ export CMAKE_HIP_ARCHITECTURES=gfx1151
Build
$ cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_HIP_ARCHITECTURES=gfx1151
$ cmake --build build --target onebin
The result is the single binary build/1bit. There is no standalone zaya_server target; packaged installs ship a zaya_server symlink, dispatched by argv[0]. Header-only deps (cpp-httplib, nlohmann_json, FTXUI) are fetched automatically via CMake FetchContent.
FastFlowLM (the NPU backend)
Discovery order, no source build for the first two:
- TheRock dist (
<therock-root>/bin/flm, ships in 7.14 / 7.15a) - FastFlowLM .deb (
/opt/fastflowlm/bin/flm) flmon PATH (/usr/bin/flm)- Submodule build (
third_party/FastFlowLM) as a last resort
Optional GPU decode (Q4NX models)
$ cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_HIP_ARCHITECTURES=gfx1151 -DZAYA_ENABLE_GPU_DECODE=ON
$ cmake --build build --target zaya_gpu_decode # -> build/libzaya_gpu_decode.so
Auto-detected at startup for Q4NX models. Without it, inference stays on CPU.
Gotchas
| Symptom | Fix |
|---|---|
hipErrorNoBinaryForGPU | CMAKE_HIP_ARCHITECTURES=gfx1151 + TheRock 7.15.0a (older ROCm lacks gfx1151 objects) |
cannot find -lamdhip64 | TheRock at /opt/rocm-therock or THEROCK_PIP_ROOT; never system ROCm |
| No GPU decode despite build | export LD_LIBRARY_PATH=/path/to/zaya/build:$LD_LIBRARY_PATH; verify the model is actually Q4NX |
| First-inference hang (issue #1, ~1 in 5 boots) | export HSA_ENABLE_SDMA=0, avoiding the OPTC code path |
| 6.19.x kernel lockup under NPU/GPU load | Use 6.18.22-lts or 7.x; install.sh detects and warns |
The build is proven on Strix Halo with TheRock. If you are on a different ROCm stack, expect to solve the architecture flag first; the engine does not hide that the NPU path is the tuned one.