大模型-FastChat-Vicuna(小羊驼的部署与安装)
1.VisualGLM-6B安装教程
2.大模型-FastChat-Vicuna(小羊驼的部署与安装)
3.Langchain——chatchat3.1版本docker部署流程Langchain-Chatchat4.Langchain-Chatchat3.1——搜索引擎bing与DuckDuckGo大模型-FastChat-Vicuna(小羊驼的部署与安装)
虚拟环境创建
#官网要求Python版本要>= 3.8
conda create -n fastchat python=3.9
conda activate fastchat
#安装pytorch
pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu116
#安装后测试
conda activate fastchat
python
>>> import torch
>>> print(torch.__version__)
1.13.1+cu116
>>> print(torch.version.cuda)
11.6
>>> exit()
#安装fastchat
pip install fschat -i https://pypi.tuna.tsinghua.edu.cn/simple
#安装完fastchat需要重新安装下protobuf
pip install protobuf==3.20.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
7B
#解析7b模型文件
python /home/hcx/transformers-main/src/transformers/models/llama/convert_llama_weights_to_hf.py \
--input_dir /home/hcx/LLaMA --model_size 7B --output_dir /home/hcx/out/model/transformer_model_13b
#生成FastChat对应的模型Vicuna
export https_proxy=http://192.168.12.65:1984 #使用代理vpn
python -m fastchat.model.apply_delta --base /home/hcx/out/model/transformer_model_7b --target /home/hcx/out/model/vicuna-7b --delta lmsys/vicuna-7b-delta-v1.1
- --model-path:表示模型的路径
- --target:表示生成后的vicuna模型的路径
- --delta
启动小羊驼
#服务器端启动小羊驼
CUDA_VISIBLE_DEVICES='4,5' python -m fastchat.serve.cli --model-path /home/hcx/out/model/vicuna-7b --num-gpus 2
#webGUI模型启动小羊驼
#s1启动controller服务
python3 -m fastchat.serve.controller
#s2启动work服务
CUDA_VISIBLE_DEVICES='1,2' python -m fastchat.serve.model_worker --model-path /home/hcx/out/model/vicuna-7b --num-gpus 2
#s2.1测试controller与worker服务是否连通
python3 -m fastchat.serve.test_message --model-name vicuna-7b
#s3启动Gradio web server
python -m fastchat.serve.gradio_web_server
#访问IP:7860
脚踏实地,注重基础。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)