Tigerbot,手把手教你在windows電腦上部署安裝。180b超大中文語言

首先在d盤根目錄下下載項目
git clone https://github.com/TigerResearch/TigerBot
cd TigerBot
鏈接: https://pan.baidu.com/s/11O5wnEJ7B3dkM1cvTdKMAA 提取碼: 4g63?
下載Python310.zip
解壓到TigerBot
確保你得python.exe路徑為
d:\TigerBot\Python310\python.exe
https://huggingface.co/r4ziel/xformers_pre_built/blob/main/triton-2.0.0-cp310-cp310-win_amd64.whl
下載triton-2.0.0-cp310-cp310-win_amd64.whl
https://download.pytorch.org/whl/torch/
下載torch-1.13.1+cu117-cp310-cp310-win_amd64.whl
https://huggingface.co/TigerResearch/tigerbot-7b-sft/tree/main
到這里下載7b-sft的模型文件到model目錄中【model目錄沒有自己在d:\TigerBot下創(chuàng)建一個】
如果想要嘗試其他版本的模型,可以根據(jù)自己配置需求選擇不同的模型文件下載
https://huggingface.co/TigerResearch
以下是不同模型現(xiàn)存的最低需求情況。
所有7b模型官方推薦最低配置是在一塊3090 顯卡上運(yùn)行
180b模型,4bit版本的官方推薦最低2塊a100 (80g)以上
180b-sft模型 官方推薦最低5塊a100(80g)以上
Tigerbot-7B Bits memory(GB)
tigerbot-7b-base 16 17.2
tigerbot-7b-sft 16 17.2
tigerbot-7b-sft-4bit-128g 4 8.5
Tigerbot-180B-Research Bits memory(GB)
tigerbot-180b-sft 16 347.6
tigerbot-180b-sft-4bit-128g 4 108.5
1、
.\Python310\python.exe -m pip install pyreadline -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
2、打開Python310\Lib\site-packages\pyreadline\py3k_compat.py
第8行替換為
????return isinstance(x, collections.abc.Callable)
保存
3、
.\Python310\python.exe -m pip install triton-2.0.0-cp310-cp310-win_amd64.whl?-i https://pypi.tuna.tsinghua.edu.cn/simple
4、
#requirements.txt 內(nèi)容替換為
safetensors==0.3.0
datasets==2.10.1
accelerate==0.17.1
protobuf==3.20.2
transformers==4.28.1
scikit-learn==1.0.2
torch==1.13.1
evaluate==0.4.0
texttable==1.6.7
toml==0.10.2
numpy==1.22.4
sentencepiece==0.1.98
fire==0.5.0
5、
.\Python310\python.exe -m pip install --requirement requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
6、
.\Python310\python.exe -m pip uninstall torch
.\Python310\python.exe -m pip install torch-1.13.1+cu117-cp310-cp310-win_amd64.whl?-i https://pypi.tuna.tsinghua.edu.cn/simple
7、
infer.py中加入一行
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
8、
.\python310\python.exe infer.py --model_path d:\TigerBot\model\