Qwen2.5-VL-3B-Instruct - Renesas X5H
Introduction
This repository contains Qwen2.5-VL-3B-Instruct model, optimized for Renesas X5H platform for Image inference.
-
Model Architecture: Qwen2.5‑VL is an auto‑regressive vision‑language model built on a decoder‑only Transformer architecture, integrating a visual encoder with the language model through a multimodal projector, and incorporating optimized attention mechanisms and normalization strategies to improve training stability and inference efficiency.
-
Source Model: Qwen/Qwen2.5-VL-3B-Instruct
Performance
The following performance metrics were measured with a prompt.
| Model | Precision | Device | Offloading | TTFT (Batch size) | token generator (tokens/sec) |
|---|---|---|---|---|---|
| Qwen2.5-VL-3B-Instruct | W4A16 | X5H - Single Cluster NPX | VisionTower NPX(fp16) + Language Decoder (w4a16) | 307 tok/sec (B=120) | 14.09 tokens/sec |
| Qwen2.5-VL-3B-Instruct | FP16 | X5H - Single Cluster NPX | VisionTower NPX(fp16) + Language Decoder (fp16) | 307 tok/sec (B=120) | 8.21 tokens/sec |
Prerequisites
To run model, you need:
- Renesas X5H Board
- Hugging Face CLI: For downloading the model.
Deployment
Qwen2.5-VL-3B-Instruct (W4A16)
- Download the installer qwen2p5-vl-w4a16-runner-0.1.0-Linux.sh from Files and version tab.
- Copy the installer to the X5H board and run the installer.
bash ./qwen2p5-vl-w4a16-runner-0.1.0-Linux.sh --prefix=./ --exclude-subdir --skip-license - Download the model files - Qwen2.5-VL-3B-Instruct-fp16.gguf and mmproj-Qwen2.5-VL-3B-Instruct-f16.gguf from Files and version tab and copy to the installed directory on the X5H board.
- Expected directory structure on the X5H board.
qwen2p5-vl-w4a16-runner/ ├── firmwares ├── kernel_modules ├── mmproj-Qwen2.5-VL-3B-Instruct-f16.gguf ├── Qwen2.5-VL-3B-Instruct-fp16.gguf ├── qwen2p5-vl-w4a16-runner ├── qwen2p5-w4a16 ├── scripts └── setup_npu.sh
Inference (W4A16)
bash ./setup_npu.sh
./qwen2p5-vl-w4a16-runner -m Qwen2.5-VL-3B-Instruct-fp16.gguf -v mmproj-Qwen2.5-VL-3B-Instruct-f16.gguf -i car-1.jpg -p "Describe this image"
Qwen2.5-VL-3B-Instruct (FP16)
- Download the installer qwen2p5-vl-runner-0.1.0-Linux.sh from Files and version tab.
- Copy the installer to the X5H board and run the installer.
bash ./qwen2p5-vl-runner-0.1.0-Linux.sh --prefix=./ --exclude-subdir --skip-license - Download the model files - Qwen2.5-VL-3B-Instruct-fp16.gguf and mmproj-Qwen2.5-VL-3B-Instruct-f16.gguf from Files and version tab and copy to the installed directory on the X5H board.
- Expected directory structure on the X5H board.
qwen2p5-vl-runner/ ├── firmwares ├── kernel_modules ├── mmproj-Qwen2.5-VL-3B-Instruct-f16.gguf ├── Qwen2.5-VL-3B-Instruct-fp16.gguf ├── qwen2p5-vl-runner ├── scripts └── setup_npu.sh
Inference (FP16)
bash ./setup_npu.sh
./qwen2p5-vl-runner -m Qwen2.5-VL-3B-Instruct-fp16.gguf -v mmproj-Qwen2.5-VL-3B-Instruct-f16.gguf -i test_img/sport-car.jpg -p "Describe this image"