HanzoHuang commited on
Commit
78eb5d1
·
verified ·
1 Parent(s): 2b93feb

Document and verify Gemma 8K RK3588 multimodal preview

Browse files
.gitattributes CHANGED
@@ -58,3 +58,5 @@ v1.3.1-8k/RK3576/gemma-4-E2B-it_RK3576_w4a16_g128.rkllm filter=lfs diff=lfs merg
58
  v1.3.1-8k/RK3576/gemma-4-E2B-it_vision_RK3576.rknn filter=lfs diff=lfs merge=lfs -text
59
  v1.3.1-8k/RK3576/gemma-4-E2B-it_audio_RK3576.rknn filter=lfs diff=lfs merge=lfs -text
60
  v1.3.1-8k/RK3588/gemma-4-E2B-it_RK3588_w8a8.rkllm filter=lfs diff=lfs merge=lfs -text
 
 
 
58
  v1.3.1-8k/RK3576/gemma-4-E2B-it_vision_RK3576.rknn filter=lfs diff=lfs merge=lfs -text
59
  v1.3.1-8k/RK3576/gemma-4-E2B-it_audio_RK3576.rknn filter=lfs diff=lfs merge=lfs -text
60
  v1.3.1-8k/RK3588/gemma-4-E2B-it_RK3588_w8a8.rkllm filter=lfs diff=lfs merge=lfs -text
61
+ v1.3.1-8k/RK3588/gemma-4-E2B-it_vision_RK3588.rknn filter=lfs diff=lfs merge=lfs -text
62
+ v1.3.1-8k/RK3588/gemma-4-E2B-it_audio_RK3588.rknn filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -36,7 +36,7 @@ With Docker installed, choose your model and board in reComputer AI Lab, copy th
36
 
