Closed robben225 closed 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
代码和模型版本不一致导致的
我按照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