News

Researchers report faster llama.cpp inference on Rockchip with shape-aware scheduling

On one Orange Pi 5 Pro, the authors measured average throughput gains of 32.9% for prompt processing and 20.2% for token generation over first-come, first-served offloading.

D
Dec 4, 2026 · 2 min read

Hanzhang Ma, Qianjun Zheng and colleagues at Paderborn University, the Technical University of Munich and Huawei’s Hilbert Research Center report faster llama.cpp inference on a Rockchip-based board by using matrix dimensions to decide which calculations to send to the accelerator. They reported the results in arXiv 2612.05714v1, the author manuscript of a paper accepted at the Design, Automation and Test in Europe Conference (DATE) 2027.

In tests on one Orange Pi 5 Pro, the authors report that their knapsack scheduler raised average throughput by 32.9% for prompt processing and 20.2% for token generation over first-come, first-served offloading. They weighted all 18 model and quantization pairs equally, covering nine models in two numerical formats, F16 and Q8_0. Against CPU-only execution on four Cortex-A76 cores, the authors report average gains of 253.8% for prompt processing and 12.6% for token generation.

Independent replication of the benchmark remains unconfirmed. The two offloading methods used the same Rockchip backend and the same 3,950 MiB memory cap for the neural processing unit (NPU), so the comparison tested the choice of what to offload. First-come, first-served sent matrix multiplications to the NPU in computation order until it reached the cap.

The team timed 154 distinct supported matrix shapes on the CPU and under six NPU configurations, reusing timings for calculations with matching dimensions. For prompt processing and token generation separately, the team kept the fastest NPU setting for shapes that ran faster there than on the CPU.

The scheduler used those timings to estimate the time each operation would save on the NPU and looked for the set that would save the most time within the memory cap. Each selected operation needed space for its own weights, while selected operations of the same shape shared one buffer for intermediate values.

The knapsack method reserved buffer space for each candidate shape first, then used the remaining budget for weights. The other operations stayed on the CPU.

Both headline throughput tests used a 100-token prompt. The authors computed the placement plans in advance and excluded model loading and warm-up from the reported throughput. The manuscript points to an anonymous repository for the custom backend.

In a separate measurement that also excluded model loading, the authors reported 8.6 seconds of warm-up with accelerator offloading for the 4-billion-parameter Gemma 3 model in F16, compared with 0.7 seconds on the CPU.

More news