。V2.5的时候折腾过,没成功,V2.6出来后又勾起来我的好奇心,今天终于走通了个大概吧??特此记录,端侧设备:小米10-pro。
① 首先依旧是下载模型到本地-电脑,各位可以从mdoelscope(需要注册)和HF下载(HF需要翻墙),不过也可以使用HF的镜像网站:https://hf-mirror.com/,具体下载命令如下:
pip install -U huggingface_hubLinux: export HF_ENDPOINT=https://hf-mirror.comWindowsenv:HF_ENDPOINT = "https://hf-mirror.com"
#huggingface中的模型较多,可以按需下载,但是mmproj-model-f16.gguf必须下载huggingface-clidownload--local-dir-use-symlinksFalse--resume-downloadOpenBMB/MiniCPM-V-2_6-gguf--local-dirOpenBMB/MiniCPM-V-2_6-gguf#也可以使用modelscope下载git lfs installgit clone https://www.modelscope.cn/OpenBMB/MiniCPM-V-2_6-gguf.git
下载完成应该是下面的列表:
② 此时需要在手机上安装Termux(可以在手机上运行命令行,linux指令),我下载的是对勾这个版本:
https://github.com/termux/termux-app/releases
gitclonegit@github.com:OpenBMB/llama.cpp.gitcdllama.cppgitcheckoutminicpmv-main
④ 接下来打开手机上的Termux软件,在命令行执行下面的命令(默认的路径就是手机上的home路径):
aptupdate&&aptupgrade-yaptinstallgitmakecmakeaptinstallffmpegaptinstallpkg-config#这个命令可能需要执行两次,可以将手机存储路径打开权限#执行后会多出一个storage目录termux-setup-storage
cdstorage/downloads/llama.cppmake-j4makellama-minicpmv-cli
./llama-minicpmv-cli-m../MiniCPM-V-2_6-gguf/ggml-model-Q4_K_M.gguf--mmproj../MiniCPM-V-2_6-gguf/mmproj-model-f16.gguf-c4096--temp0.7--top-p0.8--top-k100--repeat-penalty1.05--imagexx.jpg-p"Whatisintheimage?"
参考:
1.https://github.com/OpenBMB/llama.cpp/blob/minicpmv-main/examples/llava/README-minicpmv2.6.md
| 欢迎光临 链载Ai (https://www.lianzai.com/) | Powered by Discuz! X3.5 |