赞
踩
1.git clone GitHub - ggerganov/llama.cpp: Port of Facebook's LLaMA model in C/C++
2.进入llama.cpp文件夹并make
make
3.把下载好的模型LLama-2-7b-chat-hf移入 /llama.cpp/models中
4.在llama.cpp目录中执行下面的命令安装依赖
python -m pip install -r requirements.txt
5.转换格式
python convert.py models/LLama-2-7b-chat-hf
6.进行4 bit量化
./quantize ./models/LLama-2-7b-chat-hf/ggml-model-f16.gguf ./models/LLama-2-7b-chat-hf/ggml-model-q4_0.gguf q4_0
7.使用交互模式运行
./main -m ./models/LLama-2-7b-chat-hf/ggml-model-q4_0.gguf -n 128 --repeat_penalty 1.0 --color -i -r "User:" -f prompts/chat-with-bob.txt
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。