发现AI实在是太火了,看到这个llama有泄露的版本。
想玩一下
在阿里云上租了一个普通服务器玩起来了。实测8C32G的大概200G硬盘的主机就能跑(实际我觉得应该可以更小)
实测开通Ubuntu 22版本非常方便。
CentOS 7.9bug很多,不再建议用了
部署步骤如下:
curl -O https://raw.githubusercontent.com/shawwn/llama-dl/56f50b96072f42fb2520b1ad5a1d6ef30351f23c/llama.sh
MODEL_SIZE="7B,13B,30B,65B"
为:MODEL_SIZE="7B"
bash llama.sh
部署步骤如下:
# build this repo
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
make
# obtain the original LLaMA model weights and place them in ./models
ls ./models
65B 30B 13B 7B tokenizer_checklist.chk tokenizer.model
# install Python dependencies
python3 -m pip install torch numpy sentencepiece
# convert the 7B model to ggml FP16 format
python3 convert-pth-to-ggml.py models/7B/ 1
# quantize the model to 4-bits
./quantize.sh 7B
# run the inference
./main -m ./models/7B/ggml-model-q4_0.bin -t 8 -n 128
然后就可以跑起来了
暂时还不支持中文(我考虑后续买个阿里云的机器翻译,中英文翻译一下玩)。感觉llama还是很不靠谱
页面更新:2024-03-14
本站资料均由网友自行发布提供,仅用于学习交流。如有版权问题,请与我联系,QQ:4156828
© CopyRight 2008-2024 All Rights Reserved. Powered By bs178.com 闽ICP备11008920号-3
闽公网安备35020302034844号