llm deploy project based mnn. This project has merged into MNN.
C++
1,616
223 commits
updated Jan 20, 2025

该项目代码已经Merge到MNN.
mnnllm;llm模型导出onnx和mnn模型请使用llm-export
CI构建状态:
# clone
git clone --recurse-submodules https://github.com/wangzhaode/mnn-llm.git
cd mnn-llm
# linux
./script/build.sh
# macos
./script/build.sh
# windows msvc
./script/build.ps1
# python wheel
./script/py_build.sh
# android
./script/android_build.sh
# android apk
./script/android_app_build.sh
# ios
./script/ios_build.sh
一些编译宏:
BUILD_FOR_ANDROID: 编译到Android设备;LLM_SUPPORT_VISION: 是否支持视觉处理能力;DUMP_PROFILE_INFO: 每次对话后dump出性能数据到命令行中;默认使用CPU,如果使用其他后端或能力,可以在编译MNN时添加MNN编译宏
-DMNN_CUDA=ON-DMNN_OPENCL=ON-DMNN_METAL=ON# linux/macos
./cli_demo ./Qwen2-1.5B-Instruct-MNN/config.json # cli demo
./web_demo ./Qwen2-1.5B-Instruct-MNN/config.json ../web # web ui demo
# windows
.\Debug\cli_demo.exe ./Qwen2-1.5B-Instruct-MNN/config.json
.\Debug\web_demo.exe ./Qwen2-1.5B-Instruct-MNN/config.json ../web
# android
adb push android_build/MNN/OFF/arm64-v8a/libMNN.so /data/local/tmp
adb push android_build/MNN/express/OFF/arm64-v8a/libMNN_Express.so /data/local/tmp
adb push android_build/libllm.so android_build/cli_demo /data/local/tmp
adb push Qwen2-1.5B-Instruct-MNN /data/local/tmp
adb shell "cd /data/local/tmp && export LD_LIBRARY_PATH=. && ./cli_demo ./Qwen2-1.5B-Instruct-MNN/config.json"
673 followers · starred Sep 2024
2,858 followers · starred Dec 2023
26 followers · starred May 2025
6 followers · starred Apr 2023
llm deploy project based mnn. This project has merged into MNN.
C++
1,616
223 commits
updated Jan 20, 2025

该项目代码已经Merge到MNN.
mnnllm;llm模型导出onnx和mnn模型请使用llm-export
CI构建状态:
# clone
git clone --recurse-submodules https://github.com/wangzhaode/mnn-llm.git
cd mnn-llm
# linux
./script/build.sh
# macos
./script/build.sh
# windows msvc
./script/build.ps1
# python wheel
./script/py_build.sh
# android
./script/android_build.sh
# android apk
./script/android_app_build.sh
# ios
./script/ios_build.sh
一些编译宏:
BUILD_FOR_ANDROID: 编译到Android设备;LLM_SUPPORT_VISION: 是否支持视觉处理能力;DUMP_PROFILE_INFO: 每次对话后dump出性能数据到命令行中;默认使用CPU,如果使用其他后端或能力,可以在编译MNN时添加MNN编译宏
-DMNN_CUDA=ON-DMNN_OPENCL=ON-DMNN_METAL=ON# linux/macos
./cli_demo ./Qwen2-1.5B-Instruct-MNN/config.json # cli demo
./web_demo ./Qwen2-1.5B-Instruct-MNN/config.json ../web # web ui demo
# windows
.\Debug\cli_demo.exe ./Qwen2-1.5B-Instruct-MNN/config.json
.\Debug\web_demo.exe ./Qwen2-1.5B-Instruct-MNN/config.json ../web
# android
adb push android_build/MNN/OFF/arm64-v8a/libMNN.so /data/local/tmp
adb push android_build/MNN/express/OFF/arm64-v8a/libMNN_Express.so /data/local/tmp
adb push android_build/libllm.so android_build/cli_demo /data/local/tmp
adb push Qwen2-1.5B-Instruct-MNN /data/local/tmp
adb shell "cd /data/local/tmp && export LD_LIBRARY_PATH=. && ./cli_demo ./Qwen2-1.5B-Instruct-MNN/config.json"
673 followers · starred Sep 2024
2,858 followers · starred Dec 2023
26 followers · starred May 2025
6 followers · starred Apr 2023