赞
踩
本文安装及调试设备是 MBP M1芯片,其他平台可稍作调整基本步骤类似
省去了基本描述,基本都是命令行
/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)”
/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)”
export HOMEBREW_PREFIX=“/opt/homebrew”
export PATH=“
H
O
M
E
B
R
E
W
P
R
E
F
I
X
/
b
i
n
:
HOMEBREW_PREFIX/bin:
HOMEBREWPREFIX/bin:PATH”
source ~/.bashrc
brew install python@3.9
export PATH=“/opt/homebrew/opt/python@3.9/bin:$PATH”
source ~/.bashrc
ln -s /opt/homebrew/bin/python3.9 /usr/local/bin/py39
ln -s /opt/homebrew/bin/pip3.9 /usr/local/bin/pip39
pip39 install torch torchvision
pip39 install git+https://github.com/huggingface/transformers
pip39 install protobuf==3.20.0
** 百度PaddlePaddle(只找到个7B的模型) https://aistudio.baidu.com/aistudio/datasetdetail/203425/0
** 种子链接(包含7B/13B/30B/65B的模型) magnet:?xt=urn:btih:cdee3052d85c697b84f4c1192f43a2276c0daea0&dn=LLaMA
py39 -m transformers.models.llama.convert_llama_weights_to_hf --input_dir /Users/jacky.yi/GPTLearning/FastChat/data/LLaMA --model_size 7B --output_dir /Users/jacky.yi/GPTLearning/FastChat/data/out/w7b
py39 -m fastchat.model.apply_delta --base /Users/jacky.yi/GPTLearning/FastChat/data/out/w7b --target /Users/jacky.yi/GPTLearning/FastChat/mresult/w7b --delta lmsys/vicuna-7b-delta-v1.1
py39 -m fastchat.serve.cli --model-path /Users/jacky.yi/GPTLearning/FastChat/mresult/w7b --device mps
pip install virtualenv
virtualenv fastchat
source fastchat/bin/activate
py39 -m fastchat.serve.controller
py39 -m fastchat.serve.model_worker --model-path /Users/jacky.yi/GPTLearning/FastChat/mresult/w7b --device mps
py39 -m fastchat.serve.test_message --model-name w7b
py39 -m fastchat.serve.gradio_web_server
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。