FREE SHIPPING WITHIN THE USA
30-Day Easy Returns 30-Day Easy Returns
Secure Checkout Guaranteed Secure Checkout Guaranteed
Free Shipping in USA Free Shipping in USA

Your Cart 0 Items

Shipping: Free
Sub Total: $0.00

LLM Code

Page 22: Creating Working Folders

mkdir -p ~/hailo-5.3-test/{logs,test-assets,backups}
mkdir -p ~/hailo-5.3-test/packages
cd ~/hailo-5.3-test/packages

Page 23-24: Downloading the Hailo Files

cd ~/Downloads
mv hailort-pcie-driver_5.3.0_all.deb ~/hailo-5.3-test/packages/
mv hailort_5.3.0_arm64.deb ~/hailo-5.3-test/packages/
mv hailort-5.3.0-cp313-cp313-linux_aarch64.whl ~/hailo-5.3-test/packages/
mv *gen*5.3*.deb ~/hailo-5.3-test/packages/ 2>/dev/null || true
mv *zoo*5.3*.deb ~/hailo-5.3-test/packages/ 2>/dev/null || true

THEN

cd ~/hailo-5.3-test/packages
ls -lh

Page 25: Installing Runtime Packages

cd ~/hailo-5.3-test/packages
ls -lh *5.3*
for f in ./*5.3*.deb; do
 echo “==============================”
 echo “$f”
 dpkg-deb -I “$f” | grep -Ei
“Package:|Version:|Architecture:|Depends:”
done
sudo apt install --simulate ./hailort_5.3.0_arm64.deb \
 ./hailort-pcie-driver_5.3.0_all.deb
sudo apt install -y ./hailort_5.3.0_arm64.deb \
 ./hailort-pcie-driver_5.3.0_all.deb

Page 26: Verifying Hailo Runtime

dpkg -l | grep -Ei “hailo|hailort|h10|tappas”
lspci | grep -i hailo
lsmod | grep -i hailo
find /lib/modules/$(uname -r) -iname “*hailo*”
hailortcli scan
hailortcli fw-control identify

Page 27: Installing Hailo Binding

python3 -m venv ~/hailo-5.3-test-venv
source ~/hailo-5.3-test-venv/bin/activate
pip install --upgrade pip
pip install ~/hailo-5.3-test/packages/hailort-5.3.0-cp313-
cp313-linux_aarch64.whl
python3 - <<’PY’
import hailo_platform
print(“hailo_platform import: OK”)
PY

Page 28: Install GenAI Model Zoo

which hailo-ollama || echo “hailo-ollama not installed”

THEN

cd ~/hailo-5.3-test/packages
sudo apt install --simulate ./*gen*5.3*.deb ./*zoo*5.3*.deb
sudo apt install -y ./*gen*5.3*.deb ./*zoo*5.3*.deb
which hailo-ollama || echo “hailo-ollama still not installed”

Page 29: Starting Hailo-Ollama

IN TERMINAL #1:

hailo-ollama

IN TERMINAL #2:

mkdir -p ~/hailo-5.3-test/logs/hailo-ollama
curl --silent http://localhost:8000/hailo/v1/list | jq \
 | tee ~/hailo-5.3-test/logs/hailo-ollama/model-list.json

Page 30: Running Your First Text Prompt

sudo apt install -y time jq
/usr/bin/time -f “Elapsed: %E CPU: %P MemKB: %M” \
curl --silent -X POST http://localhost:8000/api/chat \
 -H “Content-Type: application/json” \
 -d ‘{
 “model”: “llama3.2:1b”,
 “messages”: [
 {
 “role”: “user”,
 “content”: “Explain in five beginner-friendly sentences what
local AI on a Raspberry Pi is useful for.”
 }
 ],
 “stream”: false
 }’ 2> ~/hailo-5.3-test/logs/hailo-ollama/llama3.2-1b-time.
txt \
 | jq | tee ~/hailo-5.3-test/logs/hailo-ollama/llama3.2-1boutput.json

Page 33: Install Hailo Apps Without TAPPAS

Context: cd ~
git clone https://github.com/hailo-ai/hailo-apps.git
cd hailo-apps
sudo ./install.sh --no-tappas-required \
 | tee ~/hailo-5.3-test/logs/hailo-apps-install-no-tappas.
txt

Page 34: Make HailoRT Python Binding Visible

sudo python3 -m pip install --break-system-packages \
 ~/hailo-5.3-test/packages/hailort-5.3.0-cp313-cp313-linux_
aarch64.whl
python3 - <<’PY’
import hailo_platform
print(“hailo_platform import: OK”)
PY
sudo python3 - <<’PY’
import hailo_platform
print(“sudo hailo_platform import: OK”)
PY

Page 35: Load Environment and List VLM Resources

cd ~/hailo-apps
source setup_env.sh
hailo-download-resources --arch hailo10h --list-models \
 | tee ~/hailo-5.3-test/logs/hailo-apps-resource-models.txt
grep -Ei “qwen|vl|vision|whisper|asr” \
 ~/hailo-5.3-test/logs/hailo-apps-resource-models.txt \
 | tee ~/hailo-5.3-test/logs/model-family-sea

Page 36: Download Qwen2

export hailort_version=5.3.0
export model_zoo_version=v5.3.0
export hailo_arch=hailo10h
export host_arch=aarch64
export resources_path=/usr/local/hailo/resources
export virtual_env_name=venv_hailo_apps
export tappas_version=-1
export tappas_postproc_path=/usr/local/hailo/tappas/post_
processes
hailo-download-resources --arch hailo10h \
 --group vlm_chat \
 --resource-name “Qwen2-VL-2B-Instruct” \
 --resource-type model \
 --dry-run

THEN

hailo-download-resources --arch hailo10h \
 --group vlm_chat \
 --resource-name “Qwen2-VL-2B-Instruct” \
 --resource-type model \
 | tee ~/hailo-5.3-test/logs/download-qwen2-vl-2b.txt
sudo find /usr/local/hailo/resources -iname “*Qwen2-VL*” -o
-iname “*qwen*vl*”

Page 38: Built-In VLM Demo Test

python -m hailo_apps.python.gen_ai_apps.simple_vlm_chat.
simple_vlm_chat \
 --list-models \
 | tee ~/hailo-5.3-test/logs/qwen-vl-list-models.txt
python -m hailo_apps.python.gen_ai_apps.simple_vlm_chat.
simple_vlm_chat \
 --hef-path /usr/local/hailo/resources/models/hailo10h/
Qwen2-VL-2B-Instruct.hef \
 | tee ~/hailo-5.3-test/logs/simple-qwen2-vl-output.txt

Page 39: Barcode Image Example

cd ~/hailo-apps
mkdir -p ~/hailo-5.3-test/backups
cp doc/images/barcode-example.png \
 ~/hailo-5.3-test/backups/barcode-example.original.png
cp hailo_apps/python/gen_ai_apps/simple_vlm_chat/simple_vlm_
chat.py \
 ~/hailo-5.3-test/backups/simple_vlm_chat.original.py

THEN

~/hailo-5.3-test/test-assets/test-image.jpg

---

python3 - <<’PY’
from PIL import Image
from pathlib import Path
src = Path.home() / “hailo-5.3-test/test-assets/test-image.
jpg”
dst = Path.home() / “hailo-apps/doc/images/barcode-example.
png”
img = Image.open(src).convert(“RGB”)
img.save(dst)
print(f”Saved custom image to: {dst}”)
print(f”Image size: {img.size}”)
PY

---

python3 - <<'PY'
from pathlib import Path
p = Path.home() / "hailo-apps/hailo_apps/python/gen_ai_apps/
simple_vlm_chat/simple_vlm_chat.py"
text = p.read_text()
old = "How many people in the image?."
new = (
 "This is a product package image. Identify the product
name, read any visible text, "
 "and describe any graphics or objects shown on the package, especially whether you see "
 "a camera, microscope, lens, or optics-related imagery.
If something is unclear, say so."
)
if old not in text:
 print("Old prompt not found; inspect script manually.")
else:
 p.write_text(text.replace(old, new))
 print("Prompt patched for focused VLM test.")
PY

THEN

/usr/bin/time -f "Elapsed: %E CPU: %P MemKB: %M" \
python -m hailo_apps.python.gen_ai_apps.simple_vlm_chat.simple_vlm_chat \
 --hef-path /usr/local/hailo/resources/models/hailo10h/Qwen2-VL-2B-Instruct.hef \
 2> ~/hailo-5.3-test/logs/qwen2-vl-focused-object-time.txt
\
 | tee ~/hailo-5.3-test/logs/qwen2-vl-focused-object-output.txt

THEN

cp ~/hailo-5.3-test/backups/barcode-example.original.png \
 ~/hailo-apps/doc/images/barcode-example.png
cp ~/hailo-5.3-test/backups/simple_vlm_chat.original.py \
 ~/hailo-apps/hailo_apps/python/gen_ai_apps/simple_vlm_
chat/simple_vlm_chat.py

Page 46: Download & Confirm Whisper-Base

hailo-download-resources --arch hailo10h \
 --group whisper_chat \
 --resource-name “Whisper-Base” \
 --resource-type model \
 --dry-run
hailo-download-resources --arch hailo10h \
 --group whisper_chat \
 --resource-name “Whisper-Base” \
 --resource-type model \
 | tee ~/hailo-5.3-test/logs/download-whisper-base.txt
sudo find /usr/local/hailo/resources -iname “*Whisper-Base*” -o -iname “*whisper*base*”

Page 47: Run Sample Audio Transcription

cd ~/hailo-apps
source setup_env.sh
python -m hailo_apps.python.gen_ai_apps.simple_whisper_chat.
simple_whisper_chat \
 --audio $(find ~/hailo-apps -iname “audio.wav” | head -1) \
 --hef-path /usr/local/hailo/resources/models/hailo10h/
Whisper-Base.hef \
 | tee ~/hailo-5.3-test/logs/whisper-base-output.txt
/usr/bin/time -f “Elapsed: %E CPU: %P MemKB: %M” \
python -m hailo_apps.python.gen_ai_apps.simple_whisper_chat.
simple_whisper_chat \
 --audio $(find ~/hailo-apps -iname “audio.wav” | head -1) \
 --hef-path /usr/local/hailo/resources/models/hailo10h/
Whisper-Base.hef \
 2> ~/hailo-5.3-test/logs/whisper-base-time.txt \
 | tee ~/hailo-5.3-test/logs/whisper-base-output.txt

Page 48: No Microphone Detected

arecord -l
# If no device appears, use the included sample audio or
generate a test WAV.

THEN

sudo apt install -y espeak-ng ffmpeg
mkdir -p ~/hailo-5.3-test/test-assets
espeak-ng -w ~/hailo-5.3-test/test-assets/test-whisper.wav \
 “This is a local speech recognition test on Raspberry Pi
using Hailo Whisper Base.”
ffmpeg -y -i ~/hailo-5.3-test/test-assets/test-whisper.wav \
 -ar 16000 -ac 1 -sample_fmt s16 \
 ~/hailo-5.3-test/test-assets/test-whisper-16k.wav

---

arecord -l
# Example if a USB microphone appears as card 1, device 0:
arecord -D plughw:1,0 -f S16_LE -r 16000 -c 1 -d 10 \
 ~/hailo-5.3-test/test-assets/test-whisper-16k.wav
# Confirm the resulting file format:
ffprobe ~/hailo-5.3-test/test-assets/test-whisper-16k.wav

---

ffmpeg -y -i input-recording.wav \
 -ar 16000 -ac 1 -sample_fmt s16 \
 ~/hailo-5.3-test/test-assets/test-whisper-16k.wav

Page 57: Package Selection

cd ~/hailo-5.3-test/packages
ls -lh *5.3*
for f in ./*5.3*.deb; do
 echo “==============================”
 echo “$f”
 dpkg-deb -I “$f” | grep -Ei
“Package:|Version:|Architecture:|Depends:”
done
sudo apt install --simulate ./hailort_5.3.0_arm64.deb \
 ./hailort-pcie-driver_5.3.0_all.deb

Page 58: DKMS Build Failure

dpkg -l | grep -Ei “hailo|hailort|h10|tappas”
# Example failed state:
# ii hailort 5.3.0
# iF hailort-pcie-driver 5.3.0
sudo dpkg --audit
sudo tail -n 200 /var/log/hailort-pcie-driver.deb.log

---

sudo grep -R “del_timer_sync” \
 /usr/src/hailort-pcie-driver \
 /usr/src/hailo1x_pci-5.3.0 \
 /var/lib/dkms/hailo1x_pci/5.3.0 2>/dev/null
sudo grep -RIl “del_timer_sync” \
 /usr/src/hailort-pcie-driver \
 /usr/src/hailo1x_pci-5.3.0 \
 /var/lib/dkms/hailo1x_pci/5.3.0 2>/dev/null \
 | xargs -r sudo sed -i ‘s/del_timer_sync/timer_delete_
sync/g’
sudo dkms remove hailo1x_pci/5.3.0 --all || true
sudo dpkg --configure -a
dpkg -l | grep -Ei “hailo|hailort|h10|tappas”
dkms status | grep -i hailo

Page 60: Hardware Verification

lspci | grep -i hailo
lsmod | grep -i hailo
find /lib/modules/$(uname -r) -iname “*hailo*”
hailortcli scan
hailortcli fw-control identify

Page 61: Python Binding Not Visible

python3 - <<’PY’
try:
 import hailo_platform
 print(“hailo_platform import: OK”)
except Exception as e:
 print(“hailo_platform import failed:”)
 print(e)
PY
# If Hailo Apps must see it under sudo on a dedicated test
image:
sudo python3 -m pip install --break-system-packages \
 ~/hailo-5.3-test/packages/hailort-5.3.0-cp313-cp313-linux_
aarch64.whl

Page 62: Server and Curl Issues

which hailo-ollama || echo “hailo-ollama not installed”
# Terminal 1
hailo-ollama
# Terminal 2
ss -ltnp | grep 8000
curl --silent http://localhost:8000/hailo/v1/list | jq
# Correct POST form for chat:
curl --silent -X POST http://localhost:8000/api/chat \
 -H “Content-Type: application/json” \
 -d ‘{“model”:”llama3.2:1b”,”messages”:[{“role”:”user”,”-
content”:”Hello”}],”stream”:false}’ | jq

Page 63: Hailo & TAPPAS Downloads

cd ~/hailo-apps
source setup_env.sh
# GenAI-only installation path:
sudo ./install.sh --no-tappas-required
# If the downloader reports missing variables:
export hailort_version=5.3.0
export model_zoo_version=v5.3.0
export hailo_arch=hailo10h
export host_arch=aarch64
export resources_path=/usr/local/hailo/resources
export virtual_env_name=venv_hailo_apps
export tappas_version=-1
export tappas_postproc_path=/usr/local/hailo/tappas/post_
processes

THEN

hailo-download-resources --arch hailo10h \
 --group vlm_chat \
 --resource-name “Qwen2-VL-2B-Instruct” \
 --resource-type model \
 --dry-run
hailo-download-resources --arch hailo10h \
 --group whisper_chat \
 --resource-name “Whisper-Base” \
 --resource-type model \
 --dry-run
# Delete a known partial download if a size mismatch occurs:
sudo find /usr/local/hailo/resources \
 -iname “*Qwen2.5-1.5B-Instruct*” -delete

Page 64: Model Download Problems

# Text demo checks
ss -ltnp | grep 8000
curl --silent http://localhost:8000/hailo/v1/list | jq
# Image demo checks
python -m hailo_apps.python.gen_ai_apps.simple_vlm_chat.simple_vlm_chat --help
python -m hailo_apps.python.gen_ai_apps.vlm_chat.vlm_chat
--help
ls /dev/video* 2>/dev/null || echo “No video devices found”
# Audio demo checks
arecord -l
find ~/hailo-apps -iname “audio.wav” -print
ffprobe ~/hailo-5.3-test/test-assets/test-whisper-16k.wav 2>/
dev/null || true

Page 65: Final Check

dpkg -l | grep -Ei “hailo|hailort|h10|tappas|gen|zoo”
lspci | grep -i hailo
lsmod | grep -i hailo
hailortcli scan
hailortcli fw-control identify
python3 - <<’PY’
import hailo_platform
print(“hailo_platform import: OK”)
PY

Page 66: Cleanup and Final Report

# Restore custom-modified demo files if not already restored.
cp ~/hailo-5.3-test/backups/barcode-example.original.png \
 ~/hailo-apps/doc/images/barcode-example.png
cp ~/hailo-5.3-test/backups/simple_vlm_chat.original.py \
 ~/hailo-apps/hailo_apps/python/gen_ai_apps/simple_vlm_
chat/simple_vlm_chat.py

---

mkdir -p ~/hailo-5.3-test/final-report
cp -r ~/hailo-5.3-test/logs/* ~/hailo-5.3-test/final-report/
2>/dev/null || true
cat /etc/os-release | tee ~/hailo-5.3-test/final-report/os-release.txt
uname -a | tee ~/hailo-5.3-test/final-report/uname.txt
dpkg -l | grep -Ei “hailo|hailort|h10|tappas|gen|zoo” \
 | tee ~/hailo-5.3-test/final-report/hailo-packages.txt
lspci | grep -i hailo | tee ~/hailo-5.3-test/final-report/
lspci-hailo.txt
lsmod | grep -i hailo | tee ~/hailo-5.3-test/final-report/lsmod-hailo.txt
hailortcli scan | tee ~/hailo-5.3-test/final-report/hailortcli-scan.txt
hailortcli fw-control identify | tee ~/hailo-5.3-test/final-report/hailortcli-identify.txt
find /usr/local/hailo/resources/models/hailo10h -maxdepth 1
-type f -name “*.hef” -ls \
 | tee ~/hailo-5.3-test/final-report/hailo10h-model-files.txt
cd ~
tar -czf hailo-5.3-test-final-report.tar.gz hailo-5.3-test/final-report
ls -lh hailo-5.3-test-final-report.tar.gz