Skip to content
Skip to documentation content

docs · v0.11.0 · Guides

Browse documentation

Linux Host Agent: Hailo-10H

This page adds what serving on a Hailo-10H takes to the Linux Host Agent guide, with the Raspberry Pi 5 and AI HAT+ 2 as the tested example. Get the agent and join the host as that guide says (Get the agent, Join the host); its Engines and Memory rules apply here too.

Hailo’s hailo-ollama serves an Ollama-compatible API on a Hailo-10H. It runs on HailoRT and the Hailo PCIe driver; hailo-ollama 5.1.1 matches HailoRT 5.1.1. Install those for your board first (on a Raspberry Pi 5, see below); hailortcli fw-control identify should then report a HAILO10H device.

What has been tested

Status
runtime: ollama against hailo-ollama 5.1.1 on a Hailo-10HEnd to end on a Raspberry Pi 5 with an AI HAT+ 2: qwen2.5-instruct:1.5b and llama3.2:3b served through the relay to a kind cluster, and back by itself after a power loss with the agent and hailo-ollama under systemd. To test without the hardware, see Testing without a Hailo-10H
Linux arm64 host with a 16K-page kernel (Raspberry Pi 5)The agent, Hailo’s driver and runtime, and hailo-ollama run on Raspberry Pi OS’s 6.18.50+rpt-rpi-2712 kernel, and the agent served a kind cluster on the same LAN

Install hailo-ollama

hailo-ollama 5.1.1 is Hailo’s hailo_gen_ai_model_zoo package, for arm64:

curl -fLO https://dev-public.hailo.ai/2025_12/Hailo10/hailo_gen_ai_model_zoo_5.1.1_arm64.deb
sudo dpkg -i hailo_gen_ai_model_zoo_5.1.1_arm64.deb

hailo-ollama 5.1.1 takes its listen address only from hailo-ollama.json, and the packaged one (/etc/xdg/hailo-ollama/hailo-ollama.json) listens on 0.0.0.0:8000, an unauthenticated API on your network. Give the user that runs it a copy listening on 127.0.0.1, which hailo-ollama reads first:

mkdir -p ~/.config/hailo-ollama
sed 's/"0.0.0.0"/"127.0.0.1"/'   /etc/xdg/hailo-ollama/hailo-ollama.json   > ~/.config/hailo-ollama/hailo-ollama.json

The package’s install script makes /usr/share/hailo-ollama/models, where hailo-ollama 5.1.1 caches the HEFs it pulls, writable by every user.

Start hailo-ollama at boot

The package does not start hailo-ollama at boot. Run it as a systemd user service, and turn on lingering so that user’s services start at boot without a login session:

mkdir -p ~/.config/systemd/user
cat > ~/.config/systemd/user/hailo-ollama.service <<'EOF'
[Unit]
Description=hailo-ollama on a Hailo-10H

[Service]
ExecStart=/usr/bin/hailo-ollama
Restart=on-failure
RestartSec=5

[Install]
WantedBy=default.target
EOF
systemctl --user daemon-reload
systemctl --user enable --now hailo-ollama.service
sudo loginctl enable-linger "$USER"

