这个示例展示了利用YoMo传输数据,运行LLM大语言模型chatbot
https://yomo.run/docs#install-cli
复制config.yaml
到CPU服务器,然后运行
yomo serve -c config.yaml
复制chatbot
目录到GPU服务器,然后运行
go build -buildmode=c-shared -o sfn-lib.so sfn/lib.go
确保GPU服务器上已安装CUDA环境:NVIDIA驱动、CUDA Toolkit、cuDNN SDK
复制chat.py
和requirements.txt
文件到GPU服务器,然后运行
pip install -r requirements.txt
下载大语言模型(如百川2)
git lfs install
git clone https://huggingface.co/baichuan-inc/Baichuan2-13B-Chat-4bits
python chat.py \
--sfn-lib chatbot/sfn-lib.so \
--zipper ${YOUR_CPU_SERVER}:29000 \
--model-path ${YOUR_MODEL_PATH}
YOMO_ZIPPER_ADDR=${YOUR_CPU_SERVER}:29000 go run cli/main.go