llama.cpp跑gguf量化模型

gguf量化的模型,目前看只有llama.cpp支持的比较好,使用了ollama和其他衍生客户端,都会有奇怪的乱输出问题,还没找到解法(据说是要配置template)。

首先这里下载,https://github.com/ggerganov/llama.cpp/releases

解压缩

unzip llama-b4686-bin-ubuntu-x64.zip

运行

./llama-b4686-bin-ubuntu-x64/build/bin/llama-cli -m ./xxx.gguf

常用命令:

./llama-b4686-bin-ubuntu-x64/build/bin/llama-cli -m ./xxx.gguf -n 1024 --temp 0.9 --frequency-penalty 1.1

Server运行:

./llama-server -m ../../../Qwen2.5-1.5B-Instruct.Q2_K.gguf

然后打开http://127.0.0.1:8080

Leave a Reply

Your email address will not be published. Required fields are marked *