Qwen3-4B-Instruct - Renesas X5H
Introduction
This repository contains Qwen3-4B-Instruct model, optimized for Renesas X5H platform for Image inference.
Model Architecture: Qwen3โ4B is a lightweight decoderโonly unimodal 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-4B-Instruct
Performance
The following performance metrics were measured with a prompt.
| Model | Precision | Device | Prefill (tok/s) | token-gen (tok/sec) |
|---|---|---|---|---|
| Qwen3-4B-Instruct | W4A16 | X5H - Single Cluster NPX | 618 | 19.3 |
Prerequisites
To run model, you need:
- Renesas X5H Board
- Runner installer
- Hugging Face CLI: For downloading the model.
Qwen3-4B-Instruct (W4A16)
- Download the installer npu-llm-openai-server-0.1.3-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-llm-openai-server-0.1.3-Linux.sh --prefix=./ --exclude-subdir --skip-license - Expected directory structure on the X5H board.
npu-llm-openai-server โโโ firmwares โโโ kernel_modules โโโ npu-llm-openai-server โโโ qwen3-4b-llm-w4a16-pkg โโโ scripts โโโ setup_npu.sh โโโ tools
Inference
Qwen3-4B-Instruct
The NPU LLM 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-llm-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-llm-openai-server/tools - Send a VLM request using
send_request.shbash send_request.sh "<prompt>"
- Open a new terminal and connect to the target board using SSH