wangzhaode / mnn-llm

llm deploy project based mnn.
Apache License 2.0
1.46k stars 159 forks source link

android端推理crash #207

Closed robben225 closed 3 months ago

robben225 commented 3 months ago

我按照readme里步骤,将编译出的so和模型推到android设备的/data/local/tmp目录下,在执行./cli_demo ./Qwen2-1.5B-Instruct-MNN/config.json时,模型可以加载成功,但是在对话时,就会crash。

/data/local/tmp # ./clidemo ./mnn-llm/Qwen2-1.5B-Instruct-MNN/config.json
model path is ./mnn-llm/Qwen2-1.5B-Instruct-MNN/config.json single
= 1, is_diskembedding = 1 load tokenizer tokenizer_type = 3 load tokenizer Done load ./mnn-llm/Qwen2-1.5B-Instruct-MNN/qwen2-1.5b-int4.mnn ... Done!

Q: hello

A: terminating with uncaught exception of type std::out_of_range: unordered_map::at: key not found Aborted

robben225 commented 3 months ago

代码和模型版本不一致导致的