文章目录
- 1. gpu租用
- 2. 公网网盘存储实例/数据
- 3. 登录实例
- 4. 预训练模型下载
- 5. llama、alpaca、vicuna的前世今生
- 6. 对话Vicuna
- (1)llama-2-7b-hf
- (2)vicuna-7b-delta-v0
- (3)vicuna-7b-v0
- (4)执行推理
 
1. gpu租用
-  阿里云 (Alibaba Cloud) https://www.aliyun.com 
-  腾讯云 (Tencent Cloud) https://cloud.tencent.com 
-  华为云 (Huawei Cloud) https://support.huaweicloud.com 
-  百度智能云 (Baidu AI Cloud) https://cloud.baidu.com 
-  AutoDL https://www.autodl.com 
-  恒源云(Gpushare Cloud) https://gpushare.com 
RTX 4090:非常高的性价比,适合 推理任务 和 中小规模训练
A100:大规模训练 或 长时间运行推理任务
2. 公网网盘存储实例/数据
- 百度网盘
- 阿里云盘
gpu云服务商会提供与公网网盘连接、上传、下载的详细操作手册
推荐阿里云盘,更快更稳定!
3. 登录实例
- 控制台内置终端
- Xshell
- finalshell
个人推荐finalshell
4. 预训练模型下载
-  hugging face https://huggingface.co 国内镜像 https://hf-mirror.com 
-  ModelScope 魔搭社区 https://www.modelscope.cn 
-  Paddle 百度飞桨 https://aistudio.baidu.com 
-  tensorflow hub TensorFlow Hub (google.cn) 支持tensorflow框架 
-  pytorch hub PyTorch Hub | PyTorch 支持pytorch框架 
5. llama、alpaca、vicuna的前世今生
用ChatGPT训练出的AI,能超越自己的师傅吗?【3分钟AI】_哔哩哔哩_bilibili
6. 对话Vicuna
小羊驼 Vicuna,宣称实现了GPT-4 90%的功能。
由 UC Berkeley、CMU、Stanford的学者联合推出的一个模型参数70亿/130亿的开源对话模型。
(1)llama-2-7b-hf
获得huggingface的token,详见我的上篇博客,操作类似
 如何获取huggingface token下载llama
 执行命令拉取llama-2-7b-hf
huggingface-cli download --token hf_*** --resume-download meta-llama/Llama-2-7b-hf --local-dir ./llama-2-7b-hf
(2)vicuna-7b-delta-v0
git clone https://hf-mirror.com/lmsys/vicuna-7b-delta-v0
(3)vicuna-7b-v0
pip install fschat==0.1.10
基于一个已有的基础模型,加载增量模型的权重,从而得到一个新的模型。
python -m fastchat.model.apply_delta --base /hy-tmp/llama-2-7b-hf --target /hy-tmp/vicuna-7b-v0 --delta /hy-tmp/vicuna-7b-delta-v0
| base | 指定基础模型的路径 | 
|---|---|
| target | 增量应用后生成的目标模型的存储路径 | 
| delta | 更新或变更部分的模型权重 | 
(4)执行推理
python -m fastchat.serve.cli --model-path /hy-tmp/vicuna-7b-v0




















