经 AI Skill Hub 精选评估,RK AI工具 获评「强烈推荐」。这款AI工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 8.0 分,适合有一定技术背景的用户使用。
高效的AI解决方案,支持Rockchip NPU
RK AI工具 是一款基于 Python 开发的开源工具,专注于 ai、npu、rockchip 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
高效的AI解决方案,支持Rockchip NPU
RK AI工具 是一款基于 Python 开发的开源工具,专注于 ai、npu、rockchip 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:pip 安装(推荐)
pip install rkllama
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install rkllama
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/NotPunchnox/rkllama
cd rkllama
pip install -e .
# 验证安装
python -c "import rkllama; print('安装成功')"
# 命令行使用
rkllama --help
# 基本用法
rkllama input_file -o output_file
# Python 代码中调用
import rkllama
# 示例
result = rkllama.process("input")
print(result)
# rkllama 配置文件示例(config.yml) app: name: "rkllama" debug: false log_level: "INFO" # 运行时指定配置文件 rkllama --config config.yml # 或通过环境变量配置 export RKLLAMA_API_KEY="your-key" export RKLLAMA_OUTPUT_DIR="./output"
A server to run and interact with LLM models optimized for Rockchip RK3588(S) and RK3576 platforms. The difference from other software of this type like Ollama or Llama.cpp is that RKLLama allows models to run on the NPU.
Lib rkllm-runtime: V 1.3.0.Lib rknn-runtime: V 2.3.2./api/chat/api/generate/api/ps/api/tags/api/embed (and legacy /api/embeddings)/api/version/api/pull/v1/completions/v1/chat/completions/v1/embeddings/v1/images/generations/v1/audio/speech/v1/audio/transcriptions/v1/audio/translations (to English only for now like OpenAI with Whisper models)--debug flag.GGUF/HF to RKLLM conversion software---
System Monitor:
---
git clone https://github.com/notpunchnox/rkllama
cd rkllama
python -m pip install .
Output: 
Pull the RKLLama Docker image:
docker pull ghcr.io/notpunchnox/rkllama:main run server docker run -it --privileged -p 8080:8080 -v <local_models_dir>:/opt/rkllama/models ghcr.io/notpunchnox/rkllama:main
Set up by: ichlaffterlalu
Docker Compose facilities much of the extra flags declaration such as volumes:
docker compose up --detach --remove-orphans
1. Download the Model - Download .rkllm models directly from Hugging Face. - Alternatively, convert your GGUF models into .rkllm format (conversion tool coming soon on my GitHub).
2. Place the Model - Create the models directory on your system. - Make a new subdirectory with model name. - Place the .rkllm files in this directory. - Create Modelfile and add this :
FROM="file.rkllm"
HUGGINGFACE_PATH="huggingface_repository"
SYSTEM="Your system prompt"
TEMPERATURE=1.0
Example directory structure:
~/RKLLAMA/models/
└── TinyLlama-1.1B-Chat-v1.0
|── Modelfile
└── TinyLlama-1.1B-Chat-v1.0.rkllm
You must provide a link to a HuggingFace repository to retrieve the tokenizer and chattemplate. An internet connection is required for the tokenizer initialization (only once), and you can use a repository different from that of the model as long as the tokenizer is compatible and the chattemplate meets your needs. Tokenizer gets downloaded for the first time in the models directory
1. Download the encoder model .rknn - Download .rknn models directly from Hugging Face. - Alternatively, convert your ONNX models into .rknn format. - Place the .rknn model inside the models directory. RKLLama detected the encoder model present in the directory. - Include manually the following properties in the Modelfile according to the conversion properties used for the conversion of the vision encoder .rknn:
IMAGE_WIDTH=448
IMAGE_HEIGHT=
N_IMAGE_TOKENS=
IMG_START=
IMG_END=
IMG_CONTENT=
# For example, for Qwen2VL/Qwen2.5VL:
IMAGE_WIDTH=392
IMAGE_HEIGHT=392
N_IMAGE_TOKENS=196
IMG_START=<|vision_start|>
IMG_END=<|vision_end|>
IMG_CONTENT=<|image_pad|>
# For example, for MiniCPMV4:
IMAGE_WIDTH=448
IMAGE_HEIGHT=448
N_IMAGE_TOKENS=64
IMG_START=<image>
IMG_END=</image>
IMG_CONTENT=<unk>
Example directory structure for multimodal:
~/RKLLAMA/models/
└── qwen2-vision\:2b
|── Modelfile
└── Qwen2-VL-2B-Instruct.rkllm
└── Qwen2-VL-2B-Instruct.rknn
1. In a temporary folder, clone the repository https://huggingface.co/danielferr85/lcm-sd-1.5-rknn-2.3.2-rk3588 or https://huggingface.co/danielferr85/lcm-ssd-1b-rknn-2.3.2-rk3588 from Hugging Face for the desired SD model 2. Execute the ONNX to RKNN convertion of the models for your needs WITH RKNN TOOLKIT LIBRARY VERSION 2.3.2. For example: For LCM SD 1.5
python convert-onnx-to-rknn.py --model-dir <directory_download_model> --resolutions 512x512 --components "text_encoder,unet,vae_decoder" --target_platform rk3588
or
For LCM SSD1B
python convert-onnx-to-rknn.py --model-dir <directory_download_model> --resolutions 1024x1024 --components "text_encoder,text_encoder_2,unet,vae_decoder" --target_platform rk3588
3. Create a folder inside the models directory in RKLLAMA for the Stable Diffusion RKNN models, For example: lcm-stable-diffusion or lcm-segmind-stable-diffusion 4. Copy the folders: "scheduler, text_encoder, text_encoder_2 (for SSD1B only), unet, vae_decoder" from the cloned repo to the new directory model created in RKLLMA. Just copy the .json and .rknn files. 5. The structure of the model MUST be like this:
For LCM SD 1.5
~/RKLLAMA/models/
└── lcm-stable-diffusion
|── scheduler
|── scheduler_config.json
└── text_encoder
|── config.json
|── model.rknn
└── unet
|── config.json
|── model.rknn
└── vae_decoder
|── config.json
|── model.rknn
or
For LCM SSD1B
~/RKLLAMA/models/
└── lcm-segmind-stable-diffusion
|── scheduler
|── scheduler_config.json
└── text_encoder
|── config.json
|── model.rknn
└── text_encoder_2
|── config.json
|── model.rknn
└── unet
|── config.json
|── model.rknn
└── vae_decoder
|── config.json
|── model.rknn
For Piper:
~/RKLLAMA/models/
└── es_AR-daniela-high
|── encoder.onnx
└── decoder.rknn
└── piper.json
For MMS-TTS:
~/RKLLAMA/models/
└── mms_tts_spa
|── encoder/
|── encoder.rknn
└── decoder/
└── decoder.rknn
└── mms_tts.json
IMPORTANT For Piper: - You must convert only your decoder (.rknn) for your specific platform (for example rk3588). - The encoder can have any name but must ended with extension .onnx - The decoder can have any name but must ended with extension .rknn - The config of the model must have the name piper.json - You must use rknn-toolkit 2.3.2 for RKNN conversion because is the one used by RKLLAMA - Always CHECK THE LICENSE of the voice that you are going to use. - In OpenAI request, the argument model is the name of the model folder that you create and the argument voice is the speaker of the voice if the voice is multispeaker (For example 'F' (Female) or 'M' (Male). Check the config of the model). If the model is monospeaker, then voice can be skipped. - You can convert any Piper TTS model (or create one, or finetuning one) creating first the encoder and decoder in ONNX format and then converting the decoder in RKNN: 1. Clone this repo and branch streaming: https://github.com/mush42/piper/tree/streaming 2. Create a virtual environemnt and install that repo 3. Clone the repository https://huggingface.co/danielferr85/piper-checkpoints-rknn from Hugging Face 4. Download the entire folder of the voice to convert from dataset: https://huggingface.co/datasets/rhasspy/piper-checkpoints and put it inside the repo piper-checkpoints-rknn (the structure must be for example: es/es_MX/ald/medium/). You can also use the script download_models.py from download automatically the model you want. 5. Execute the script export_encoder_decoder.py to export the encoder and decoder IN ONNX format. 6. Execute the script export_rknn.py to export the decoder in RKNN format (you must uhave installed the rknn-toolkit version 2.3.2).
For MMS-TTS: - You must convert your encoder and decoder (.rknn) for your specific platform (for example rk3588). - The encoder can have any name but must ended with extension .rknn and must be placed inside a folder called encoder - The decoder can have any name but must ended with extension .rknn and must be placed inside a folder called decoder - The vocab of the model must have the name mms_tts.json - You must use rknn-toolkit 2.3.2 for RKNN conversion because is the one used by RKLLAMA - Always CHECK THE LICENSE of the voice that you are going to use. - In OpenAI request, the argument model is the name of the model folder that you create and the argument voice is the speaker of the voice if the voice is multispeaker but in MMS-TTS always is monospeaker, then voice is skipped. - You can convert more mms_tts models. Check: https://github.com/airockchip/rknn_model_zoo/tree/main/examples/mms_tts
~/RKLLAMA/models/
└── omniasr-ctc:300m
└── model.rknn
└── omniasr.txt
IMPORTANT - The model can have any name but must ended with extension .rknn - The vocabulary of the model must be the name omniasr.txt - You must use rknn-toolkit 2.3.2 for RKNN conversion because is the one used by RKLLAMA
~/RKLLAMA/models/
└── whisper-large-v3-turbo
└── encoder
└── model_encoder.rknn
└── decoder
└── model_decoder.rknn
└── decoder_with_past
└── model_decoder_with_past.rknn
└── tokenizer
└── tokenizer_config.json
└── tokenizer.json
└── whisper.ini
IMPORTANT - The models can have any name but must ended with extension .rknn and must be in the correct folder structure - The tokenizer folder is the same as the original official Whisper model - The whisper.ini file can be modified to adjust the properties of the VAD if needed - You must use rknn-toolkit 2.3.2 for RKNN conversion because is the one used by RKLLAMA
Done! You are ready to test the OpenAI endpoint /v1/audio/transcriptions to generate transcriptions. You can add it to OpenWebUI in the Audio section for STT.
1. Remove the pyhton package rkllama
pip uninstall rkllama
Output:
---
RKLLama supports advanced tool/function calling for enhanced AI interactions:
```bash
curl -X POST http://localhost:8080/api/chat \ -H "Content-Type: application/json" \ -d '{ "model": "qwen2.5:3b", "messages": [{"role": "user", "content": "What is the weather in Paris?"}], "tools": [{ "type": "function", "function": { "name": "get_weather", "description": "Get current weather", "parameters": { "type": "object", "properties": { "location": {"type": "string", "description": "City name"} }, "required": ["location"] } } }] }' ```
Features: - 🔧 Multiple model support (Qwen, Llama 3.2+, others) - 🌊 Streaming & non-streaming modes - 🎯 Robust JSON parsing with fallback methods - 🔄 Auto format normalization - 📋 Multiple tools in single request
For complete documentation: Tool Calling Guide
RKLLAMA uses a flexible configuration system that loads settings from multiple sources in a priority order:
See the Configuration Documentation for complete details.
高效的AI解决方案,支持Rockchip NPU
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
⚠️ GPL 3.0 — 强 Copyleft,衍生作品须开源,含专利保护条款,不可闭源使用。
AI Skill Hub 点评:RK AI工具 的核心功能完整,质量优秀。对于AI 技术爱好者来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | rkllama |
| Topics | ainpurockchippython |
| GitHub | https://github.com/NotPunchnox/rkllama |
| License | GPL-3.0 |
| 语言 | Python |
收录时间:2026-06-24 · 更新时间:2026-06-24 · License:GPL-3.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。