Instructions to use HanzoHuang/Qwen3-4B-RKLLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- RKLLM
How to use HanzoHuang/Qwen3-4B-RKLLM with RKLLM:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Document RKLLM artifacts and checksums
Browse files
README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
base_model: Qwen/Qwen3-4B
|
| 4 |
-
library_name: rkllm
|
| 5 |
pipeline_tag: text-generation
|
|
|
|
| 6 |
tags:
|
| 7 |
- rkllm
|
| 8 |
- rockchip
|
|
@@ -10,96 +10,47 @@ tags:
|
|
| 10 |
- rk3588
|
| 11 |
- qwen
|
| 12 |
- qwen3
|
| 13 |
-
|
| 14 |
---
|
| 15 |
|
| 16 |
# Qwen3-4B-RKLLM
|
| 17 |
|
| 18 |
-
RKLLM-converted
|
| 19 |
-
|
| 20 |
-
`.rkllm` files require the Rockchip RKLLM runtime and cannot be loaded directly with Transformers, llama.cpp, or Ollama.
|
| 21 |
-
|
| 22 |
-
## Base Model
|
| 23 |
-
|
| 24 |
-
- Model: Qwen3-4B
|
| 25 |
-
- Author: Alibaba Cloud Qwen Team
|
| 26 |
-
- Original Model: [Qwen/Qwen3-4B](https://huggingface.co/Qwen/Qwen3-4B)
|
| 27 |
-
- Original License: Apache-2.0
|
| 28 |
-
|
| 29 |
-
Refer to the [upstream model card](https://huggingface.co/Qwen/Qwen3-4B) for the original modelβs capabilities and limitations.
|
| 30 |
-
|
| 31 |
-
## Supported Platforms
|
| 32 |
-
|
| 33 |
-
| SoC | Quantization | Status |
|
| 34 |
-
| ------ | ------------ | ----------- |
|
| 35 |
-
| RK3576 | W4A16 | β
Tested |
|
| 36 |
-
| RK3576 | W8A8 | β
Tested |
|
| 37 |
-
| RK3588 | W8A8 | β
Supported |
|
| 38 |
|
| 39 |
-
|
| 40 |
|
| 41 |
-
##
|
| 42 |
|
| 43 |
-
-
|
| 44 |
-
-
|
|
|
|
| 45 |
|
| 46 |
-
##
|
| 47 |
|
| 48 |
-
|
| 49 |
-
| ------------------------------------------------------------ | ------------ |
|
| 50 |
-
| [Qwen3-4B_w4a16_RK3576.rkllm](RK3576/Qwen3-4B_w4a16_RK3576.rkllm) | W4A16 |
|
| 51 |
-
| [Qwen3-4B_w8a8_RK3576.rkllm](RK3576/Qwen3-4B_w8a8_RK3576.rkllm) | W8A8 |
|
| 52 |
-
| [Qwen3-4B_w8a8_RK3588.rkllm](RK3588/Qwen3-4B_w8a8_RK3588.rkllm) | W8A8 |
|
| 53 |
|
| 54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
-
``
|
| 57 |
-
.
|
| 58 |
-
βββ Qwen3-4B_data_quant.json
|
| 59 |
-
βββ RK3576
|
| 60 |
-
β βββ Qwen3-4B_w4a16_RK3576.rkllm
|
| 61 |
-
β βββ Qwen3-4B_w8a8_RK3576.rkllm
|
| 62 |
-
βββ RK3588
|
| 63 |
-
βββ Qwen3-4B_w8a8_RK3588.rkllm
|
| 64 |
-
```
|
| 65 |
|
| 66 |
## Usage
|
| 67 |
|
| 68 |
-
Download the desired RKLLM model and deploy it with the RKLLM runtime on the matching Rockchip platform.
|
| 69 |
-
|
| 70 |
-
For faster deployment without setting up the environment manually, see [Hanzo-Huang/rkllm-docker](https://github.com/Hanzo-Huang/rkllm-docker).
|
| 71 |
-
|
| 72 |
-
### Docker Deployment
|
| 73 |
-
|
| 74 |
-
Use the model-specific image for the fastest RK3576 W4A16 deployment. The model is included in the image:
|
| 75 |
-
|
| 76 |
-
```bash
|
| 77 |
-
sudo docker run --rm -it \
|
| 78 |
-
--privileged \
|
| 79 |
-
-p 8001:8001 \
|
| 80 |
-
-v /dev:/dev \
|
| 81 |
-
ghcr.io/hanzo-huang/rkllm-docker/qwen3-4b:w4a16-rk3576
|
| 82 |
-
```
|
| 83 |
-
|
| 84 |
-
Alternatively, use the reusable environment image and mount a downloaded model:
|
| 85 |
-
|
| 86 |
```bash
|
| 87 |
-
|
| 88 |
-
-
|
| 89 |
-
-
|
| 90 |
-
-v /dev:/dev \
|
| 91 |
-
-v ./:/app/models:ro \
|
| 92 |
-
-e MODEL_PATH=/app/models/RK3576/Qwen3-4B_w4a16_RK3576.rkllm \
|
| 93 |
-
-e TARGET_PLATFORM=rk3576 \
|
| 94 |
-
ghcr.io/hanzo-huang/rkllm-docker:env-latest
|
| 95 |
```
|
| 96 |
|
| 97 |
-
|
| 98 |
|
| 99 |
-
##
|
| 100 |
|
| 101 |
-
|
| 102 |
|
| 103 |
## Acknowledgements
|
| 104 |
|
| 105 |
-
Thanks to the
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
base_model: Qwen/Qwen3-4B
|
|
|
|
| 4 |
pipeline_tag: text-generation
|
| 5 |
+
library_name: rkllm
|
| 6 |
tags:
|
| 7 |
- rkllm
|
| 8 |
- rockchip
|
|
|
|
| 10 |
- rk3588
|
| 11 |
- qwen
|
| 12 |
- qwen3
|
|
|
|
| 13 |
---
|
| 14 |
|
| 15 |
# Qwen3-4B-RKLLM
|
| 16 |
|
| 17 |
+
RKLLM-converted Qwen3-4B language-model artifacts for Rockchip RK3576 and RK3588 NPUs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
+
These hardware-specific `.rkllm` files require a compatible Rockchip RKLLM runtime. They are not Transformers checkpoints and cannot be loaded directly with Transformers, llama.cpp, or Ollama.
|
| 20 |
|
| 21 |
+
## Base model
|
| 22 |
|
| 23 |
+
- Upstream model: [Qwen/Qwen3-4B](https://huggingface.co/Qwen/Qwen3-4B)
|
| 24 |
+
- License: Apache-2.0
|
| 25 |
+
- Model type: LLM (text only)
|
| 26 |
|
| 27 |
+
## Conversion and variants
|
| 28 |
|
| 29 |
+
Converted with RKLLM Toolkit 1.3.0. Use a file built for the exact target SoC.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
+
| Target | Quantization | File | SHA256 |
|
| 32 |
+
| --- | --- | --- | --- |
|
| 33 |
+
| RK3576 | W4A16 | [Qwen3-4B_RK3576_w4a16.rkllm](RK3576/Qwen3-4B_RK3576_w4a16.rkllm) | `07b25e01a16b50c0f76c777826aea602e485395a77df4c62428cf9fa532f509e` |
|
| 34 |
+
| RK3576 | W4A16 (g128) | [Qwen3-4B_RK3576_w4a16_g128.rkllm](RK3576/Qwen3-4B_RK3576_w4a16_g128.rkllm) | `66b8dbc941a7fc9864583082013a2d765be9839f19e98763abfd5ec2bca166a2` |
|
| 35 |
+
| RK3576 | W8A8 | [Qwen3-4B_RK3576_w8a8.rkllm](RK3576/Qwen3-4B_RK3576_w8a8.rkllm) | `7f40a9c638360b1ce51dc03d2fe5005c4ded9804d13304de3c52244634e7ed26` |
|
| 36 |
+
| RK3588 | W8A8 | [Qwen3-4B_RK3588_w8a8.rkllm](RK3588/Qwen3-4B_RK3588_w8a8.rkllm) | `6f53a7b5ec8430f95a9fb6e6279e8a4744c9952d8ec59c4a7303b92ebc8b50d5` |
|
| 37 |
|
| 38 |
+
The repository also includes `Qwen3-4B_data_quant.json`, used as calibration data during conversion.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
## Usage
|
| 41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
```bash
|
| 43 |
+
hf download HanzoHuang/Qwen3-4B-RKLLM \
|
| 44 |
+
RK3576/Qwen3-4B_RK3576_w4a16_g128.rkllm \
|
| 45 |
+
--local-dir Qwen3-4B-RKLLM
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
```
|
| 47 |
|
| 48 |
+
Use the Qwen3 chat template with the RKLLM runtime. For Docker deployment, see [Hanzo-Huang/rkllm-docker](https://github.com/Hanzo-Huang/rkllm-docker).
|
| 49 |
|
| 50 |
+
## Limitations
|
| 51 |
|
| 52 |
+
These are target-specific converted artifacts. Validate quality, memory use, and runtime compatibility on your own Rockchip device.
|
| 53 |
|
| 54 |
## Acknowledgements
|
| 55 |
|
| 56 |
+
Thanks to the Qwen Team, Rockchip, and the RKLLM community.
|