Run this model with HF Jobs
Run HanzoHuang/gemma-4-E2B-it-RKLLM on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/HanzoHuang/gemma-4-E2B-it-RKLLM. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/HanzoHuang/gemma-4-E2B-it-RKLLM on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/HanzoHuang/gemma-4-E2B-it-RKLLM. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/HanzoHuang/gemma-4-E2B-it-RKLLM. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use HanzoHuang/gemma-4-E2B-it-RKLLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- RKLLM
How to use HanzoHuang/gemma-4-E2B-it-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
English | 简体中文
🚀 Deploy with reComputer AI Lab
Explore and deploy AI models on Rockchip RK3576 and RK3588 devices with reComputer AI Lab.
⚡ Run with one command
With Docker installed, choose your model and board in reComputer AI Lab, copy the deployment command, and run it in your device’s terminal.
Explore Models & Deployment Guides →
Gemma-4-E2B-it · RKLLM
- Max context length: 8192 (
v1.3.1-8k/). Earlierv1.3.1/andv1.3.0/releases use 4096.
Text generation, image questions, and short audio transcription on Rockchip RK3576 and RK3588, converted from google/gemma-4-E2B-it.
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.
- Conversion: RKLLM Toolkit 1.3.1; vision/audio encoders built with RKNN Toolkit2 2.3.2.
- Inputs / output: text, one image, or short PCM16 WAV audio → text. Audio generation and video input are not implemented in this serving release.
- Context: the 8K release exports 8192 tokens, with API checks at runtime limits 4096 and 8192 and benchmarks at 2048. The older 4K release was exported at 4096 and checked at 2048.
- License: Apache 2.0; see the original model for terms and intended use.
Choose your files
8192-token release
The 8K language models are under v1.3.1-8k/. These files were exported with RKLLM Toolkit 1.3.1. The RK3576 vision and audio encoders are byte-identical to the earlier v1.3.1/ files and retain their measured accuracy limits.
| Board | Quantization | Language size | Language model |
|---|---|---|---|
| RK3576 | w4a16_g128 |
7.72 GiB | Language model |
| RK3576 | w8a8 |
8.43 GiB | Language model |
Both RK3576 variants use the matching vision encoder and audio encoder. Vision uses 480 × 480 images and 100 image tokens. Audio uses one NPU core. Use --embed_flash 1.
8K validation, 2026-11-29: RKLLM runtime 1.3.1 and RKNN runtime 2.5.0 on RK3576. The columns below report strict smoke checks at the stated runtime context. They include output-content checks alongside HTTP status checks.
| Variant | Runtime 4096 | Runtime 8192 | Observed limits |
|---|---|---|---|
RK3576 w4a16_g128 |
9/14 | 9/14 | Greeting speech omitted ‘world’; space-scene descriptions missed the check’s ‘astronaut’ keyword. |
RK3576 w8a8 |
13/14 | 13/14 | Exact recall returned ORCHI D instead of ORCHID. |
RK3576 w4a16_g128 processed 8,033 native prefill tokens and returned PINEAPPLE for the recall target PINEAPPLE; this single recall check passed.
RK3576 w8a8 processed 8,033 native prefill tokens and returned PINEPAPLE for the recall target PINEAPPLE; this exact-recall check failed.
Long-context token counts come from native runtime logs. HTTP API usage counts are estimates. The long-context check uses one synthetic recall prompt. The shared RK3576 vision encoder retains the earlier cosine result 0.97914620, below the 0.99 target. The audio encoder's earlier result is 0.99222647. Those measurements were obtained for the identical encoder files in the October release.
The following accepted benchmarks use runtime context 2048, embed_flash=1, and both encoders loaded. Generation speed is the median of three native decode measurements after warm-up. RAM is additional board use above the idle baseline, in decimal GB. Attempts with swap growth above 10 MB were excluded. All four W4 benchmark attempts were swap-affected, so no W4 speed or RAM result is accepted.
| Variant | Generation tok/s | Startup RAM GB | Stable RAM GB |
|---|---|---|---|
RK3576 w4a16_g128 |
No accepted measurement | — | — |
RK3576 w8a8 |
4.50 | 5.83 | 5.84 |
Source checkpoint acquisition used ModelScope google/gemma-4-E2B-it, revision 8d46078a6a7635da2771a051ca04d8df6d390454. W4A16-g128 calibration used 20 SDK image-and-text examples. W8A8 calibration added the SDK's 21 text-only prompts. Acceptance questions and audio clips were excluded from calibration. W8A8 requested hybrid rate 0.50. The toolkit reports that hybrid quantization is unsupported for this model. The retained encoders were built with RKNN Toolkit2 2.3.2.
8K deployable-file checksums are in SHA256SUMS.
RK3588 W8A8
Language model · Vision encoder · Audio encoder
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.
4096-token multimodal release
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.
| Board | Quantization | Language size | Language model |
|---|---|---|---|
| RK3576 | w4a16_g128 |
6.65 GiB | Language |
| RK3576 | w8a8 |
7.37 GiB | Language |
| RK3588 | w8a8 |
7.36 GiB | Language |
| Board | Vision encoder (480 × 480, 100 tokens) | Audio encoder |
|---|---|---|
| RK3576 | Vision · 1.09 GiB | Audio · 0.58 GiB |
| RK3588 | Vision · 0.46 GiB | Audio · 0.57 GiB |
w4a16_g128 uses 4-bit weights, 16-bit activations and group size 128. w8a8 uses 8-bit weights and activations; these W8A8 exports use hybrid rate 0.50. Download sizes are not runtime RAM requirements. Use embedding reads from storage (--embed_flash 1) on the 8GB RK3576, as in the tested command below.
Previous text-only release
The original RKLLM 1.3.0 artifacts are archived under v1.3.0/:
Their contents and checksums are unchanged; the old unversioned paths have moved. They accept text only; adding an encoder does not upgrade those language artifacts. Existing /llm/gemma-4-e2b-it Docker images contain the text-only release, and its build definitions now use the versioned paths. Use the complete v1.3.1/ set for image/audio input.
Run on your board
This RK3576 W4A16 example uses the ARM64 env-latest image and the 8K release. Serving checks used RKLLM 1.3.1 and RKNN 2.5.0. Download the three files first:
hf download HanzoHuang/gemma-4-E2B-it-RKLLM \
v1.3.1-8k/RK3576/gemma-4-E2B-it_RK3576_w4a16_g128.rkllm \
v1.3.1-8k/RK3576/gemma-4-E2B-it_vision_RK3576.rknn \
v1.3.1-8k/RK3576/gemma-4-E2B-it_audio_RK3576.rknn \
--local-dir ./models
sudo docker run --pull=always --rm --name gemma4 --privileged -p 8001:8001 \
-v "$PWD/models/v1.3.1-8k/RK3576:/app/models:ro" \
-e MODEL_KIND=vlm -e TARGET_PLATFORM=rk3576 -e VLM_MODEL_FAMILY=gemma4 \
-e MODEL_FILE=gemma-4-E2B-it_RK3576_w4a16_g128.rkllm \
-e VISION_MODEL_FILE=gemma-4-E2B-it_vision_RK3576.rknn \
-e AUDIO_MODEL_FILE=gemma-4-E2B-it_audio_RK3576.rknn \
ghcr.io/hanzo-huang/rkllm-docker:env-latest \
serve --embed_flash 1 --max_context_len 4096 --timeout 600
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.
Runtime integration: rkllm-docker Gemma support and model definitions.
Release notes
October 4096-token release
Measured on the matching RK3576 and RK3588 devkits with RKLLM runtime 1.3.1 and RKNN runtime 2.3.2:
| Variant | Functional checks | Encoder accuracy against original float32 PyTorch |
|---|---|---|
| RK3576 W4A16_G128 | 14/14 passed | Vision cosine 0.97914620, below the 0.99 target; audio 0.99222647, passed |
| RK3576 W8A8 | 13/14 passed; exact recall returned ORCHI D instead of ORCHID |
Same vision/audio encoders and limits as above |
| RK3588 W8A8 | 14/14 passed | Vision cosine 0.99876202 and audio 0.99216218, passed |
Functional checks cover arithmetic, conversation recall, image questions, two short speech clips, streamed output, stereo resampling, invalid audio rejection, and transitions between text/image/audio. These are smoke tests, not a general quality or ASR benchmark. Encoder cosine results use one retained validation example per modality. All selected encoder outputs are finite; the RK3576 vision accuracy limitation remains unresolved. No generation-speed or RAM benchmark is claimed here.
The source weights were downloaded through ModelScope. Language calibration combines SDK image examples and general text prompts; it does not include the acceptance questions. The shared converter applies FP16-safe normalization and clipping and an RK3576 audio attention-layout correction through its existing single command. Rejected compiler/calibration experiments are excluded from this release.
4096-token deployable-file hashes: SHA256SUMS, with paths relative to v1.3.1/.
Previous text-only file checksums
973008fd7ebed81e2a26dcf7dcc1c28fde631837e3e021c7f3007d6e82647165 v1.3.0/RK3576/gemma-4-E2B-it_RK3576_w4a16_g128.rkllm
b7357c01fcd51c8f896f06ee3a3746bc233031abd04e2fa0cebb5908b1382a01 v1.3.0/RK3576/gemma-4-E2B-it_RK3576_w8a8.rkllm
ae81d1e37eb54b40d2d366ef622a0c05acfb15537272e982efc1dfdd60557979 v1.3.0/RK3588/gemma-4-E2B-it_RK3588_w8a8.rkllm
Credits
Original model: Google Gemma-4-E2B-it. Conversion tools: Rockchip RKLLM, RKNN Toolkit2, and the shared conversion command.
- Downloads last month
- 355
