HanzoHuang commited on
Commit
70e7fd3
·
verified ·
1 Parent(s): 6a147ed

Make RKLLM model card easier to use

Browse files
Files changed (1) hide show
  1. README.md +39 -29
README.md CHANGED
@@ -12,53 +12,63 @@ tags:
12
  - gemma-3
13
  ---
14
 
15
- # gemma-3-4b-it-RKLLM
16
 
17
- RKLLM-converted Gemma 3 4B IT language-model artifacts for Rockchip RK3576 and RK3588 NPUs.
18
 
19
- Important: the upstream [google/gemma-3-4b-it](https://huggingface.co/google/gemma-3-4b-it) model is multimodal/VLM-capable, but this repository contains only RKLLM language-model binaries. The converted model exposed here is LLM-only: it does not accept images and does not include an RKNN vision encoder.
20
 
21
- 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.
 
 
22
 
23
- ## Base model
24
 
25
- - Upstream model: [google/gemma-3-4b-it](https://huggingface.co/google/gemma-3-4b-it)
26
- - License: Gemma Terms of Use
27
- - Upstream type: VLM/multimodal
28
- - RKLLM type: LLM-only
29
 
30
- Review Google's Gemma terms before use or redistribution.
31
-
32
- ## Conversion and variants
33
-
34
- ### Toolkit version
35
 
36
- **RKLLM Toolkit: v1.2.3**
37
 
38
- Use a file built for the exact target SoC.
39
 
40
- | Target | Quantization | File | SHA256 |
41
- | --- | --- | --- | --- |
42
- | RK3576 | W4A16 | [gemma-3-4b-it_RK3576_w4a16.rkllm](RK3576/gemma-3-4b-it_RK3576_w4a16.rkllm) | `0e6d6298453f483e832a7982bcdf1acdf895a47c6777e93eb3c1e43e82cf8fc2` |
43
- | RK3576 | W8A8 | [gemma-3-4b-it_RK3576_w8a8.rkllm](RK3576/gemma-3-4b-it_RK3576_w8a8.rkllm) | `b077e9ee75f837230dbf1be948a03d39942abd90ab23343399fa13b7d19526cf` |
44
- | RK3588 | W8A8 | [gemma-3-4b-it_RK3588_w8a8.rkllm](RK3588/gemma-3-4b-it_RK3588_w8a8.rkllm) | `aa04fce6ca2e418cd946814f1563fe8ed7e56dfbf5cf99ced4e753739287ee80` |
45
 
46
- The repository also includes `gemma-3-4b-it_data_quant.json`, used as calibration data during conversion.
47
 
48
- ## Usage
49
 
50
  ```bash
51
  hf download HanzoHuang/gemma-3-4b-it-RKLLM \
52
  RK3576/gemma-3-4b-it_RK3576_w4a16.rkllm \
53
- --local-dir gemma-3-4b-it-RKLLM
54
  ```
55
 
56
- Run the file with the RKLLM runtime and the upstream Gemma instruction prompt format. For Docker deployment, see [Hanzo-Huang/rkllm-docker](https://github.com/Hanzo-Huang/rkllm-docker).
 
 
 
 
57
 
58
- ## Limitations
 
 
 
 
 
 
 
59
 
60
- Vision input is not supported by these artifacts. Conversion can change output quality relative to the upstream model; validate the result on your target device.
61
 
62
- ## Acknowledgements
63
 
64
- Thanks to Google, Rockchip, and the RKLLM community.
 
12
  - gemma-3
13
  ---
14
 
15
+ # gemma-3-4b-it · RKLLM
16
 
17
+ Text generation on Rockchip RK3576 and RK3588, converted from [google/gemma-3-4b-it](https://huggingface.co/google/gemma-3-4b-it).
18
 
19
+ **The files currently published here are text-only.** The source model supports images, but this conversion does not include a vision encoder.
20
 
21
+ - **Conversion toolkit:** RKLLM Toolkit 1.2.3.
22
+ - **Inputs / output:** text → text.
23
+ - **License:** `gemma`; the [upstream model card](https://huggingface.co/google/gemma-3-4b-it) describes its terms and intended use.
24
 
25
+ ## Choose your files
26
 
27
+ 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.
 
 
 
28
 
29
+ | Board | Quantization | Size | Language model |
30
+ | --- | --- | --- | --- |
31
+ | RK3576 | `w4a16` | 3.42 GiB | [gemma-3-4b-it_RK3576_w4a16.rkllm](RK3576/gemma-3-4b-it_RK3576_w4a16.rkllm) |
32
+ | RK3576 | `w8a8` | 4.92 GiB | [gemma-3-4b-it_RK3576_w8a8.rkllm](RK3576/gemma-3-4b-it_RK3576_w8a8.rkllm) |
33
+ | RK3588 | `w8a8` | 4.90 GiB | [gemma-3-4b-it_RK3588_w8a8.rkllm](RK3588/gemma-3-4b-it_RK3588_w8a8.rkllm) |
34
 
35
+ ## Run on your board
36
 
37
+ With Docker installed on a matching Rockchip board, this example starts the **RK3576 w4a16** model and its API on port 8001:
38
 
39
+ ```bash
40
+ sudo docker run --rm -d --name rkllm \
41
+ --privileged -v /dev:/dev -p 8001:8001 \
42
+ ghcr.io/hanzo-huang/rkllm-docker/llm/gemma-3-4b-it:rk3576-w4a16
43
+ ```
44
 
45
+ 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.
46
 
47
+ To download the files separately instead:
48
 
49
  ```bash
50
  hf download HanzoHuang/gemma-3-4b-it-RKLLM \
51
  RK3576/gemma-3-4b-it_RK3576_w4a16.rkllm \
52
+ --local-dir ./models
53
  ```
54
 
55
+ These are native RKLLM/RKNN artifacts. Use a compatible RKLLM runtime and the model’s correct chat template when integrating them in another application.
56
+
57
+ ## Release notes
58
+
59
+ 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.
60
 
61
+ <details>
62
+ <summary>SHA-256 checksums</summary>
63
+
64
+ ```text
65
+ 0e6d6298453f483e832a7982bcdf1acdf895a47c6777e93eb3c1e43e82cf8fc2 RK3576/gemma-3-4b-it_RK3576_w4a16.rkllm
66
+ b077e9ee75f837230dbf1be948a03d39942abd90ab23343399fa13b7d19526cf RK3576/gemma-3-4b-it_RK3576_w8a8.rkllm
67
+ aa04fce6ca2e418cd946814f1563fe8ed7e56dfbf5cf99ced4e753739287ee80 RK3588/gemma-3-4b-it_RK3588_w8a8.rkllm
68
+ ```
69
 
70
+ </details>
71
 
72
+ ## Credits
73
 
74
+ Original model: [google/gemma-3-4b-it](https://huggingface.co/google/gemma-3-4b-it). Conversion tools: [Rockchip RKLLM](https://github.com/airockchip/rknn-llm).