Granite 4.2 8B β€” RKLLM w8a8 for the RK3588 NPU (16k context)

ibm-granite/granite-4.2-8b converted to Rockchip RKLLM for the RK3588 / RK3588S NPU.

File granite-4.2-8b-16k_RK3588_w8a8.rkllm (9,293,083,044 bytes)
SHA-256 9cce637bf176323a7a759acd69168cbf966a2c4c11c4e7ed8c6348583ded2a64
Toolkit / runtime rkllm-toolkit 1.3.1, needs librkllmrt.so 1.3.1
Quantization w8a8, algorithm normal, optimization level 1, hybrid rate 0, toolkit default calibration data
Max context 16384
NPU cores 3

What was changed

Granite is not on Rockchip's supported list. It differs from a plain Llama model by scalar multipliers; in the 8B only attention_multiplier (1/128) is not 1. That multiplier was folded into the q_proj weights and the checkpoint relabelled as LlamaForCausalLM, using fold_granite.py from oliver0804/Granite-4.2-3B-RK3588-rkllm-w8a8 with one change: the rescaled q_proj weights are kept in float32, because the 8B's scale factor (0.0884) is not a power of two and rounding back to bf16 loses precision.

Folded model against the original in transformers, before quantization: max logit difference 0.00003, argmax agreement 100%. The script is in conversion/.

Measured on an Orange Pi 5 (RK3588, 16 GB)

Context Memory Prefill Generate Load time
8192 9,976 MB about 58 tok/s 2.9 tok/s, falling to 1.6 tok/s as the context fills about 30 s
16384 does not fit with about 11.5 GB free (process is OOM-killed)

The file is built with a 16k limit; the runtime can load it with a smaller max_context_len. On a 16 GB board use 8192.

model_config.json is the per-model settings file for RKLLM-API-Server: put it next to the .rkllm file. It sets the 8192 context for a 16 GB board, thinking off and the sampling values below; other runtimes ignore it.

Usage notes

  • Chat template: ChatML, embedded in the file. With thinking enabled the template ends the prompt with <think>, so the output starts inside the reasoning and contains only the closing </think>.
  • Tool calls: the model writes <tool_call><function=name><parameter=arg>value</parameter></function></tool_call>. Give it the tool instructions from its own chat template; asked for JSON-style calls it mixes the two formats.
  • Sampling: IBM recommends temperature 1.0, top_p 0.95. Tested here at temperature 0.9, top_p 0.95, top_k 40, repeat penalty 1.1.
  • Thinking: works, but at 2 to 3 tok/s each step takes minutes. Tested mostly with thinking off.

Tested with RKLLM-API-Server as a shell-tool agent: single and multi-step tool calls work.

Limitations

  • Only tested on one board, in English, on system-administration prompts. No benchmark was run on the quantized model.
  • Output occasionally continues past the end of a turn with a stray fragment.

License

Apache-2.0, inherited from the base model. The weights are modified (multiplier folding, 8-bit quantization); this is a derivative work of ibm-granite/granite-4.2-8b.

Downloads last month
7
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for martivo/Granite-4.2-8B-RK3588-rkllm-w8a8

Quantized
(70)
this model