u3841934583_a_llama_and_a_monk_walking_across_the_desert_--ch_c80c9211-7bd0-4edc-8aa4-a3811490f5c8_2.png

The process of installing RKLLM 1.1.2 was smooth and simple with ezrknn-llm. However, Pelochu has not been active at upgrading the repo to match v1.2.0.

I find v1.2.0 truly important for a few reasons:

Start

The most trust-worthy source of v1.2.0 is https://github.com/airockchip/rknn-llm.

However, it lacks the ease of installation like https://github.com/Pelochus/ezrknn-llm has. So let’s break down.

Analyzing https://github.com/Pelochus/ezrknn-llm/blob/main/install.sh

message_print "Installing RKNN LLM libraries..."

cp ./rkllm-runtime/runtime/Linux/librkllm_api/aarch64/* /usr/lib
cp ./rkllm-runtime/runtime/Linux/librkllm_api/include/* /usr/local/include

# This command copies over important C++ & C libraries.

/include: rkllm.h
/aarch64: librkllmrt.so

# .h is a header file & .so is a compiled file from C++
# Both are new for each version of rkllm
message_print "Compiling LLM runtime for Linux..."

cd ./rkllm-runtime/examples/rkllm_api_demo/
bash build-linux.sh

# There appears to be an example that's used for the compilation of the final /usr/bin/rkllm file
message_print "Moving rkllm to /usr/bin..."

cp ./build/build_linux_aarch64_Release/llm_demo /usr/bin/rkllm # We also change the name for remembering how to call it from shell

# The compiled file is copied over to /usr/bin/rkllm to become the official command

Analyzing https://github.com/Pelochus/ezrknn-llm/blob/main/rkllm-runtime/examples/rkllm_api_demo/build-linux.sh