charsiu: an open LLM runtime on the NPU (mainline kernel)
charsiu runs language models on the
ROCK 4D (RK3576) NPU through the mainline Linux rocket driver
(/dev/accel/accel0). No vendor library is in the execution path: there is no
rknpu driver and no librkllmrt. It loads ordinary GGUF files (the
llama.cpp format), so there is no model conversion step.
It loads llama, qwen2, qwen3, gemma3, gemma4, phi3 and smollm3 models. It can
also answer questions about images (llama.cpp mmproj files) and transcribe
speech (whisper.cpp files).
charsiu is an independent third-party open-source project, not part of official Radxa support. Report issues on its repository.
Performance
charsiu v0.2.0 against the vendor's rkllm 1.3.1, Qwen3-0.6B, the same token ids on both sides. These numbers were measured on another RK3576 board (ArmSoM CM5-IO). The ROCK 4D has the same SoC and runs the same kernel driver with the same 594 MHz NPU clock, so results should be close; the main difference between boards is cooling. Peak memory was 0.73 GB for charsiu and 1.12 GB for the vendor.
| Metric | charsiu, 594 MHz | vendor, 600 MHz | vendor, 950 MHz |
|---|---|---|---|
| Time to first token, 115 tokens | 405 ms | 556 ms | 510 ms |
| Time to first token, 139 tokens | 462 ms | 696 ms | 585 ms |
| Decode, speculation off | 27.0-28.0 tok/s | 18.2-18.8 tok/s | 23.2-23.75 tok/s |
The NPU computes int4 weights, which costs some quality compared with the same model at four bits on the CPU. The charsiu README gives the perplexity figures.
Prerequisites
-
A ROCK 4D running Armbian with the edge kernel. That kernel carries RK3576 NPU support for
rocket. Check it with:ls /dev/accel/It should list
accel0. -
A network connection to download the package and a model.
Steps
1. Install
Install the release package:
curl -fLO https://github.com/gahingwoo/charsiu/releases/download/v0.2.0/charsiu_0.2.0_arm64.deb
sudo apt install ./charsiu_0.2.0_arm64.deb
charsiu is also in the Armbian repository (sudo apt install charsiu), but that
copy can lag behind the newest release.
If the kernel cannot drive the NPU, use the installer script instead. It builds
charsiu, checks the kernel, and on a kernel without NPU support offers Armbian's
edge kernel. With --dry-run it only prints what it would do:
curl -fsSL https://raw.githubusercontent.com/gahingwoo/charsiu/stable/scripts/charsiu-install.sh | sh
2. Check the board
charsiu doctor
3. Get a model
charsiu pull with no argument shows a menu of tested models. To fetch one
directly:
charsiu pull qwen3-0.6b-q4
4. Chat
charsiu # a conversation
charsiu "what is a bandgap" # ask once
charsiu --image photo.jpg "what is in this picture"
5. OpenAI-compatible API
charsiu serve
It listens on port 11434 and prints its address. Clients can use
/v1/chat/completions (OpenAI) or /v1/messages (Anthropic), so Open WebUI and
similar tools can connect to it.
Troubleshooting
charsiu doctorreports what is missing. Include its output when you open an issue.- No
/dev/accel/accel0: the kernel has no RK3576 NPU support. Use the Armbian edge kernel. CHARSIU_NPU=0 charsiu ...runs on the CPU only. If the CPU gives the right answer and the NPU does not, the problem is on the NPU side.
References
- charsiu repository: gahingwoo/charsiu
- Kernel and Mesa work for the RK3576 NPU: gahingwoo/linux-rk3576-npu