当前位置:   article > 正文

internvl-chat部署_internvl本地部署

internvl本地部署

简介

InternVL1.5是一个开源的视觉模型,效果接近gpt-4v

github地址:https://github.com/OpenGVLab/InternVL

体验地址:https://internvl.opengvlab.com/

安装

官方推荐使用LMDeploy进行安装:https://lmdeploy.readthedocs.io/zh-cn/latest/get_started.html

可以直接从官方镜像启动:docker pull openmmlab/lmdeploy:v0.4.2

也可以用cuda12的镜像进行pip install安装:

# 基于pytorch镜像
docker pull pytorch/pytorch:2.2.2-cuda12.1-cudnn8-runtime
export PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
pip install timm 
# pip install torchvision==0.17.2
pip install lmdeploy -i https://pypi.tuna.tsinghua.edu.cn/simple

# 下载模型
mkdir -p /data/huggingface
export HF_HUB_CACHE=/data/huggingface
export HF_ENDPOINT=https://hf-mirror.com
huggingface-cli download --resume-download OpenGVLab/InternVL-Chat-V1-5

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13

启动

# 启动openAI兼容的接口
# --backend {pytorch,turbomind} 默认turbomind
lmdeploy serve api_server OpenGVLab/InternVL-Chat-V1-5 --server-port 80
# 控制台交互对话
lmdeploy chat OpenGVLab/InternVL-Chat-V1-5
# webui对话,基于gradio
lmdeploy serve gradio OpenGVLab/InternVL-Chat-V1-5
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小惠珠哦/article/detail/804224
推荐阅读
相关标签
  

闽ICP备14008679号