龙空技术网

在阿里云上快速跑起来自己本地部署的类chatgpt(llama.cpp)

安逸远山滔哥 1180

前言:

现时看官们对“centos65自启动程序”大约比较看重,你们都需要学习一些“centos65自启动程序”的相关资讯。那么小编同时在网摘上收集了一些有关“centos65自启动程序””的相关知识,希望兄弟们能喜欢,各位老铁们一起来学习一下吧!

发现AI实在是太火了,看到这个llama有泄露的版本。

想玩一下

在阿里云上租了一个普通服务器玩起来了。实测8C32G的大概200G硬盘的主机就能跑(实际我觉得应该可以更小)

实测开通Ubuntu 22版本非常方便。

CentOS 7.9bug很多,不再建议用了

部署步骤如下:

下载模型。我下载了7B模型脚本

curl -O

脚本中修改如下的行

MODEL_SIZE="7B,13B,30B,65B"

为:MODEL_SIZE="7B"

执行下载文件

bash llama.sh

编译和运行llama.cpp

部署步骤如下:

# build this repogit clone  llama.cppmake# obtain the original LLaMA model weights and place them in ./modelsls ./models65B 30B 13B 7B tokenizer_checklist.chk tokenizer.model# install Python dependenciespython3 -m pip install torch numpy sentencepiece# convert the 7B model to ggml FP16 formatpython3 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还是很不靠谱

标签: #centos65自启动程序 #centosabrtccpp #centos65下载阿里云