Goal
Run small LLMs (2-3B parameters like Qwen2.5-3B, Phi-3 Mini, Gemma 2B) using the Qualcomm Hexagon NPU for inference acceleration.
What I’ve Done So Far
1. System Installation
-
Flashed Armbian to MicroSD card -
Successfully booted with GNOME desktop -
Verified firmware version (251013 - latest) -
System running stable
2. QAIRT SDK Installation
Following the Radxa NPU development guide:
Qualcomm Software Center:
sudo dpkg -i QualcommSoftwareCenter1.17.2.Linux-arm64.deb
sudo apt --fix-broken install -y
QAIRT SDK 2.40.0.251030:
-
Downloaded from GitHub releases (v2.40.0.251030.zip)
-
Extracted to
~/qairt/2.40.0.251030/ -
Verified SDK structure:
-
lib/aarch64-ubuntu-gcc9.4/contains libQnnHtp.so and NPU backends -
lib/hexagon-v68/unsigned/contains libQnnHtpV68Skel.so -
bin/aarch64-ubuntu-gcc9.4/contains CLI tools
-
Environment Configuration: Added to ~/.bashrc:
bash
# QAIRT SDK
export QAIRT_SDK_ROOT=~/qairt/2.40.0.251030
export LD_LIBRARY_PATH=$QAIRT_SDK_ROOT/lib/aarch64-ubuntu-gcc9.4:$LD_LIBRARY_PATH
export PATH=$QAIRT_SDK_ROOT/bin/aarch64-ubuntu-gcc9.4:$PATH
System Library Setup:
bash
sudo mkdir -p /usr/lib/rfsa/adsp/
sudo cp ~/qairt/2.40.0.251030/lib/hexagon-v68/unsigned/libQnnHtpV68Skel.so /usr/lib/rfsa/adsp/
3. QAI AppBuilder Installation
-
Downloaded qai_appbuilder-2.28.0-cp312-cp312-linux_aarch64.whl -
Ready to install with: pip3 install qai_appbuilder-2.28.0-cp312-cp312-linux_aarch64.whl
Questions & Need Help
-
Has anyone successfully run LLMs on Q6A’s NPU? What models work best?
-
QAI AppBuilder workflow: After installing the Python wheel, what’s the complete process to:
-
Convert a Hugging Face model (e.g., Qwen2.5-3B) to QNN format?
-
Quantize to INT8 for NPU?
-
Run inference using the NPU backend?
-
-
Performance expectations: What’s realistic inference speed (tokens/second) for 2-3B models on the Hexagon NPU?
-
Model recommendations: Which specific models are confirmed working:
-
Qwen2.5-1.8B/3B?
-
Phi-3 Mini?
-
Gemma 2B?
-
MiniCPM 2B?
-
Reference Resources
-
Qualcomm AI Hub (but QCS6490 only listed as “proxy device”)