Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E RKNN: [08:48:14.826] invalid rknn llm model magic E RKNN: [08:48:14.826] load model file error! #129

Open
huochen1 opened this issue Dec 4, 2024 · 10 comments

Comments

@huochen1
Copy link

huochen1 commented Dec 4, 2024

rkllm init start
I rkllm: rkllm-runtime version: 1.1.2, rknpu driver version: 0.9.8, platform: RK3588

E RKNN: [08:48:14.826] invalid rknn llm model magic
E RKNN: [08:48:14.826] load model file error!
rknn_init fail! ret=-1
rkllm init success

user: o
robot: o:0: GGML_ASSERT(view_src == NULL || data_size == 0 || data_size + view_offs <= ggml_nbytes(view_src)) failed
/home/linaro/rkllm/rkllm-runtime/examples/rkllm_api_demo/../../runtime/Linux/librkllm_api/aarch64/librkllmrt.so(+0x1c7e34)[0x7fa3bf9e34]
/home/linaro/rkllm/rkllm-runtime/examples/rkllm_api_demo/../../runtime/Linux/librkllm_api/aarch64/librkllmrt.so(+0x1c9480)[0x7fa3bfb480]
/home/linaro/rkllm/rkllm-runtime/examples/rkllm_api_demo/../../runtime/Linux/librkllm_api/aarch64/librkllmrt.so(+0x1e82a8)[0x7fa3c1a2a8]
/home/linaro/rkllm/rkllm-runtime/examples/rkllm_api_demo/../../runtime/Linux/librkllm_api/aarch64/librkllmrt.so(+0x116454)[0x7fa3b48454]
/home/linaro/rkllm/rkllm-runtime/examples/rkllm_api_demo/../../runtime/Linux/librkllm_api/aarch64/librkllmrt.so(+0x1190d4)[0x7fa3b4b0d4]
/home/linaro/rkllm/rkllm-runtime/examples/rkllm_api_demo/../../runtime/Linux/librkllm_api/aarch64/librkllmrt.so(+0x17afb0)[0x7fa3bacfb0]
/home/linaro/rkllm/rkllm-runtime/examples/rkllm_api_demo/../../runtime/Linux/librkllm_api/aarch64/librkllmrt.so(+0x11eb14)[0x7fa3b50b14]
/home/linaro/rkllm/rkllm-runtime/examples/rkllm_api_demo/../../runtime/Linux/librkllm_api/aarch64/librkllmrt.so(+0x12e774)[0x7fa3b60774]
/home/linaro/rkllm/rkllm-runtime/examples/rkllm_api_demo/../../runtime/Linux/librkllm_api/aarch64/librkllmrt.so(+0xaaab4)[0x7fa3adcab4]
./llm_demo(+0x2314)[0x5561792314]
/lib/aarch64-linux-gnu/libc.so.6(__libc_start_main+0xe8)[0x7fa36c7e18]
./llm_demo(+0x1ac4)[0x5561791ac4]
您好,这个报错是不支持这个rkllm模型是吗,为什么他还会初始化成功的

@huochen1
Copy link
Author

huochen1 commented Dec 4, 2024

有可以提供测试的rkllm模型吗。

@waydong
Copy link
Collaborator

waydong commented Dec 4, 2024

hi,模型是用1.1.2版本的rkllm-toolkit转换出来的吗?

@huochen1
Copy link
Author

huochen1 commented Dec 4, 2024 via email

@huochen1
Copy link
Author

huochen1 commented Dec 4, 2024

您好,确实需要版本对应的上才行,就是需要你板端的1.1.2,rkllm-toolkit也需要1.1.2模型转化大模型
image
但是这个回复好像不太行的样子,我看到test.py里面的# Build model
dataset = "./data_quant.json"

Json file format, please note to add prompt in the input,like this:

[{"input":"Human: 你好!\nAssistant: ", "target": "你好!我是人工智能助手KK!"},...] 这个/data_quant.json是需要自己写的吗,我是从魔塔社区里面下的那个千问1.8模型,里面好像没有这个/data_quant.json文件,最近刚接触到部署的大模型可能这个有点不太懂了,期待您的回复

@yaoyaoyao123
Copy link

我遇到了相同的问题,请问你有1.1.4版本的rkllm模型吗

@huochen1
Copy link
Author

没有1.1.4的我就按照文档转了1.1.2的试了试不过那个乱回答的问题不知道怎么弄

@waydong
Copy link
Collaborator

waydong commented Dec 16, 2024

没有1.1.4的我就按照文档转了1.1.2的试了试不过那个乱回答的问题不知道怎么弄

llm_demo.cpp中要加上提示词,不然模型生成效果会有较大影响:
text = PROMPT_TEXT_PREFIX + input_str + PROMPT_TEXT_POSTFIX;

@Rocketman17
Copy link

Rocketman17 commented Jan 2, 2025

I encountered the same error: "E RKNN: invalid rknn llm model magic E RKNN: load model file error!"
Converted two models into rkllm format (TinyLlama and Qwen-chat) but in both cases it throws the same error.

image

@waydong
Copy link
Collaborator

waydong commented Jan 3, 2025

I encountered the same error: "E RKNN: invalid rknn llm model magic E RKNN: load model file error!" Converted two models into rkllm format (TinyLlama and Qwen-chat) but in both cases it throws the same error.

image

Please attempt to reconvert the model utilizing toolkit version 1.1.4.

@Rocketman17
Copy link

Thanks for the reply,
Apparently, conversion process was stalling in middle causing creation of corrupted model file.
I got working model now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants