HanzoHuang commited on
Commit
bebbf29
·
verified ·
1 Parent(s): 9eb4099

Make RKLLM model card easier to use

Browse files
Files changed (1) hide show
  1. README.md +38 -25
README.md CHANGED
@@ -12,48 +12,61 @@ tags:
12
  - qwen2
13
  ---
14
 
15
- # Qwen2-0.5B-Instruct-RKLLM
16
 
17
- RKLLM-converted Qwen2-0.5B-Instruct 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/Qwen2-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2-0.5B-Instruct)
24
- - License: Apache-2.0
25
- - Model type: LLM (text only)
26
 
27
- ## Conversion and variants
28
-
29
- ### Toolkit version
 
 
30
 
31
- **RKLLM Toolkit: v1.3.0**
32
 
33
- Use a file built for the exact target SoC.
34
 
35
- | Target | Quantization | File | SHA256 |
36
- | --- | --- | --- | --- |
37
- | RK3576 | W4A16 (g128) | [Qwen2-0.5B-Instruct_RK3576_w4a16_g128.rkllm](RK3576/Qwen2-0.5B-Instruct_RK3576_w4a16_g128.rkllm) | `a166cdcff5d8a2e33423d01d8bac6f7a6ad1e1130fbd0bfefdb8b69082113e87` |
38
- | RK3576 | W8A8 | [Qwen2-0.5B-Instruct_RK3576_w8a8.rkllm](RK3576/Qwen2-0.5B-Instruct_RK3576_w8a8.rkllm) | `cdccb51e23131352823af8becf9ac4acb15cb30f0f961e89d16cb0fabd003414` |
39
- | RK3588 | W8A8 | [Qwen2-0.5B-Instruct_RK3588_w8a8.rkllm](RK3588/Qwen2-0.5B-Instruct_RK3588_w8a8.rkllm) | `24e99eeea1512d6e7f3f120f3344a510933301dfcb72bd64b24a9724ab48e1d8` |
40
 
41
- The repository also includes `Qwen2-0.5B-Instruct_data_quant.json`, used as calibration data during conversion.
42
 
43
- ## Usage
44
 
45
  ```bash
46
  hf download HanzoHuang/Qwen2-0.5B-Instruct-RKLLM \
47
  RK3576/Qwen2-0.5B-Instruct_RK3576_w4a16_g128.rkllm \
48
- --local-dir Qwen2-0.5B-Instruct-RKLLM
49
  ```
50
 
51
- Use the Qwen2 Instruct chat template with the RKLLM runtime. For Docker deployment, see [Hanzo-Huang/rkllm-docker](https://github.com/Hanzo-Huang/rkllm-docker).
52
 
53
- ## Limitations
 
 
 
 
 
 
 
 
 
 
 
54
 
55
- These are target-specific converted artifacts. Validate quality and runtime compatibility on your Rockchip device.
56
 
57
- ## Acknowledgements
58
 
59
- Thanks to the Qwen Team, Rockchip, and the RKLLM community.
 
12
  - qwen2
13
  ---
14
 
15
+ # Qwen2-0.5B-Instruct · RKLLM
16
 
17
+ Text generation on Rockchip RK3576 and RK3588, converted from [Qwen/Qwen2-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2-0.5B-Instruct).
18
 
19
+ - **Conversion toolkit:** RKLLM Toolkit 1.3.0.
20
+ - **Inputs / output:** text → text.
21
+ - **License:** `apache-2.0`; the [upstream model card](https://huggingface.co/Qwen/Qwen2-0.5B-Instruct) describes its terms and intended use.
22
 
23
+ ## Choose your files
24
 
25
+ Use the files for your board’s exact SoC. `w4a16` uses 4-bit weights and 16-bit activations; `w4a16_g128` adds a weight group size of 128. `w8a8` uses 8-bit weights and activations. File size below is download size, not total runtime RAM.
 
 
26
 
27
+ | Board | Quantization | Size | Language model |
28
+ | --- | --- | --- | --- |
29
+ | RK3576 | `w4a16_g128` | 0.64 GiB | [Qwen2-0.5B-Instruct_RK3576_w4a16_g128.rkllm](RK3576/Qwen2-0.5B-Instruct_RK3576_w4a16_g128.rkllm) |
30
+ | RK3576 | `w8a8` | 0.76 GiB | [Qwen2-0.5B-Instruct_RK3576_w8a8.rkllm](RK3576/Qwen2-0.5B-Instruct_RK3576_w8a8.rkllm) |
31
+ | RK3588 | `w8a8` | 0.75 GiB | [Qwen2-0.5B-Instruct_RK3588_w8a8.rkllm](RK3588/Qwen2-0.5B-Instruct_RK3588_w8a8.rkllm) |
32
 
33
+ ## Run on your board
34
 
35
+ With Docker installed on a matching Rockchip board, this example starts the **RK3576 w4a16_g128** model and its API on port 8001:
36
 
37
+ ```bash
38
+ sudo docker run --rm -d --name rkllm \
39
+ --privileged -v /dev:/dev -p 8001:8001 \
40
+ ghcr.io/hanzo-huang/rkllm-docker/llm/qwen2-0.5b-instruct:rk3576-w4a16-g128
41
+ ```
42
 
43
+ The image includes its model file. See [rkllm-docker](https://github.com/Hanzo-Huang/rkllm-docker#readme) for API requests, other board variants, and configuration.
44
 
45
+ To download the files separately instead:
46
 
47
  ```bash
48
  hf download HanzoHuang/Qwen2-0.5B-Instruct-RKLLM \
49
  RK3576/Qwen2-0.5B-Instruct_RK3576_w4a16_g128.rkllm \
50
+ --local-dir ./models
51
  ```
52
 
53
+ These are native RKLLM/RKNN artifacts. Use a compatible RKLLM runtime and the model’s correct chat template when integrating them in another application.
54
 
55
+ ## Release notes
56
+
57
+ No per-variant board benchmark is published here. Quantized output may differ from the original model; check responses on your own workloads. Use the toolkit version listed above when checking runtime compatibility.
58
+
59
+ <details>
60
+ <summary>SHA-256 checksums</summary>
61
+
62
+ ```text
63
+ a166cdcff5d8a2e33423d01d8bac6f7a6ad1e1130fbd0bfefdb8b69082113e87 RK3576/Qwen2-0.5B-Instruct_RK3576_w4a16_g128.rkllm
64
+ cdccb51e23131352823af8becf9ac4acb15cb30f0f961e89d16cb0fabd003414 RK3576/Qwen2-0.5B-Instruct_RK3576_w8a8.rkllm
65
+ 24e99eeea1512d6e7f3f120f3344a510933301dfcb72bd64b24a9724ab48e1d8 RK3588/Qwen2-0.5B-Instruct_RK3588_w8a8.rkllm
66
+ ```
67
 
68
+ </details>
69
 
70
+ ## Credits
71
 
72
+ Original model: [Qwen/Qwen2-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2-0.5B-Instruct). Conversion tools: [Rockchip RKLLM](https://github.com/airockchip/rknn-llm).