Skip to main content

Qwen VL Sample

This document describes running the upstream Qwen VL multimodal vision-language sample with QAI AppBuilder on Linux aarch64 (Gradio UI or in-script Inference).

Supported devices

DeviceSoC
Fogwise® AIRbox Q900QCS9075

Install QAI AppBuilder​

tip
  1. Install QAI AppBuilder by following the QAI AppBuilder installation guide.

  2. Configure ADSP environment variables as described in Create ADSP environment variables.

Run the sample​

Install dependencies​

Install sample dependencies in the activated virtual environment:

Device
pip3 install "transformers==4.57.0" qwen-vl-utils gradio Pillow torch torchvision opencv-python-headless
tip

qwen_vl.py imports Qwen3-related modules, so you need transformers ≥ 4.57 (includes transformers.models.qwen3_vl). Also install qwen-vl-utils.

Prepare the model​

This sample does not auto-download Qwen weights via --chipset / AI Hub. Follow the upstream README for a pre-quantized package, for example Qwen2-VL 2B:

Device
cd qai-appbuilder/samples/Multimodal/qwen_vl
wget -c https://www.aidevhome.com/data/adh2/models/suggested/qwen2vl2b.zip
unzip -o qwen2vl2b.zip
# Example extract layout: ./qwen2vl2b/ (veg.serialized.bin, weight_sharing_model_1_of_1.serialized.bin, tokenizer.json, ...)

The zip is about 1.8 GB; extracted size is about 2.6 GB. Reserve disk space accordingly.

Run the script​

  • Enter the sample directory and set ADSP (same as the install page)

    Device
    cd qai-appbuilder/samples/Multimodal/qwen_vl
    export ADSP_LIBRARY_PATH=$(python3 -c "import os, qai_appbuilder; print(os.path.join(os.path.dirname(qai_appbuilder.__file__), 'libs'))")
  • Start the Gradio web UI (default 0.0.0.0:7861)

    Device
    python3 qwen_vl.py --model qwen2 --path ./qwen2vl2b --host 0.0.0.0 --port 7861

Open http://<device-ip>:7861, upload an image, and enter a question.

  • Optional headless check: after loading the model, call Inference once. On AIRbox Q900, with sample image vlm_demo.png and prompt Describe this image in one sentence., a response similar to the following was observed:
A webpage with a form for uploading files.
warning

run_inference.py --model qwen_vl does not replace model download. The entrypoint requires --path to the model directory and has no --chipset 9075 argument.

tip

If TBB is installed, some setups set LD_PRELOAD to libtbb.so per the upstream README; on Q900 a one-shot inference also succeeded without it.

    You need to be logged into GitHub to post a comment. If you are already logged in, please ignore this message.

    Radxa-docs © 2026 by Radxa Computer (Shenzhen) Co.,Ltd. is licensed under CC BY 4.0