目前最小的视觉语言大模型-qwen-vl大模型

视觉语言qwen-vl大模型,满足一定程度对图片内容的理解和认知,本地部署推理占据显存10.6g;

1、

本次部署版本为Qwen-VL-Chat-Int4,电脑配置:ubuntu20.04;显卡:RTX4090 24G;

2、

三个参考链接:

qwen-vl代码仓库链接:https://github.com/QwenLM/Qwen-VL
Qwen-VL-Chat-Int4模型权重链接:Qwen/Qwen-VL-Chat-Int4 at main
使用参考文档链接:魔搭社区

3、
部署:只需4步
(前提:已经安装了anaconda)

1、下载代码:

git clone https://github.com/QwenLM/Qwen-VL.git


2、配置环境:python建议使用3.10,本人尝试过3.12会导致failed to build totenizers从而环境安装失败。

conda create -name qwenvl python=3.10
cd Qwen-VL
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
###建议添加清华镜像提高包的安装时间


3、配置Qwen-VL-Chat-Int4额外依赖库:

pip install optimum -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install auto-gptq -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install modelscope -U -i https://pypi.tuna.tsinghua.edu.cn/simple

4、测试;推理模块;

需要修改自己的模型路径;

python web_demo_mm.py  --checkpoint-path /home/u/hxx/llm_set/openai/qwen_vl/Qwen-VL-Chat-Int4

问题1:

本地部署,环境报错第一点:解决方式需要降低urllib3的版本,适宜版本为urllib3==1.25.11;

问题2、

报错:

ERROR: Could not build wheels for tokenizers, which is required to install pyproject.toml-based projects

解决方法:安装rust:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
直接安装太慢,需要配置安装源

curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf > rust.sh && chmod +x rust.sh
##设置环境变量
##export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static
export RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup
export RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup
./rust.sh
##安装成功

  • 6
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值