37
  Text generation, image questions, and short audio transcription on Rockchip RK3576 and RK3588, converted from [google/gemma-4-E2B-it](https://huggingface.co/google/gemma-4-E2B-it).
38
 
39
- **RK3576 preview:** the 8K W4 model passes 9/14 strict API checks and W8 passes 13/14. Observed limits include speech omissions, image descriptions missing the expected keyword, and W8 exact-recall errors. The shared vision encoder also misses the numerical accuracy target. The RK3588 results below describe the earlier 4096-token release.
40
 
41
  - **Conversion:** RKLLM Toolkit 1.3.1; vision/audio encoders built with RKNN Toolkit2 2.3.2.
42
  - **Inputs / output:** text, one image, or short PCM16 WAV audio → text. Audio generation and video input are not implemented in this serving release.
@@ -80,6 +80,12 @@ Source checkpoint acquisition used ModelScope `google/gemma-4-E2B-it`, revision
80
 
81
  8K deployable-file checksums are in [SHA256SUMS](v1.3.1-8k/SHA256SUMS).
82
 
 
 
 
 
 
 
83
  ### 4096-token multimodal release
84
 
85
  The 4096-token multimodal set is under **`v1.3.1/`**. Use the exact SoC for your board. Each variant needs its language file and vision encoder; add the audio encoder to enable speech input. The two RK3576 variants share the same encoders.
@@ -128,7 +134,7 @@ sudo docker run --pull=always --rm --name gemma4 --privileged -p 8001:8001 \
128
  serve --embed_flash 1 --max_context_len 4096 --timeout 600
129
  ```
130
 
131
- RK3588 currently uses its earlier `v1.3.1/` files with `TARGET_PLATFORM=rk3588`. The API is OpenAI compatible at `/v1/chat/completions`; use `image_url` for an image or `input_audio` with base64 `data` and `format: "wav"` for speech. Supported audio is PCM16 WAV, mono/stereo, 8–48 kHz, longer than 10 ms and no more than 7.56 seconds. Split longer recordings before sending them. The audio encoder runs on one NPU core.
132
 
133
  Runtime integration: [rkllm-docker Gemma support and model definitions](https://github.com/Hanzo-Huang/rkllm-docker/pull/13).
134
 
 
36
 
37
  Text generation, image questions, and short audio transcription on Rockchip RK3576 and RK3588, converted from [google/gemma-4-E2B-it](https://huggingface.co/google/gemma-4-E2B-it).
38
 
39
+ **RK3576 preview:** the 8K W4 model passes 9/14 strict API checks and W8 passes 13/14. Observed limits include speech omissions, image descriptions missing the expected keyword, and W8 exact-recall errors. The shared vision encoder also misses the numerical accuracy target. RK3588 8K results and historical 4K results are listed below.
40
 
41
  - **Conversion:** RKLLM Toolkit 1.3.1; vision/audio encoders built with RKNN Toolkit2 2.3.2.
42
  - **Inputs / output:** text, one image, or short PCM16 WAV audio → text. Audio generation and video input are not implemented in this serving release.
 
80
 
81
  8K deployable-file checksums are in [SHA256SUMS](v1.3.1-8k/SHA256SUMS).
82
 
83
+ #### RK3588 W8A8
84
+
85
+ [Language model](v1.3.1-8k/RK3588/gemma-4-E2B-it_RK3588_w8a8.rkllm) · [Vision encoder](v1.3.1-8k/RK3588/gemma-4-E2B-it_vision_RK3588.rknn) · [Audio encoder](v1.3.1-8k/RK3588/gemma-4-E2B-it_audio_RK3588.rknn)
86
+
87
+ RK3588 W8A8 was exported at context 8192. With Python 3.11, RKLLM runtime 1.3.1, and RKNN runtime 2.5.0, this preview passed 13/14 API checks at both runtime contexts 4096 and 8192. The short exact recall returned ORCHIID (expected ORCHID). After 8,033 native prefill tokens, the long exact recall returned PINEA (expected PINEAPPLE). The build uses 20 image-and-text calibration examples with hybrid quantization disabled. The vision and audio encoders are reused from the earlier release.
88
+
89
  ### 4096-token multimodal release
90
 
91
  The 4096-token multimodal set is under **`v1.3.1/`**. Use the exact SoC for your board. Each variant needs its language file and vision encoder; add the audio encoder to enable speech input. The two RK3576 variants share the same encoders.
 
134
  serve --embed_flash 1 --max_context_len 4096 --timeout 600
135
  ```
136
 
137
+ For RK3588, use the matching files in `v1.3.1-8k/RK3588/` with `TARGET_PLATFORM=rk3588`. The API is OpenAI compatible at `/v1/chat/completions`; use `image_url` for an image or `input_audio` with base64 `data` and `format: "wav"` for speech. Supported audio is PCM16 WAV, mono/stereo, 8–48 kHz, longer than 10 ms and no more than 7.56 seconds. Split longer recordings before sending them. The audio encoder runs on one NPU core.
138
 
139
  Runtime integration: [rkllm-docker Gemma support and model definitions](https://github.com/Hanzo-Huang/rkllm-docker/pull/13).
140
 
README_zh-CN.md CHANGED
@@ -36,7 +36,7 @@ tags:
36
 
37
  在 Rockchip RK3576 和 RK3588 上进行文本生成、图像问答和短音频转写,转换自 [google/gemma-4-E2B-it](https://huggingface.co/google/gemma-4-E2B-it)。
38
 
39
- **RK3576 预览版:** 8K W4 通过 9/14 项严格 API 检查,W8 通过 13/14 项。限制包括语音转录漏词、图像描述未包含预期关键词,以及 W8 精确记忆错误。共用视觉编码器也未达到数值精度目标。下方 RK3588 结果对应较早的 4096-token 版本。
40
 
41
  - **转换工具:** RKLLM Toolkit 1.3.1;视觉和音频编码器使用 RKNN Toolkit2 2.3.2 构建。
42
  - **输入 / 输出:** 文本、单张图像或短 PCM16 WAV 音频 → 文本。此服务版本未实现音频生成和视频输入。
@@ -80,6 +80,12 @@ RK3576 `w8a8` 在原生运行时处理了 8,033 个预填充 token,记忆提
80
 
81
  8K 可部署文件校验和位于 [SHA256SUMS](v1.3.1-8k/SHA256SUMS)。
82
 
 
 
 
 
 
 
83
  ### 4096-token 多模态版本
84
 
85
  4096-token 配套多模态文件位于 **`v1.3.1/`** 目录。请选择与开发板 SoC 完全匹配的文件。每个版本都需要语言模型和视觉编码器;如需语音输入,还需添加音频编码器。两个 RK3576 版本共用相同的编码器。
@@ -128,7 +134,7 @@ sudo docker run --pull=always --rm --name gemma4 --privileged -p 8001:8001 \
128
  serve --embed_flash 1 --max_context_len 4096 --timeout 600
129
  ```
130
 
131
- RK3588 当前使用较早的 `v1.3.1/` 文件,并设置 `TARGET_PLATFORM=rk3588`。API 在 `/v1/chat/completions` 提供兼容 OpenAI 的接口;图像使用 `image_url`,语音使用 `input_audio`,并提供 base64 编码的 `data` 和 `format: "wav"`。支持的音频为 PCM16 WAV、单声道或立体声、8–48 kHz,时长须大于 10 ms 且不超过 7.56 秒。较长录音请分段发送。音频编码器在单个 NPU 核心上运行。
132
 
133
  运行时集成:[rkllm-docker Gemma 支持与模型定义](https://github.com/Hanzo-Huang/rkllm-docker/pull/13)。
134
 
 
36
 
37
  在 Rockchip RK3576 和 RK3588 上进行文本生成、图像问答和短音频转写,转换自 [google/gemma-4-E2B-it](https://huggingface.co/google/gemma-4-E2B-it)。
38
 
39
+ **RK3576 预览版:** 8K W4 通过 9/14 项严格 API 检查,W8 通过 13/14 项。限制包括语音转录漏词、图像描述未包含预期关键词,以及 W8 精确记忆错误。共用视觉编码器也未达到数值精度目标。下方同时记录 RK3588 的 8K 验证和旧版 4K 结果。
40
 
41
  - **转换工具:** RKLLM Toolkit 1.3.1;视觉和音频编码器使用 RKNN Toolkit2 2.3.2 构建。
42
  - **输入 / 输出:** 文本、单张图像或短 PCM16 WAV 音频 → 文本。此服务版本未实现音频生成和视频输入。
 
80
 
81
  8K 可部署文件校验和位于 [SHA256SUMS](v1.3.1-8k/SHA256SUMS)。
82
 
83
+ #### RK3588 W8A8
84
+
85
+ [语言模型](v1.3.1-8k/RK3588/gemma-4-E2B-it_RK3588_w8a8.rkllm) · [视觉编码器](v1.3.1-8k/RK3588/gemma-4-E2B-it_vision_RK3588.rknn) · [音频编码器](v1.3.1-8k/RK3588/gemma-4-E2B-it_audio_RK3588.rknn)
86
+
87
+ RK3588 W8A8 导出上下文为 8192。使用 Python 3.11、RKLLM Runtime 1.3.1 和 RKNN Runtime 2.5.0,在运行时上下文 4096 和 8192 下各通过 13/14 项 API 检查。短提示精确记忆返回 ORCHIID(预期 ORCHID);处理 8,033 个原生预填充 token 后返回 PINEA(预期 PINEAPPLE)。这是预览版,使用 20 个图文校准样本,禁用混合量化。视觉和音频编码器复用旧版文件。
88
+
89
  ### 4096-token 多模态版本
90
 
91
  4096-token 配套多模态文件位于 **`v1.3.1/`** 目录。请选择与开发板 SoC 完全匹配的文件。每个版本都需要语言模型和视觉编码器;如需语音输入,还需添加音频编码器。两个 RK3576 版本共用相同的编码器。
 
134
  serve --embed_flash 1 --max_context_len 4096 --timeout 600
135
  ```
136
 
137
+ RK3588 使用 `v1.3.1-8k/RK3588/` 中的配套文件,并设置 `TARGET_PLATFORM=rk3588`。API 在 `/v1/chat/completions` 提供兼容 OpenAI 的接口;图像使用 `image_url`,语音使用 `input_audio`,并提供 base64 编码的 `data` 和 `format: "wav"`。支持的音频为 PCM16 WAV、单声道或立体声、8–48 kHz,时长须大于 10 ms 且不超过 7.56 秒。较长录音请分段发送。音频编码器在单个 NPU 核心上运行。
138
 
139
  运行时集成:[rkllm-docker Gemma 支持与模型定义](https://github.com/Hanzo-Huang/rkllm-docker/pull/13)。
140
 
v1.3.1-8k/RK3588/gemma-4-E2B-it_audio_RK3588.rknn ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:53059d2b49e419e0f37883817e1aaad13d309d2f39e0632e8a2657d1a6917306
3
+ size 615850353
v1.3.1-8k/RK3588/gemma-4-E2B-it_vision_RK3588.rknn ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:54ce96fd08d6cf9b39ee80d82ed39f0e173ddc68a61c05755415d98ccc2cd980
3
+ size 498656510
v1.3.1-8k/SHA256SUMS CHANGED
@@ -2,3 +2,6 @@ f812e3b06d1cbd1c3a4f5032bb278cbb5ee12b38ff66514b5a4f7e995fb27a28 RK3576/gemma-4
2
  48470ef3442fb76b11aa630b519b51e991182fc68afd0c512f0e4148f6375f4b RK3576/gemma-4-E2B-it_RK3576_w8a8.rkllm
3
  2c7760b0e0e9f8188de5a9ab6b8ff4f99412e69fb014cbf66a43c3b646740f17 RK3576/gemma-4-E2B-it_vision_RK3576.rknn
4
  6072391b5700423a7e6958b20895a86f1f9325c386cd1df680124856e02ef377 RK3576/gemma-4-E2B-it_audio_RK3576.rknn
 
 
 
 
2
  48470ef3442fb76b11aa630b519b51e991182fc68afd0c512f0e4148f6375f4b RK3576/gemma-4-E2B-it_RK3576_w8a8.rkllm
3
  2c7760b0e0e9f8188de5a9ab6b8ff4f99412e69fb014cbf66a43c3b646740f17 RK3576/gemma-4-E2B-it_vision_RK3576.rknn
4
  6072391b5700423a7e6958b20895a86f1f9325c386cd1df680124856e02ef377 RK3576/gemma-4-E2B-it_audio_RK3576.rknn
5
+ a0881e8ef9f84e9da01d9de81756b4a6d745cbfa1c3d2499d6fb3fb3c122b9b1 RK3588/gemma-4-E2B-it_RK3588_w8a8.rkllm
6
+ 54ce96fd08d6cf9b39ee80d82ed39f0e173ddc68a61c05755415d98ccc2cd980 RK3588/gemma-4-E2B-it_vision_RK3588.rknn
7
+ 53059d2b49e419e0f37883817e1aaad13d309d2f39e0632e8a2657d1a6917306 RK3588/gemma-4-E2B-it_audio_RK3588.rknn