Run the agent with --runtime ollama --ollama-port 8000, hailo-ollama’s port. With llmkube metal join, pass them as --agent-arg runtime=ollama --agent-arg ollama-port=8000; a re-join keeps them. The agent finds hailo-ollama’s manifests the way hailo-ollama does (see Serve a hailo:// model); if hailo-ollama runs as another user or with another data directory, also pass --agent-arg hailo-manifests-dir=<its models/manifests directory>.

Serve a hailo:// model

Name the model with a hailo:// source: a tag in the model zoo of the installed hailo-ollama, which GET /hailo/v1/list lists. hailo-ollama 5.1.1 has qwen2.5-instruct:1.5b, qwen2.5-coder:1.5b, qwen2:1.5b, llama3.2:3b and deepseek_r1_distill_qwen:1.5b. hailo-ollama maps the tag to a HEF compiled for the Hailo-10H through the manifests it installs, and pulls it from Hailo’s model host (dev-public.hailo.ai) into its own cache, so neither the controller nor the agent downloads anything. The Model needs accelerator: metal, or the controller marks it Failed with InvalidSource. The InferenceService needs runtime: ollama; one that leaves spec.runtime empty takes the agent’s --runtime. The agent refuses any other runtime: one the host has, such as llama.cpp with llama-server installed, with RuntimeCannotServeSource, and one it does not have (llama.cpp without llama-server, or a macOS-only one) earlier, with RuntimeNotAvailable. With the validating webhook enabled (multitenancy), an InferenceService that names another runtime is rejected when it is created. The tag must be name:tag, as GET /hailo/v1/list spells it: hailo-ollama has no default tag, so a bare name is refused, and so is a /, which could name another registry.

apiVersion: inference.llmkube.dev/v1alpha1
kind: Model
metadata:
  name: qwen25-15b
spec:
  source: hailo://qwen2.5-instruct:1.5b
  hardware:
    accelerator: metal
---
apiVersion: inference.llmkube.dev/v1alpha1
kind: InferenceService
metadata:
  name: qwen-hailo
spec:
  modelRef: qwen25-15b
  runtime: ollama
  replicas: 1

Like any Model change, editing the source does not restart a running service, and neither does restarting the agent, which re-attaches it; change the InferenceService’s spec to pick it up.

Clients that call the InferenceService send the hailo-ollama tag as model in the request body ("model": "qwen2.5-instruct:1.5b"), not the InferenceService’s or the Model’s name: nothing between them rewrites it, and hailo-ollama answers a name it does not know with {"error":"model '<name>' not found"}, with status 200. A ModelRouter in front of a service that sets runtime: ollama sends hailo-ollama the tag itself, so its clients use the router’s model names.

The agent serves one hailo:// InferenceService per host: hailo-ollama keeps one model loaded on the Hailo-10H and reloads it on every switch. The first service to start owns the device, and the agent refuses a second one with DeviceInUse, which status.schedulingStatus and a Warning event show, with a message naming the owner. The first keeps serving. It owns the device until it is deleted or scaled to zero, its Model stops being hailo://, or a start of it fails; through spec changes, restarts after failed health checks and restarts of the agent, which reads the owner back from its engine record. Then the agent starts the second at its next re-check, within a minute.

Before it pulls, the agent checks that the daemon on --ollama-port is hailo-ollama (it serves GET /hailo/v1/list) and that it lists the tag. On a host running stock Ollama the check fails the start (StartFailed, retried on the restart backoff) instead of pulling a different model under the same name. hailo-ollama answers the pull only once the HEF is on disk; the agent waits up to two hours for it.

Memory admission sizes a hailo:// model the way it sizes an https:// one, with a HEAD request and nothing downloaded. The agent reads the HEF’s SHA-256 (hef_h10h) from hailo-ollama’s manifest for the tag, <name>/<tag>/manifest.json under the manifests directory, and HEADs <--hailo-library-url>/blob/sha256_<digest>. By default the agent finds the manifests directory the way hailo-ollama does, from its own user’s environment: the first hailo-ollama directory under $XDG_DATA_HOME (~/.local/share), then $XDG_DATA_DIRS (/usr/share:/usr/local/share), plus models/manifests. For the package that is /usr/share/hailo-ollama/models/manifests. When hailo-ollama runs as another user or with other XDG data directories, set --hailo-manifests-dir to its manifests directory; otherwise admission cannot size the model, and the error names the path it tried. The HEAD is guarded against private addresses like any other download and verifies TLS against the system’s CA certificates. dev-public.hailo.ai is public, so it needs no --allowed-download-hosts entry; that flag only lets a private, loopback or link-local address through, which matters when --hailo-library-url points at a mirror on your network or at the simulator.

A HEF has no header the agent can read a model’s shape from, so the memory estimate is the HEF’s size times 1.2 plus 512 MiB: 3.1 GiB for qwen2.5-instruct:1.5b, whose HEF is 2.2 GiB. Like any runtime: ollama service, it is budgeted against the host’s RAM, not the Hailo-10H’s own 8 GB. That is conservative: the weights run from the device’s memory, so the host gives up less than the estimate, and a host short of RAM is refused before anything is pulled. Admission does not check the device’s memory; a HEF larger than it fails when hailo-ollama loads it. To test that limit, use the simulator’s HAILO_SIM_DEVICE_MEMORY.

Known limits

Checked on a Raspberry Pi 5 with an AI HAT+ 2:

  • hailo-ollama serves only chat and generation. Through the relay it answers GET /, POST /api/chat, POST /api/generate, GET /api/tags, POST /api/show, GET /api/version, GET /api/ps and POST /v1/chat/completions. It answers 404 on /api/embed, /api/embeddings, /health, /metrics, /v1/models, /v1/models/{id}, /v1/completions, /v1/embeddings and /v1/responses, which the ingress forwards for runtime: ollama, so a 404 on those comes from hailo-ollama, not the routing. The agent calls two of its other routes, POST /api/pull and GET /hailo/v1/list, on the host only. The ingress forwards neither of them, nor DELETE /api/delete.
  • created in /v1/chat/completions is in nanoseconds.
  • Requests need Content-Type: application/json.
  • hailo-ollama runs one generation at a time and does not stop one when its client disconnects: LLMKube’s proxies close their connection to hailo-ollama when the client goes, but a request that times out still keeps the device busy until its answer is done, and the next request waits behind it. Set max_tokens on requests to bound that.

Raspberry Pi 5 with an AI HAT+ 2

The AI HAT+ 2 is a Hailo-10H with 8 GB of its own memory on the Pi 5’s PCIe connector. Raspberry Pi ships HailoRT 5.1.1 and the driver for it in its apt repository. Install them and reboot:

sudo apt install dkms hailo-h10-all
sudo reboot

Then install and start hailo-ollama as above, and join the Pi with llmkube metal join and the two --agent-arg flags; the tested Pi runs the agent and hailo-ollama as systemd user units with lingering on.

  • Raspberry Pi OS runs the Pi 5 on a kernel with 16K pages (6.18.50+rpt-rpi-2712). The agent, hailo-h10-all and hailo-ollama run on it.
  • The Pi 5 has no battery-backed clock and boots with the last saved time until network time corrects it. Without network time, the agent’s heartbeats look stale and TLS certificate checks can fail.
  • Raspberry Pi OS runs cloud-init with manage_etc_hosts: True, which rewrites /etc/hosts from /etc/cloud/templates/hosts.debian.tmpl at every boot. A line added to /etc/hosts for the API server’s name is gone after the first reboot or power cut, and the agent then logs lookup <name> on <dns-server>:53: no such host until it is back (it recovers within seconds, without a restart), while getent hosts may still resolve the name through mDNS. Add the line to hosts.debian.tmpl too, or join with an IP address or a DNS name (see Join the host by hand).

Testing without a Hailo-10H

test/hailosim builds the real hailo-ollama server against HailoRT’s headers and a fake libhailort that emulates a Hailo-10H. See its README for the settings it takes.

make docker-build-hailo-sim
docker run --rm -p 8000:8000 localhost/llmkube-hailo-sim:dev
hack/hailo-probe.sh http://127.0.0.1:8000

hack/hailo-probe.sh checks every endpoint the agent’s Ollama executor and ingress use. Run it on a real host to compare against the simulator. Its requests that generate ask for at most 16 tokens, since hailo-ollama keeps generating for a request whose client gave up (see Known limits).

To serve a hailo:// model from the simulator, start it with --name hailo-sim and run an agent in its network namespace (docker run --network container:hailo-sim) with --runtime ollama --ollama-port 8000, as on a real host. The agent then sizes models from the simulator instead of Hailo’s library: copy the manifests out of the container (docker cp hailo-sim:/usr/share/hailo-ollama/models/manifests ./manifests), mount them into the agent’s container, and pass --hailo-manifests-dir with their path, --hailo-library-url http://127.0.0.1:8001 (the simulator’s HAILO_SIM_LIBRARY_LISTEN) and --allowed-download-hosts 127.0.0.1, since the size check refuses loopback addresses that the allowlist does not name.

make test-e2e-host-agent runs that whole path in kind, with the e2e harness and its Hailo-10H suite (hailo, the default). The suite runs a simulator next to each agent and checks that memory admission sizes the HEF before anything is pulled, that a second hailo:// service on one host is refused with DeviceInUse while the first keeps serving and starts serving once the first is deleted, and that a hailo:// Model on another accelerator is refused.

LLMKube

Kubernetes for Local LLMs. Deploy, manage, and scale AI inference workloads with production-grade orchestration.

© 2026 Defilan Technologies LLC

Community

Built for the Kubernetes and AI communities

LLMKube is not affiliated with or endorsed by the Cloud Native Computing Foundation or the Kubernetes project. Kubernetes® is a registered trademark of The Linux Foundation.