环境配置
8G 显存玩转书生大模型 Demo
conda create -n demo python=3.10 -y
# 激活环境
conda activate demo
# 安装 torch
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.38
pip install sentencepiece==0.1.99
pip install einops==0.8.0
pip install protobuf==5.27.2
pip install accelerate==0.33.0
pip install streamlit==1.37.0
Cli Demo 部署 InternLM2-Chat-1.8B 模型
生成300字小故事
LMDeploy 部署 InternLM-XComposer2-VL-1.8B 模型
环境配置,安装LMDeploy
conda activate demo
pip install lmdeploy[all]==0.5.1
pip install timm==1.0.7
启动代码
lmdeploy serve gradio /share/new_models/Shanghai_AI_Laboratory/internlm-xcomposer2-vl-1_8b --cache-max-entry-count 0.1
模型启动