任务:
一、安装环境
# 安装一些必要的库
conda install pytorch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 pytorch-cuda=12.1 -c pytorch -c nvidia -y
# 安装其他依赖
pip install transformers==4.43.3
pip install streamlit==1.37.0
pip install huggingface_hub==0.24.3
pip install openai==1.37.1
pip install lmdeploy==0.5.2
二、 模型部署
2.1 获取模型
-
如果使用intern-studio开发机,可以直接在路径
/share/new_models/Shanghai_AI_Laboratory/internlm2-chat-1_8b
下找到模型 -
如果不使用开发机,可以从huggingface上获取模型,地址为: