Model or dataset
NotPunchnox/rkllama avatar
NotPunchnox/rkllama

rkllama: an Ollama-style LLM server that runs on the Rockchip NPU

Ollama alternative for Rockchip NPU: An efficient solution for running AI and Deep learning models on Rockchip devices with optimized NPU support ( rkllm )

617 stars103 forksPythonGPL-3.0

At a glance

What is it?
rkllama serves language models on Rockchip RK3588 and RK3576 boards using the on-board NPU instead of the CPU, with Ollama and partial OpenAI API compatibility, a Docker image, multimodal and speech models. Its ceiling is the hardware, and its licence is GPL-3.0.
Who is it for?
rkllama is the practical choice for putting a local model on an Orange Pi 5 or Radxa Rock 4d and serving it over the Ollama or OpenAI shapes of API, especially when the NPU has to do the inference. It is not a substitute for a datacentre GPU and it does not help on hardware without an RKLLM path.
Can I use it commercially?
Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 59 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What rkllama is and what the NPU buys you

rkllama is a server and client for running and interacting with large language models on Rockchip platforms, with the RK3588, RK3588S and RK3576 as the targets. Its pitch is stated in the README as the difference from software of the same kind such as Ollama or llama.cpp: rkllama allows the models to run on the NPU. On a board with a 6 TOPS NPU, that is the whole argument, since the alternative is a CPU inference loop on a Cortex-A76 cluster that is far slower for transformer workloads.

The project pins its native runtime versions: rkllm-runtime 1.3.0 and rknn-runtime 2.3.2. The C++ rkllm and rknn libraries live in the lib directory and are used for inference and for fixing the platform frequency, and the server entry point is app.py, a Flask REST API, with client.py as the companion client. The models directory holds your rkllm models, and for multimodal models the matching rknn models as well.

This is a single-board-computer project in practice. The README lists the tested hardware as the Orange Pi 5 Pro, Orange Pi 5 Plus and Orange Pi 5 Max, each with an RK3588S and a 6 TOPS NPU with 16GB of RAM, and the Radxa Rock 4d with an RK3576 and a 6 TOPS NPU. The tested operating systems are Ubuntu 24.04 arm64 and Armbian Linux 6.1.99-vendor-rk35xx, based on Debian stable bookworm, version 25.2.2. Supported Python versions are 3.9 through 3.12. Version 0.0.76 is the current release, and the numbering tells you that this is still a project in active churn rather than a stable platform.

The API surface: Ollama endpoints, partial OpenAI endpoints and tool calls

The compatibility story is the feature that lets existing clients work unchanged. The Ollama-compatible side covers the endpoints a local-model client actually uses.

Those are chat, generate, ps, tags, embed with the legacy embeddings route, version and pull. Covering ps and tags means a client can ask which models are resident and which are available, and covering pull means a model can be fetched from HuggingFace without leaving the API conversation. The project also ships a dedicated compatibility guide for the Ollama API and a naming convention document, which matters because rkllama lets you refer to models with familiar names such as qwen2.5:3b.

The OpenAI-compatible side is explicitly partial, and the README is upfront about which parts work. Completions, chat completions and embeddings are covered, and so are images generations, audio speech, audio transcriptions and audio translations, the last one English only for now, the way OpenAI handles it with Whisper models. Image generation runs LCM Stable Diffusion 1.5 RKNN models through the OpenAI images endpoint, text to speech uses Piper TTS with an ONNX encoder and an RKNN decoder or MMS-TTS with RKNN, and transcription uses omniASR-CTC or Whisper running as RKNN models.

Tool and function calling is described as complete, with support for tool calls across multiple LLM formats including Qwen and Llama 3.2 and later, and there is a dedicated guide for it. The server also supports streaming and non-streaming modes, keeps message history, and lists the available models. Documentation is published in English and French, with separate files for the REST API, the Ollama compatibility, the naming convention and the tools guide.

Model residency: parallel models, automatic unloading and the prompt cache

Memory on a board with 16GB of RAM is the constraint that shapes the design, and rkllama's answer is a residency manager rather than a single loaded model. Multiple RKLLM and RKNN models can be resident at the same time, with parallel executions between distinct models in streaming mode and first-in first-out behaviour when the request is not streaming.

Models are loaded on demand. A request for a model that is not in memory triggers a load, and a model is unloaded after it expires through inactivity, with the default at 30 minutes. When a new model has to be loaded and there is not enough memory, the oldest model in memory is unloaded first. Automatic detection of the platform, RK3588 or RK3576, is included, along with a simplified custom model naming scheme and an optional debug mode behind a --debug flag.

The prompt cache is the feature that matters most for agent workloads. The server automatically saves a prompt cache file for each chat session of the same model, so a long context session can be resumed quickly when you switch back to it, which the README describes as useful with large-context chat sessions and with agents or tools such as OpenWebUI that use the same model. It also allows a previous session to be restored for fast inference even after the model was unloaded from memory. The cache files are kept for 7 days by default, the value is configurable, and they are deleted automatically if unused.

Beyond text: multimodal models and the fork-based GGUF path

The multimodal story covers the vision-language models in the QwenVL family, Qwen2VL, Qwen2.5VL and Qwen3VL, plus MiniCPMV4, MiniCPMV4.5 and InternVL3.5, so that a request can ask questions about an image. Images can be supplied as base64, as a local file or as a URL, and more than one image is allowed in the same request.

The .GGUF path is where the project depends on other people's work, and it needs careful reading. GGUF models are supported on the NPU through a llama.cpp fork by the user @invisiofficial, at the repository rk-llama.cpp. The README notes that the Dockerfile currently uses a more updated version of that fork in order to get the last features of llama.cpp, such as MTP, and it points at other forks it considers interesting, including one by @Mojo24x7.

That arrangement is the main fragility in the whole project. A model format that many users already have is supported through a chain of community forks rather than through an upstream llama.cpp release, and the Dockerfile pins a fork rather than a release. When the fork moves, the compatibility surface moves with it.

Installing rkllama from source or as a Docker image

The recommended path is a standard clone followed by a pip install, inside a virtual environment such as conda, uv or venv.

bash
git clone https://github.com/notpunchnox/rkllama
cd rkllama
bash
python -m pip install .

The Docker route avoids the local Python and runtime setup. The image is published on GitHub Container Registry and the run command mounts a local models directory into the container and maps the port.

bash
docker run -it --privileged -p 8080:8080 -v <local_models_dir>:/opt/rkllama/models ghcr.io/notpunchnox/rkllama:main

The container needs privileged mode, which is worth noting as a security decision rather than a detail. The compose file in the repository makes the same choice, running privileged, mounting the models directory, mapping 8080 to 8080 and additionally mapping 11432 to 8080, which makes the service reachable on the port that Ollama conventionally uses, and restarting the container unless it is stopped.

bash
docker compose up --detach --remove-orphans

The Dockerfile is Ubuntu 24.04 based, and its comments explain a portability trap that is worth reading before you build your own image. The RK3588 core is ARMv8.2-A and does not support Pointer Authentication, which arrived in ARMv8.3-A, and Debian Trixie ARM64 Python builds use PAC guards, so the kernel returns ENOEXEC and the container fails at startup with an exec format error. Ubuntu 24.04 ARM64 packages avoid PAC and run correctly on that hardware. The image also builds the rk-llama.cpp fork with the RKNPU2 and KleidiAI CPU options enabled and GCC 14 as the C compiler, and it creates a virtual environment to work around the externally-managed-environment restriction of modern Debian packaging.

Running the server and the limits of the approach

The server is started with the models directory and the path to a build of the llama.cpp fork. Starting it also handles the environment the README describes, starting the conda virtualisation automatically and setting the NPU frequency. The same command with the --debug flag turns on the server's optional debug mode.

bash
rkllama_server --models <models_dir> --llamacpp <bin_folder_of_build_llama.cpp_fork>

The first limitation is hardware lock-in, and it is absolute. The NPU path exists for Rockchip silicon, the runtimes are Rockchip's own rkllm and rknn libraries, and none of this changes if you would rather run the same model on a CPU or a GPU. The comparison with Ollama and llama.cpp is a comparison of execution targets, not of features, and choosing rkllama means accepting that the deployment story only applies to a board family.

The second limitation is the version treadmill. The project is at 0.0.76, the release history in the repository shows versions from 0.0.1 onward, and the feature list is still growing quickly across multimodal, image generation and speech. The dependency list in pyproject.toml is pinned hard, Flask 2.3.2, transformers 4.57.6, torch 2.8.0, numpy 1.26.4, and the rknn-toolkit-lite2 wheels are shipped as platform-specific binaries for Python 3.9 through 3.12 on aarch64 only. That set of wheels is the practical bound on the Python versions you can use, and it is narrower than the versions the README claims to support.

The alternative to weigh is CPU inference with llama.cpp on the same board, or a bigger machine with a GPU. The CPU route is slower but has none of these constraints and keeps .GGUF support in upstream hands. Moving to a desktop with an accelerator is more expensive but is where the models actually get fast. rkllama makes sense when the board is the constraint and the NPU is otherwise idle.

Editorial conclusion

rkllama is the practical choice for putting a local model on an Orange Pi 5 or Radxa Rock 4d and serving it over the Ollama or OpenAI shapes of API, especially when the NPU has to do the inference. It is not a substitute for a datacentre GPU and it does not help on hardware without an RKLLM path. Verify first that your board is RK3588 or RK3576, that the rkllm-runtime and rknn-runtime versions match the ones the project pins, and that your models are in a format the NPU runtime can load, since .GGUF support still depends on a community fork.

Frequently asked questions

Which hardware does rkllama support?

Rockchip RK3588, RK3588S and RK3576 platforms. The README lists the tested boards as the Orange Pi 5 Pro, Orange Pi 5 Plus, Orange Pi 5 Max and the Radxa Rock 4d, each with a 6 TOPS NPU, running Ubuntu 24.04 arm64 or Armbian.

Is rkllama compatible with the Ollama API?

Yes, for the main endpoints. The README lists support for chat, generate, ps, tags, embed with the legacy embeddings route, version and pull, and a compatibility guide is published under the documentation directory.

How do I run rkllama with Docker?

Pull the image with `docker pull ghcr.io/notpunchnox/rkllama:main` and run it privileged, mapping a local models directory to /opt/rkllama/models and exposing port 8080. A compose file in the repository does the same, and it also maps 11432 to 8080.

Does rkllama support GGUF models?

Yes, but through a community llama.cpp fork by @invisiofficial called rk-llama.cpp rather than through upstream llama.cpp. The README notes the Dockerfile uses a more updated version of that fork for recent llama.cpp features such as MTP.

What licence is rkllama released under?

GPL-3.0. The pyproject.toml declares the licence as GPL-3.0 with licence-files set to LICEN[CS]E*, and the repository contains a LICENSE file.

Official sources

  1. Issues
  2. License: GPL-3.0
  3. NotPunchnox/rkllama on GitHub
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/notpunchnox-rkllama.svg)](https://hysenlabs.com/projects/notpunchnox-rkllama)

Was this useful?