Downloads · 30 days
35
6% of all-time downloads
jamescallander/Llama-3.2-3B-Instruct_w8a8_g128_rk3588.rkllm
Llama-3.2-3B-Instruct_w8a8_g128_rk3588.rkllm is a text generation model from jamescallander. Use it when you need the model to write or continue text. It is set up for rkllm. The card lists the license as llama3.2.
Author: @jamescallander Source model: meta-llama/Llama-3.2-3B-Instruct · Hugging Face
Downloads · 30 days
35
6% of all-time downloads
All-time downloads
619
Public
Repo size
4.4 GB
Likes
1
Public
Click a slice to open those files.
.rkllm4.4 GB · 100%
From the Hugging Face model README
Author: @jamescallander
Source model: meta-llama/Llama-3.2-3B-Instruct · Hugging Face
Target: Rockchip RK3588 NPU via RKNN-LLM Runtime
This repository hosts a conversion of
Llama-3.2-3B-Instructfor use on Rockchip RK3588 single-board computers (Orange Pi 5 plus, Radxa Rock 5b+, Banana Pi M7, etc.). Conversion was performed using the RKNN-LLM toolkit
w8a8_g128.rkllm artifact.rkllm format for RK3588 SBCsw8a8_g128) may show small quality differences vs. full-precision upstream.The RKNN-LLM toolkit and instructions can be found on the specific development board's manufacturer website or from airockchip's github page.
Download and install the required packages as per the toolkit's instructions.
The simplest way the deploy the .rkllm converted model is using an example script provided in the toolkit in this directory: rknn-llm/examples/rkllm_server_demo
python3 <TOOLKIT_PATH>/rknn-llm/examples/rkllm_server_demo/flask_server.py \
--rkllm_model_path <MODEL_PATH>/Llama-3.2-3B-Instruct_w8a8_g128_rk3588.rkllm \
--target_platform rk3588
A basic format for message request is:
{
"model":"Llama-3.2-3B",
"messages":[{
"role":"user",
"content":"<YOUR_PROMPT_HERE>"}],
"stream":false
}
Example request using curl:
curl -s -X POST <SERVER_IP_ADDRESS>:8080/rkllm_chat \
-H 'Content-Type: application/json' \
-d '{"model":"Llama-3.2-3B","messages":[{"role":"user","content":"Explain who Napoleon Bonaparte is in two or three sentences."}],"stream":false}'
The response is formated in the following way:
{
"choices":[{
"finish_reason":"stop",
"index":0,
"logprobs":null,
"message":{
"content":"<MODEL_REPLY_HERE">,
"role":"assistant"}}],
"created":null,
"id":"rkllm_chat",
"object":"rkllm_chat",
"usage":{
"completion_tokens":null,
"prompt_tokens":null,
"total_tokens":null}
}
Example response:
{"choices":[{"finish_reason":"stop","index":0,"logprobs":null,"message":{"content":"Napoleon Bonaparte was a French military leader and statesman who rose to power during the French Revolution, becoming Emperor of France from 1804 to 1815. He is known for his military conquests, strategic genius, and domestic reforms that transformed Europe, but his ambition and authoritarian rule ultimately led to his downfall. His legacy has been debated among historians, with some viewing him as a brilliant leader who modernized France, while others see him as a power-hungry dictator responsible for devastating wars and loss of life.","role":"assistant"}}],"created":null,"id":"rkllm_chat","object":"rkllm_chat","usage":{"completion_tokens":null,"prompt_tokens":null,"total_tokens":null}}
This conversion follows the license of the source model: LICENSE · meta-llama/Llama-3.2-3B-Instruct at main
NOTICE