如何选择邯郸网站制作,陕西交通建设集团网站,企业网站制作公司排名,网站结构 扁平结构 树状结构MiniCPM-Llama3-V-2_5-int4大模型部署使用环境#xff1a; python3.8cuda11.8其它要求#xff0c;按照安装文档要求下载即可
我是在算力平台用4090跑的#xff0c; GPU 显存#xff08;8GB#xff09;可以部署推理 int4 量化版本#xff0c;如果推理非量化版本需要更高显… MiniCPM-Llama3-V-2_5-int4大模型部署使用环境 python3.8cuda11.8其它要求按照安装文档要求下载即可
我是在算力平台用4090跑的 GPU 显存8GB可以部署推理 int4 量化版本如果推理非量化版本需要更高显存 MiniCPM-V 仓库文件下载 openbmb/MiniCPM-Llama3-V-2_5-int4 模型文件下载 MiniCPM-Llama3-V-2_5 非量化模型文件地址 AutoDL算力平台 cpolar官方地址 MiniCPM-V-2.5 部署应用等 在算力平台AutoDL遇到的报错
rootautodl-container-cffc47b4c5-4a5f97c0:~/tf-logs# conda activate minicpmv2 CommandNotFoundError: Your shell has not been properly configured to use conda activate. To initialize your shell, run
需要运行:
conda init bash 显示文件大小
ls -lh example.zip
df -h /root/autodl-tmp
tar -xvf
解压rar文件
# 更新包列表
sudo apt-get update# 安装 unrar
sudo apt-get install unrar# 解压 MiniCPM-Llama3-V-2_5-int4.rar
unrar x MiniCPM-Llama3-V-2_5-int4.rar# 查看解压后的文件
ls -l
unrar x xxx.rar
unrar x 查看磁盘空间大小
df -h /dev/sda1 安装 克隆我们的仓库并跳转到相应目录
git clone https://github.com/OpenBMB/MiniCPM-V.git
cd MiniCPM-V 2. 创建 conda 环境
conda create -n minicpmv2.5 python3.8 -y
conda activate minicpmv2.5 3. 安装依赖
pip install -r requirements.txt -i https://pypi.mirrors.ustc.edu.cn/simple
pip install gradio3.40.0 -i https://pypi.mirrors.ustc.edu.cn/simple
下载模型文件
git clone https://www.modelscope.cn/OpenBMB/MiniCPM-Llama3-V-2_5-int4.git 参考以下代码进行推理 from chat import OmniLMMChat, img2base64
torch.manual_seed(0)chat_model OmniLMMChat(openbmb/MiniCPM-Llama3-V-2_5)im_64 img2base64(./assets/airplane.jpeg)# First round chat
msgs [{role: user, content: Tell me the model of this aircraft.}]inputs {image: im_64, question: json.dumps(msgs)}
answer chat_model.chat(inputs)
print(answer)# Second round chat
# pass history context of multi-turn conversation
msgs.append({role: assistant, content: answer})
msgs.append({role: user, content: Introduce something about Airbus A380.})inputs {image: im_64, question: json.dumps(msgs)}
answer chat_model.chat(inputs)
print(answer) python web_demo_2.5.py 以下是做内网穿透需要安装的如只是部署自己电脑或使用其它方式进入公网则不需要如下
2.1 安装cpolar
在Ubuntu上打开终端执行命令
首先我们需要安装curl
sudo apt-get install curl | sudo bash国内安装支持一键自动安装脚本
curl -L https://www.cpolar.com/static/downloads/install-release-cpolar.sh | sudo bash2.2 正常显示版本号即安装成功
cpolar version2.3 token认证
登录cpolar官网后台点击左侧的验证查看自己的认证token之后将token贴在命令行里
cpolar authtoken xxxxxxx2.4 简单穿透测试一下
cpolar http 80802.5 将cpolar配置为后台服务并开机自启动
sudo systemctl enable cpolar2.6 启动服务
sudo systemctl start cpolar2.7 查看服务状态
sudo systemctl status cpolar正常显示为active为正常在线状态