Qwen3-VL-4B-Instruct - Renesas X5H
Introduction
This repository contains Qwen3-VL-4B-Instruct model, optimized for Renesas X5H platform for Image inference.
-
Model Architecture: Qwen3‑4B‑VL is a lightweight decoder‑only multimodal Transformer that jointly processes visual and textual inputs in an auto‑regressive framework using an integrated vision encoder and efficient attention mechanisms.
-
Source Model: Qwen/Qwen3-VL-4B-Instruct
Performance
The following performance metrics were measured with a prompt.
| Type | Model | Precision | Device | Offloading | Prefill Rate (tokens/sec) | Response Rate (tokens/sec) |
|---|---|---|---|---|---|---|
| NPU-only | Qwen3-VL-4B-Instruct | W4A16 | X5H - Single Cluster NPX | VisionEnc NPU(fp16) + LLM Dec (w4a16) Vision(640x512)@0.12sec | 522 | 23.6 |
| Mixed offloading | Qwen3-VL-4B-Instruct | W4A16 | X5H - Single Cluster NPX | VisionEnc CPU(fp16) + LLM Dec (w4a16) | 11.48 | |
| Mixed offloading | Qwen3-VL-4B-Instruct | FP16 | X5H - Single Cluster NPX | VisionEnc CPU(fp16) + LLM Dec (fp16) | 6.29 |
Prerequisites
To run model, you need:
- Renesas X5H Board
- Runner installer
- Hugging Face CLI: For downloading the model.
Deployment
The three released modes for deployment.
- alpha mode offers mixed offloading where Vision tower, projector and merger runs on CPU and Language decoder on NPX.
- NPU-only offers full offloading to NPU where Vision tower, projector, merger and Language decoder run on NPX.
Qwen3-VL-4B-Instruct (W4A16, NPU-only)
The NPU VLM OpenAI Server uses a client-server architecture and provides an OpenAI-compatible REST API for inference requests.
- Start the Server
bash ./setup_npu.sh ./npu-vlm-openai-server - Send an Inference Request
- Open a new terminal and connect to the target board using SSH
ssh root@<board-ip> - Navigate to the
toolsdirectorycd <installed-dir>/npu-vlm-openai-server/tools - Send a VLM request using
send_request.sh
If no prompt is specified, the script uses the following default promptbash send_request.sh ../test_img/car-640x512.jpg
To provide a custom promptDescribe this image.bash send_request.sh ../test_img/car-640x512.jpg "Describe the objects in this image."
- Open a new terminal and connect to the target board using SSH
Qwen3-VL-4B-Instruct (W4A16, Mixed_Offloading)
- Download the installer qwen3-4b-vl-w4a16-runner-0.1.0-Linux.sh from Files and version tab under w4a16\binaries\rcar-x5hv1\xOS_v4.32 folder.
- Copy the installer to the X5H board and run the installer.
bash ./qwen3-4b-vl-w4a16-runner-0.1.0-Linux.sh --prefix=./ --exclude-subdir --skip-license - Download the model files - Qwen3-VL-4B-Instruct-fp16.gguf and mmproj-Qwen3VL-4B-Instruct-F16.gguf from Files and version tab under fp16 folder and copy to the installed directory on the X5H board.
- Expected directory structure on the X5H board.
qwen3-4b-vl-w4a16-runner ├── Qwen3-VL-4B-Instruct-fp16.gguf ├── firmwares ├── kernel_modules ├── mmproj-Qwen3VL-4B-Instruct-F16.gguf ├── qwen3-4b-vl-w4a16-runner ├── qwen3-4b-w4a16 ├── scripts ├── setup_npu.sh └── test_img
Qwen3-VL-4B-Instruct (FP16, Mixed_Offloading)
- Download the installer qwen3-4b-vl-fp16-runner-0.1.0-Linux.sh from Files and version tab under fp16\binaries\rcar-x5hv1\xOS_v4.32 folder.
- Copy the installer to the X5H board and run the installer.
bash ./qwen3-4b-vl-fp16-runner-0.1.0-Linux.sh --prefix=./ --exclude-subdir --skip-license - Download the model files - Qwen3-VL-4B-Instruct-fp16.gguf and mmproj-Qwen3VL-4B-Instruct-F16.gguf from Files and version tab under fp16 folder and copy to the installed directory on the X5H board.
- Expected directory structure on the X5H board.
qwen3-4b-vl-fp16-runner ├── Qwen3-VL-4B-Instruct-fp16.gguf ├── firmwares ├── kernel_modules ├── mmproj-Qwen3VL-4B-Instruct-F16.gguf ├── qwen3-4b-vl-fp16-runner ├── scripts ├── setup_npu.sh └── test_img
Qwen3-VL-4B-Instruct (W4A16, NPU-only)
- Download the installer npu-vlm-openai-server-0.1.2-Linux.sh from Files and version tab under w4a16\binaries\rcar-x5hv1\xOS_v4.32 folder.
- Copy the installer to the X5H board and run the installer.
bash ./npu-vlm-openai-server-0.1.2-Linux.sh --prefix=./ --exclude-subdir --skip-license - Expected directory structure on the X5H board.
npu-vlm-openai-server ├── firmwares ├── kernel_modules ├── npu-vlm-openai-server ├── qwen3-4b-vlm-w4a16-pkg ├── scripts ├── setup_npu.sh ├── test_img └── tools
Inference
Qwen3-VL-4B-Instruct (W4A16, Mixed_Offloading)
bash ./setup_npu.sh
./qwen3-4b-vl-w4a16-runner -i <image file name>
Qwen3-VL-4B-Instruct (FP16, Mixed_Offloading)
bash ./setup_npu.sh
./qwen3-4b-vl-fp16-runner -i <image file name>