网站首页 > 教程文章 正文
发现AI实在是太火了,看到这个llama有泄露的版本。
想玩一下
在阿里云上租了一个普通服务器玩起来了。实测8C32G的大概200G硬盘的主机就能跑(实际我觉得应该可以更小)
实测开通Ubuntu 22版本非常方便。
CentOS 7.9bug很多,不再建议用了
部署步骤如下:
- 下载模型。我下载了7B模型脚本
curl -O https://raw.githubusercontent.com/shawwn/llama-dl/56f50b96072f42fb2520b1ad5a1d6ef30351f23c/llama.sh
- 脚本中修改如下的行
MODEL_SIZE="7B,13B,30B,65B"
为:MODEL_SIZE="7B"
- 执行下载文件
bash llama.sh
- 编译和运行llama.cpp
部署步骤如下:
# 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-12-20 阿里云部署的AI绘图效果展播 阿里云图形工作站
- 2024-12-20 ubuntu下轻量级跨平台git服务器gitblit安装和使用详细过程
- 2024-12-20 Ubuntu中搭建EMQ MQTT服务器 ubuntu怎么做服务器
- 2024-12-20 如何使用C LinkSDK(4.x)快速接入阿里云物联网平台?
- 2024-12-20 阿里云无需高深技术,搭建stable diffision平台实现AI文生图自由
- 2024-12-20 Ubuntu安装Tomcat Ubuntu安装图形界面
- 2024-12-20 使用阿里云服务器搭建个人网站 利用阿里云服务器搭建网站
- 2024-12-20 [网络]openwrt的阿里云编译 openwrt阿里云域名解析
- 2024-12-20 最详细的Ubuntu Linux服务器版安装过程及更新数据包
- 2024-12-20 轻松搭建基于 SpringBoot + Vue 的 Web 商城应用
- 最近发表
- 标签列表
-
- location.href (44)
- document.ready (36)
- git checkout -b (34)
- 跃点数 (35)
- 阿里云镜像地址 (33)
- qt qmessagebox (36)
- md5 sha1 (32)
- mybatis plus page (35)
- semaphore 使用详解 (32)
- update from 语句 (32)
- vue @scroll (38)
- 堆栈区别 (33)
- 在线子域名爆破 (32)
- 什么是容器 (33)
- sha1 md5 (33)
- navicat导出数据 (34)
- 阿里云acp考试 (33)
- 阿里云 nacos (34)
- redhat官网下载镜像 (36)
- srs服务器 (33)
- pico开发者 (33)
- https的端口号 (34)
- vscode更改主题 (35)
- 阿里云资源池 (34)
- os.path.join (33)